New issue
Advanced search Search tips

Issue 906734 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 899897



Sign in to add a comment

Some Slow Reports have ScopedBlockingCall without a matching toplevel task

Project Member Reported by gab@chromium.org, Nov 19

Issue description

See SS.

This is because it's common in slow tasks for the start of the task to precede "tracing started". Since the decision to enable a tracing scope is made when an event starts, the end is also not recorded.

This makes it look like there are ScopedBlockingCalls made outside of a toplevel task. That's undesired. The fix is to replay the begin event when tracing starts after a toplevel task started (and before it ends).
 
scoped_blocking_call_only_begin_trace.png
49.0 KB View Download
Cc: primiano@chromium.org gab@chromium.org
Components: Speed>Tracing
Labels: Performance-Tracing
Owner: ----
Status: Untriaged (was: Started)
I wrote a prototype CL to address this locally in TaskAnnotator @ https://chromium-review.googlesource.com/c/chromium/src/+/1344826 but I think this is better addressed by tracing (ScopedTracer & friends) and its UI

@primiano : a good feature for Perfetto
Cc: oysteine@chromium.org
+oysteine as he has been looking into something similar here.

To me the only possible solution to avoid quirks in TaskAnnotator (I agree that this is undesirable) is to switch task annotator to use distinct Begin/End pairs, push the task detail in both begin and end (or only end?) and reconstruct the rest offline.

The problem right now is that if task annotator uses complete events the only event is emitted in the beginning, before tracing is started.
Hm yeah I'm not sure what we could do inside ScopedTracer for this kind of thing which wouldn't add additional overhead for the non-tracing scenario (which would be bad). Though recording the tracing start time in TLS like you do in the CL in #1 could easily be a TraceLog feature, of course.

Sign in to add a comment