diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /tools/profiler/core/MicroGeckoProfiler.cpp | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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); +} |