summaryrefslogtreecommitdiffstats
path: root/tools/profiler/public/ProfilerState.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /tools/profiler/public/ProfilerState.h
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/profiler/public/ProfilerState.h')
-rw-r--r--tools/profiler/public/ProfilerState.h11
1 files changed, 10 insertions, 1 deletions
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