Discussion at https://codereview.chromium.org/2466873002/
ssid:
For all cases which can use event name filtering: startup tracing and slow
reports should disable filtering.
For all cases which can use heap profiler filtering: command line flag should
not disable filtering on any SetDisabled.
Now, considering super-position of these cases with tracing.
filter set by
startup devtols cmdline slow reports
Stop startup yes NA no NA
tracing slow reports no no no yes
called devtools NA yes no no
tracing UI no no no no
What the table says is if the filters were set by the same agent that started
recording then filters should be disabled.
But, Primiano feels that doing this in TraceLog is magical.
So, the other option I came up with is this:
https://codereview.chromium.org/2743473002
Which changes the FILTERING_MODE to persistent. So, now for the case of heap
profiling filtering can be done differently.
But, I still feel that we TraceLog should not be handling this magically and
it's better for the agent to specify explicitly to disable filtering.
There are more cases that are not discussed here which includes tracing being
started by multiple agents at the same time. That causes more complicated issues
with filtering. But, this can be addressed as different issue saying TraceLog
supports only one agent at a time.
Oystein:
We *really* need to come up with a better way of handling
multiple involved tracing agents here :/.
Essentially I think we need a priority system for tracing agents. slow reports <
startup tracing < cmdline < devtools < about://tracing. A higher priority
BeginTracing() will first stop the lower priority one. Then the one actual
exception we need, i.e. heap profiler filtering from cmdline/startup tracing
being persistent across about://tracing calls, should be part of the API that
only about://tracing uses and not the default case.
Comment 1 by primiano@chromium.org
, Mar 27 2017