if (!perfetto::Tracing::IsInitialized()) {Etienne Pierre-DorayWondering a bit weather we need this many entry points from WebView/Chrome into SetupBackgroundTracing.. calls. Maybe we can unify this somehow into one entry point that calls the right Setup.. functions in the right order, based on some params to enable certain features? i.e.
```
bool SetupBackgroundTracing(bool a) {
Setup..();
Setup..();
if (a) Setup..();
}
```@etie...@chromium.org for ideas
There's really 2 entry points:
1: initialization in PostCreateThreads (though this could probably happen earlier):
```
tracing::SetupSystemTracingFromFieldTrial();
tracing::SetupBackgroundTracingFromCommandLine();
tracing::SetupPresetTracingFromFieldTrial();
base::trace_event::EmitNamedTrigger(
base::trace_event::kStartupTracingTriggerName);
```
2: initialization in BackgroundTracingMetricsProvider::Init (guarded behind metric collection):
```
tracing::TraceStartupConfig::GetInstance().SetBackgroundStartupTracingEnabled(tracing::kStartupFieldTracing.Get());
SetupFieldTracingFromFieldTrial();
```
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |