| 385 | } |
| 386 | |
| 387 | ProfilerMemory::GroupsArray ProfilerMemory::GetGroups(int32 mode) |
| 388 | { |
| 389 | GroupsArray result; |
| 390 | Platform::MemoryClear(&result, sizeof(result)); |
| 391 | static_assert(ARRAY_COUNT(result.Values) >= (int32)Groups::MAX, "Update group array size."); |
| 392 | if (mode == 0) |
| 393 | { |
| 394 | for (int32 i = 0; i < (int32)Groups::MAX; i++) |
| 395 | result.Values[i] = Platform::AtomicRead(&GroupMemory[i]); |
| 396 | } |
| 397 | else if (mode == 1) |
| 398 | { |
| 399 | for (int32 i = 0; i < (int32)Groups::MAX; i++) |
| 400 | result.Values[i] = Platform::AtomicRead(&GroupMemoryPeek[i]); |
| 401 | } |
| 402 | else if (mode == 2) |
| 403 | { |
| 404 | for (int32 i = 0; i < (int32)Groups::MAX; i++) |
| 405 | result.Values[i] = Platform::AtomicRead(&GroupMemoryCount[i]); |
| 406 | } |
| 407 | return result; |
| 408 | } |
| 409 | |
| 410 | void ProfilerMemory::Dump(const StringView& options) |
| 411 | { |
no test coverage detected