| 203 | } |
| 204 | |
| 205 | FORCE_INLINE void SubGroupMemory(ProfilerMemory::Groups group, int64 add) |
| 206 | { |
| 207 | // Group itself |
| 208 | Platform::InterlockedAdd(&GroupMemory[(int32)group], add); |
| 209 | Platform::InterlockedDecrement(&GroupMemoryCount[(int32)group]); |
| 210 | UpdateGroupTracyPlot(group); |
| 211 | |
| 212 | // Total memory |
| 213 | Platform::InterlockedAdd(&GroupMemory[(int32)ProfilerMemory::Groups::TotalTracked], add); |
| 214 | Platform::InterlockedDecrement(&GroupMemoryCount[(int32)ProfilerMemory::Groups::TotalTracked]); |
| 215 | |
| 216 | // Group hierarchy parents |
| 217 | uint8 parent = GroupParents[(int32)group]; |
| 218 | while (parent != 0) |
| 219 | { |
| 220 | Platform::InterlockedAdd(&GroupMemory[parent], add); |
| 221 | Platform::InterlockedDecrement(&GroupMemoryCount[parent]); |
| 222 | UpdateGroupTracyPlot((ProfilerMemory::Groups)parent); |
| 223 | parent = GroupParents[parent]; |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | void InitProfilerMemory(const Char* cmdLine, int32 stage) |
no test coverage detected