Tracing doesn't capture tasks that stem from processing NSEvents [rather than Chrome tasks]. |
|||||
Issue descriptionThis can contain a non-trivial amount of work/blockage, especially if it involves a nested CFRunLoop, or a lot of drawing. This can also trigger a lot of Chrome logic [from redraws].
,
Nov 30 2016
Labelling with canary milestone.
,
Nov 30 2016
Is this Chrome code that's being executed, or just code that Chrome is causing to be executed? If it's Chrome code, it seems like we could just instrument this with a toplevel trace span, right?
,
Nov 30 2016
Both. What is a toplevel trace span?
,
Nov 30 2016
I think this might be as simple as adding a trace event to -[NSApp sendEvent:] or some such.
,
Dec 1 2016
From a tracing perspective, a toplevel trace span is just a trace event with the "toplevel" category, like this one (https://cs.chromium.org/chromium/src/ipc/ipc_channel_mojo.cc?q=trace.*toplevel&sq=package:chromium&l=385&dr=C). From a conceptual standpoint, a toplevel span should be active any time that a Chrome process is active, and needs to wrap any entry points where Chrome code can start running, like this one. This ensures that metrics like the CPU time metric are accurate. The classic "toplevel" event is MessageLoop::RunTask (https://cs.chromium.org/chromium/src/base/message_loop/message_loop.cc?q=messageloop::runtask&sq=package:chromium&l=409&dr=C), but it looks like that uses a special trace macro just for it in order to make sure we know where it got called from. I think for our purposes, just using a regular old trace event like the first one I linked to.
,
Dec 1 2016
,
Dec 8 2016
,
Dec 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad0b46843bbcca3ef126402974d9ceaaf136bef5 commit ad0b46843bbcca3ef126402974d9ceaaf136bef5 Author: erikchen <erikchen@chromium.org> Date: Thu Dec 08 20:58:04 2016 mac: Add tracing for -[BrowserCrApplication sendEvent:]. This captures work triggered from NSEvents for tracing. BUG= 669116 Review-Url: https://codereview.chromium.org/2566443002 Cr-Commit-Position: refs/heads/master@{#437334} [modify] https://crrev.com/ad0b46843bbcca3ef126402974d9ceaaf136bef5/chrome/browser/chrome_browser_application_mac.mm
,
Dec 10 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by nedngu...@google.com
, Nov 28 2016