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/core/memory_hooks.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/profiler/core/memory_hooks.cpp') 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 -- cgit v1.2.3