summaryrefslogtreecommitdiffstats
path: root/tools/profiler/core/memory_hooks.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /tools/profiler/core/memory_hooks.cpp
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/profiler/core/memory_hooks.cpp')
-rw-r--r--tools/profiler/core/memory_hooks.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/profiler/core/memory_hooks.cpp b/tools/profiler/core/memory_hooks.cpp
index e13a109aab..5167d15d46 100644
--- a/tools/profiler/core/memory_hooks.cpp
+++ b/tools/profiler/core/memory_hooks.cpp
@@ -584,6 +584,7 @@ BaseProfilerCount* install_memory_hooks() {
ThreadIntercept::Init();
} else {
sCounter->Clear();
+ sCounter->Register();
}
jemalloc_replace_dynamic(replace_init);
return sCounter;
@@ -635,4 +636,10 @@ void disable_native_allocations() {
}
}
+void unregister_memory_counter() {
+ if (sCounter) {
+ sCounter->Unregister();
+ }
+}
+
} // namespace mozilla::profiler