Bug 1937636 - Add a profiler feature for recording flow markers. r=profiler-reviewers,julienw

Recording flow markers can be somewhat expensive because it can add a
lot of markers. e.g. a two markers for each microtask, markers
for the hang reporter between each runnable etc.

This adds a feature flag that we so we can conditionally
emit these markers.

Differential Revision: https://phabricator.services.mozilla.com/D232265
This commit is contained in:
Jeff Muizelaar
2024-12-20 21:36:37 +00:00
parent 617b812600
commit c92f3c093d
4 changed files with 21 additions and 3 deletions

View File

@@ -577,6 +577,13 @@ const featureDescriptions = [
value: "sandbox",
title: "Report sandbox syscalls and logs in the profiler.",
},
{
name: "Flows",
value: "flows",
title:
"Include all flow-related markers. These markers show the program flow better but " +
"can cause more overhead in some places than normal.",
},
];
module.exports = {

View File

@@ -250,7 +250,12 @@ class MOZ_RAII AutoProfilerStats {
\
MACRO(26, "sandbox", Sandbox, \
"Report sandbox syscalls and logs in the " \
"profiler.")
"profiler.") \
\
MACRO(27, "flows", Flows, \
"Include all flow-related markers. These markers show the program" \
"better but can cause more overhead in some places than normal.")
// *** Synchronize with lists in ProfilerState.h and geckoProfiler.json ***
struct ProfilerFeature {

View File

@@ -50,7 +50,8 @@
"bandwidth",
"memory",
"tracing",
"sandbox"
"sandbox",
"flows"
]
},
{

View File

@@ -131,7 +131,12 @@
\
MACRO(26, "sandbox", Sandbox, \
"Report sandbox syscalls and logs in the " \
"profiler.")
"profiler.") \
\
MACRO(27, "flows", Flows, \
"Include all flow-related markers. These markers show the program" \
"better but can cause more overhead in some places than normal.")
// *** Synchronize with lists in BaseProfilerState.h and geckoProfiler.json ***
struct ProfilerFeature {