From a90a5cba08fdf6c0ceb95101c275108a152a3aed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:37 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- tools/profiler/public/ProfilerState.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tools/profiler/public/ProfilerState.h') diff --git a/tools/profiler/public/ProfilerState.h b/tools/profiler/public/ProfilerState.h index 40e1517c91..aad74862b3 100644 --- a/tools/profiler/public/ProfilerState.h +++ b/tools/profiler/public/ProfilerState.h @@ -118,7 +118,10 @@ "every CPU core for every profiler sample.") \ \ MACRO(23, "bandwidth", Bandwidth, \ - "Record the network bandwidth used for every profiler sample.") + "Record the network bandwidth used for every profiler sample.") \ + MACRO( \ + 24, "memory", Memory, \ + "Track the memory allocations and deallocations per process over time.") // *** Synchronize with lists in BaseProfilerState.h and geckoProfiler.json *** struct ProfilerFeature { @@ -138,6 +141,12 @@ struct ProfilerFeature { PROFILER_FOR_EACH_FEATURE(DECLARE) #undef DECLARE + + [[nodiscard]] static constexpr bool ShouldInstallMemoryHooks( + uint32_t aFeatures) { + return ProfilerFeature::HasMemory(aFeatures) || + ProfilerFeature::HasNativeAllocations(aFeatures); + } }; // clang-format off -- cgit v1.2.3