Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Issue 6551019: Trace_event upgrades (Closed)

Created:
9 years, 10 months ago by nduca
Modified:
9 years, 4 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., darin-cc_chromium.org, apatrick_chromium, brettw-cc_chromium.org, jbates
Visibility:
Public.

Description

This CL covers a targeted set of upgrades to the trace_event system in order to improve our perf monitoring capabilities for GPU. 1. Add parameters to trace events, instead of just an ID paramter. 2. Add categories to trace events. 3. Make output of trace data driven by an output callback rather than hard-wired to a file/ETW. Allows WebUI to be written that hooks traced data for analysis/display. 4. Forward trace data from render and gpu processes up to the browser process. We tried to preserve the old output-to-ETW behavior and the implicit "id" parameter. This is embodied in the TRACE_*_LEGACY macros.

Patch Set 1 #

Total comments: 26

Patch Set 2 : More gooder js thanks to arv. #

Total comments: 42
Unified diffs Side-by-side diffs Delta from patch set Stats (+1027 lines, -306 lines) Patch
M base/debug/trace_event.h View 2 chunks +244 lines, -102 lines 20 comments Download
M base/debug/trace_event.cc View 2 chunks +184 lines, -116 lines 2 comments Download
M base/debug/trace_event_win.h View 7 chunks +10 lines, -36 lines 0 comments Download
M base/debug/trace_event_win.cc View 5 chunks +16 lines, -15 lines 0 comments Download
M chrome/app/client_util.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/automation/automation_provider.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/automation/automation_provider_win.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/browser_main.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/external_tab_container_win.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/gpu_process_host_ui_shim.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/gpu_process_host_ui_shim.cc View 3 chunks +17 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_message_filter.h View 1 chunk +4 lines, -0 lines 1 comment Download
M chrome/browser/renderer_host/render_message_filter.cc View 3 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_process_host.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_process_host.cc View 1 3 chunks +17 lines, -0 lines 1 comment Download
M chrome/browser/resources/gpu_internals.html View 1 2 chunks +14 lines, -1 line 0 comments Download
M chrome/browser/resources/gpu_internals/browser_bridge.js View 1 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/resources/gpu_internals/info_view.html View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/gpu_internals/info_view.js View 1 1 chunk +3 lines, -2 lines 2 comments Download
A chrome/browser/resources/gpu_internals/raw_events_view.css View 1 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/resources/gpu_internals/raw_events_view.html View 1 1 chunk +9 lines, -0 lines 0 comments Download
A chrome/browser/resources/gpu_internals/raw_events_view.js View 1 1 chunk +73 lines, -0 lines 5 comments Download
A chrome/browser/resources/gpu_internals/tracing_controller.css View 1 1 chunk +33 lines, -0 lines 2 comments Download
A chrome/browser/resources/gpu_internals/tracing_controller.html View 1 1 chunk +14 lines, -0 lines 0 comments Download
A chrome/browser/resources/gpu_internals/tracing_controller.js View 1 1 chunk +123 lines, -0 lines 6 comments Download
M chrome/browser/webui/gpu_internals_ui.cc View 1 6 chunks +101 lines, -2 lines 1 comment Download
M chrome/common/gpu_messages_internal.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/common/sandbox_policy.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/gpu/gpu_command_buffer_stub.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/gpu/gpu_thread.h View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/gpu/gpu_thread.cc View 1 8 chunks +33 lines, -3 lines 0 comments Download
M chrome/renderer/render_thread.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/render_thread.cc View 1 5 chunks +24 lines, -2 lines 2 comments Download
M chrome/renderer/render_widget.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_main.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M gpu/command_buffer/service/gpu_processor.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M webkit/glue/webkitclient_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
nduca
9 years, 10 months ago (2011-02-22 23:51:50 UTC) #1
arv (Not doing code reviews)
I only looked at the js http://codereview.chromium.org/6551019/diff/1/chrome/browser/resources/gpu_internals/tracing_controller.js File chrome/browser/resources/gpu_internals/tracing_controller.js (right): http://codereview.chromium.org/6551019/diff/1/chrome/browser/resources/gpu_internals/tracing_controller.js#newcode6 chrome/browser/resources/gpu_internals/tracing_controller.js:6: this.overlay_ = $('gpu-tracing-overlay'); ...
9 years, 10 months ago (2011-02-23 17:51:25 UTC) #2
scheib
Ah, one more nit, is this include needed: http://codereview.chromium.org/6551019/diff/1/chrome/browser/gpu_process_host.cc File chrome/browser/gpu_process_host.cc (right): http://codereview.chromium.org/6551019/diff/1/chrome/browser/gpu_process_host.cc#newcode8 chrome/browser/gpu_process_host.cc:8: #include ...
9 years, 10 months ago (2011-02-23 21:34:09 UTC) #3
nduca
http://codereview.chromium.org/6551019/diff/1/chrome/browser/resources/gpu_internals/tracing_controller.js File chrome/browser/resources/gpu_internals/tracing_controller.js (right): http://codereview.chromium.org/6551019/diff/1/chrome/browser/resources/gpu_internals/tracing_controller.js#newcode6 chrome/browser/resources/gpu_internals/tracing_controller.js:6: this.overlay_ = $('gpu-tracing-overlay'); I agree, it smells bad. I ...
9 years, 10 months ago (2011-02-23 23:34:13 UTC) #4
arv (Not doing code reviews)
On Wed, Feb 23, 2011 at 15:34, <nduca@chromium.org> wrote: > > http://codereview.chromium.org/6551019/diff/1/chrome/browser/resources/gpu_internals/tracing_controller.js > File chrome/browser/resources/gpu_internals/tracing_controller.js ...
9 years, 10 months ago (2011-02-24 18:25:31 UTC) #5
nduca
Oh! Didn't know that, thanks for keeping me honest. For the TraceController, I'm going to ...
9 years, 10 months ago (2011-02-24 21:55:06 UTC) #6
scheib
brettw, or sjl, We could use some review particularly on the trace_event* files. Brett, you're ...
9 years, 10 months ago (2011-02-24 22:04:30 UTC) #7
arv (Not doing code reviews)
http://codereview.chromium.org/6551019/diff/5001/chrome/browser/resources/gpu_internals/info_view.js File chrome/browser/resources/gpu_internals/info_view.js (right): http://codereview.chromium.org/6551019/diff/5001/chrome/browser/resources/gpu_internals/info_view.js#newcode122 chrome/browser/resources/gpu_internals/info_view.js:122: if(window.jstProcess) ws after if, while, for etc. (I guess ...
9 years, 10 months ago (2011-02-25 00:51:29 UTC) #8
Ken Russell (switch to Gerrit)
This mostly looks great to me though someone with more experience with the tracing code ...
9 years, 10 months ago (2011-02-25 00:56:36 UTC) #9
scheib
rvargas, brettw suggested adding you as you've been a user of trace event, could you ...
9 years, 9 months ago (2011-02-25 17:59:31 UTC) #10
brettw
Added Siggi who wrote most of the trace event code. http://codereview.chromium.org/6551019/diff/5001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/6551019/diff/5001/base/debug/trace_event.h#newcode59 ...
9 years, 9 months ago (2011-02-25 18:30:02 UTC) #11
Sigurður Ásgeirsson
Sorry guys, I'm OOO for the next week. I'd be happy to take a look ...
9 years, 9 months ago (2011-02-25 19:54:42 UTC) #12
rvargas (doing something else)
It looks like this will break the current chrome frame usage. Given that Siggi is ...
9 years, 9 months ago (2011-02-25 23:38:33 UTC) #13
tommi (sloooow) - chröme
From skimming over this change it feels like the logging system is being bent to ...
9 years, 9 months ago (2011-02-27 17:44:35 UTC) #14
nduca
Thanks for the feedback folks. I'm fine waiting for Siggi's return to discuss things further. ...
9 years, 9 months ago (2011-03-02 04:15:12 UTC) #15
scheib
Could we get a clarification of expected current usage? siggi mentioned on another thread, "I'm ...
9 years, 9 months ago (2011-03-08 00:24:58 UTC) #16
rvargas (doing something else)
On 2011/03/08 00:24:58, scheib wrote: > Could we get a clarification of expected current usage? ...
9 years, 9 months ago (2011-03-08 01:01:31 UTC) #17
Sigurður Ásgeirsson
I have no objection to this change in principle, and it seems like a good ...
9 years, 9 months ago (2011-03-08 14:02:53 UTC) #18
nduca
Neat points, a few thoughts in response: 0. A few of us GPU folks highly ...
9 years, 9 months ago (2011-03-08 22:36:00 UTC) #19
Sigurður Ásgeirsson
On Tue, Mar 8, 2011 at 5:36 PM, <nduca@chromium.org> wrote: > Neat points, a few ...
9 years, 9 months ago (2011-03-09 14:48:33 UTC) #20
scheib
On Begin End arguments: Q: is any system currently using the id values? (I couldn't ...
9 years, 9 months ago (2011-03-10 19:54:24 UTC) #21
Sigurður Ásgeirsson
On Thu, Mar 10, 2011 at 2:53 PM, Vincent Scheib <scheib@chromium.org> wrote: > On Begin ...
9 years, 9 months ago (2011-03-10 21:12:12 UTC) #22
scheib
> > 1. trace size increase... > 2. what happens when beign and end arguments ...
9 years, 9 months ago (2011-03-10 23:51:39 UTC) #23
scheib
I'm working through cleaning this up, and have some decisions to make: (I'm hoping for ...
9 years, 8 months ago (2011-04-13 21:44:59 UTC) #24
Sigurður Ásgeirsson
9 years, 8 months ago (2011-04-14 12:11:21 UTC) #25
On Wed, Apr 13, 2011 at 5:44 PM, Vincent Scheib <scheib@chromium.org> wrote:

> I'm working through cleaning this up, and have some decisions to make: (I'm
> hoping for a yes on each):
>
> A- Can we leave ETW code as is? (on first land at least)
>   - Record events with name, id, extra structure as they have been, vs
> upgrading to arbitrary name/value pairs
>   - why: limit changes, don't need to update SawBuck yet.
>
> SGTM.


> B- Have multiple trace_event macros, for status quo (id, extra) and new
> form of arbitrary name/value pairs?
>   - why: Easier to land sooner with multiple entry points, leaving only the
> call sites that require* it to use the old style. Merging macros and
> continuing support for void* requires serializing and parsing void* unless A
> is decided "no" and we modify ETW code.
>   - * - require means that a void* is used, or if C is yes then
>
> SGTM.


> C- If A && B, then if a "new style" macro is called can we ignore ETW?
>   - why: allows us to leave the "very efficient when off" style macros with
> static category pointers, and to not have a .h dependence on ETW. Else we
> need to make a non inlined function call so we can check the status of ETW.
>   - This one isn't a big deal - already have some code that can do it.
>   - Long term, we may prefer ETW to trigger the "categories" when it is
> enabled, leaving them working very efficiently when off.
>
> SGTM - since no one is using the new macros at the moment there's nothing
lost, and I'd be for trailing with ETW support as needed.

Powered by Google App Engine
This is Rietveld 408576698