diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /tools/profiler/core/MicroGeckoProfiler.cpp | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/profiler/core/MicroGeckoProfiler.cpp')
-rw-r--r-- | tools/profiler/core/MicroGeckoProfiler.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/tools/profiler/core/MicroGeckoProfiler.cpp b/tools/profiler/core/MicroGeckoProfiler.cpp index bedb755742..6c384aeb41 100644 --- a/tools/profiler/core/MicroGeckoProfiler.cpp +++ b/tools/profiler/core/MicroGeckoProfiler.cpp @@ -133,10 +133,10 @@ struct ProfileBufferEntryReader::Deserializer<TraceOption> { } // namespace mozilla #endif // MOZ_GECKO_PROFILER -void uprofiler_simple_event_marker(const char* name, char phase, int num_args, - const char** arg_names, - const unsigned char* arg_types, - const unsigned long long* arg_values) { +void uprofiler_simple_event_marker_internal( + const char* name, char phase, int num_args, const char** arg_names, + const unsigned char* arg_types, const unsigned long long* arg_values, + bool full_stack) { #ifdef MOZ_GECKO_PROFILER if (!profiler_thread_is_being_profiled_for_markers()) { return; @@ -196,8 +196,27 @@ void uprofiler_simple_event_marker(const char* name, char phase, int num_args, break; } } - profiler_add_marker(ProfilerString8View::WrapNullTerminatedString(name), - geckoprofiler::category::MEDIA_RT, {timing.extract()}, - TraceMarker{}, tuple); + profiler_add_marker( + ProfilerString8View::WrapNullTerminatedString(name), + geckoprofiler::category::MEDIA_RT, + {timing.extract(), + full_stack ? MarkerStack::Capture(StackCaptureOptions::Full) + : MarkerStack::Capture(StackCaptureOptions::NoStack)}, + TraceMarker{}, tuple); #endif // MOZ_GECKO_PROFILER } + +void uprofiler_simple_event_marker_with_stack( + const char* name, char phase, int num_args, const char** arg_names, + const unsigned char* arg_types, const unsigned long long* arg_values) { + uprofiler_simple_event_marker_internal(name, phase, num_args, arg_names, + arg_types, arg_values, true); +} + +void uprofiler_simple_event_marker(const char* name, char phase, int num_args, + const char** arg_names, + const unsigned char* arg_types, + const unsigned long long* arg_values) { + uprofiler_simple_event_marker_internal(name, phase, num_args, arg_names, + arg_types, arg_values, false); +} |