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

Issue 9155024: Allow tracing in third_party libraries (Closed)

Created:
8 years, 11 months ago by jbates
Modified:
8 years, 11 months ago
CC:
chromium-reviews, joth
Visibility:
Public.

Description

Allow tracing in third_party libraries This is step 1 -- refactor the code to allow us to split up trace_event.h into trace_event.h and trace_event_export.h/cc. Step 2 is to cut out trace_event_export.h/cc. The _export.h/cc will be laid out so they can be copied to other third_party libraries and then tweaked to call through to chromium's internal tracing API via platform APIs or function pointers. To make these APIs easily exportable, this change primarily aims to eliminate the custom objects (ie: TraceValue) and types that will cause problems when defined in multiple libraries. The macros and internal namespace are destined for trace_event_export.h/cc in a future CL. BUG=109779 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=117598

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : compile #

Total comments: 34

Patch Set 4 : nduca feedback #

Patch Set 5 : comments #

Patch Set 6 : jar feedback #

Total comments: 8

Patch Set 7 : removed volatile and replaced stdint types #

Patch Set 8 : nits and cleanup #

Total comments: 4

Patch Set 9 : no change -- merge #

Patch Set 10 : win compile #

Unified diffs Side-by-side diffs Delta from patch set Stats (+815 lines, -568 lines) Patch
M base/debug/trace_event.h View 1 2 3 4 5 6 7 24 chunks +403 lines, -310 lines 0 comments Download
M base/debug/trace_event.cc View 1 2 3 4 5 6 7 19 chunks +196 lines, -175 lines 0 comments Download
M base/debug/trace_event_unittest.cc View 1 2 3 4 5 3 chunks +116 lines, -0 lines 0 comments Download
M base/debug/trace_event_win.h View 1 3 chunks +4 lines, -4 lines 0 comments Download
M base/debug/trace_event_win.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M base/test/trace_event_analyzer.h View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -6 lines 0 comments Download
M base/test/trace_event_analyzer.cc View 1 2 3 4 5 6 7 8 7 chunks +86 lines, -70 lines 0 comments Download
M webkit/glue/webkitplatformsupport_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (0 generated)
jbates
nduca: please review jar: base/ OWNERS phajdan: base/test/ OWNERS darin: webkit/ OWNERS
8 years, 11 months ago (2012-01-10 22:15:34 UTC) #1
darin (slow to review)
LGTM for webkit/
8 years, 11 months ago (2012-01-10 23:29:21 UTC) #2
Paweł Hajdan Jr.
base/test OWNER LGTM (but please do a detailed review, I only took a brief look)
8 years, 11 months ago (2012-01-11 07:27:24 UTC) #3
Tom Hudson
I'm not sure I understand the need for this? We didn't have any trouble linking ...
8 years, 11 months ago (2012-01-11 13:24:10 UTC) #4
jbates
On 2012/01/11 13:24:10, Tom Hudson wrote: > I'm not sure I understand the need for ...
8 years, 11 months ago (2012-01-11 18:09:40 UTC) #5
nduca
Looking awesome! http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode164 base/debug/trace_event.h:164: /// Customize these defines to call through ...
8 years, 11 months ago (2012-01-11 21:49:11 UTC) #6
nduca
For webkit, we definitely need this. There, we can't include base/ directly.
8 years, 11 months ago (2012-01-11 21:55:57 UTC) #7
jbates
http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode164 base/debug/trace_event.h:164: /// Customize these defines to call through to platform ...
8 years, 11 months ago (2012-01-11 22:44:35 UTC) #8
jbates
nduca, jar: ptal http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode164 base/debug/trace_event.h:164: /// Customize these defines to call ...
8 years, 11 months ago (2012-01-11 23:52:44 UTC) #9
jar (doing other things)
http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode166 base/debug/trace_event.h:166: #define TRACE_EVENT_NAMESPACE base::debug What does this macro help you ...
8 years, 11 months ago (2012-01-12 00:15:36 UTC) #10
jbates
http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode166 base/debug/trace_event.h:166: #define TRACE_EVENT_NAMESPACE base::debug On 2012/01/12 00:15:36, jar wrote: > ...
8 years, 11 months ago (2012-01-12 00:52:20 UTC) #11
nduca
On 2012/01/11 23:52:44, jbates wrote: > > I think this sounds good, but this is ...
8 years, 11 months ago (2012-01-12 01:41:32 UTC) #12
nduca
LGTM with good doc strings
8 years, 11 months ago (2012-01-12 01:44:17 UTC) #13
jar (doing other things)
The big comment is about volatile. I really suspect this is not working as intended. ...
8 years, 11 months ago (2012-01-12 02:20:03 UTC) #14
joth
just a drive-by... http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h File base/debug/trace_event.h (right): http://codereview.chromium.org/9155024/diff/14001/base/debug/trace_event.h#newcode509 base/debug/trace_event.h:509: static const volatile bool* \ On ...
8 years, 11 months ago (2012-01-12 16:14:46 UTC) #15
jbates
Regarding the macro spam, I do have an idea: we can cut out about 2/3s ...
8 years, 11 months ago (2012-01-12 19:41:29 UTC) #16
nduca
On 2012/01/12 19:41:29, jbates wrote: > Regarding the macro spam, I do have an idea: ...
8 years, 11 months ago (2012-01-12 19:52:42 UTC) #17
Tom Hudson
> I mention stuff about strict-aliasing below in one of my comments, but that's > ...
8 years, 11 months ago (2012-01-12 20:18:12 UTC) #18
jar (doing other things)
http://codereview.chromium.org/9155024/diff/21002/base/debug/trace_event.cc File base/debug/trace_event.cc (right): http://codereview.chromium.org/9155024/diff/21002/base/debug/trace_event.cc#newcode58 base/debug/trace_event.cc:58: volatile bool g_category_enabled[TRACE_EVENT_MAX_CATEGORIES] = { false }; Two things: ...
8 years, 11 months ago (2012-01-12 21:48:43 UTC) #19
jbates
http://codereview.chromium.org/9155024/diff/21002/base/debug/trace_event.cc File base/debug/trace_event.cc (right): http://codereview.chromium.org/9155024/diff/21002/base/debug/trace_event.cc#newcode58 base/debug/trace_event.cc:58: volatile bool g_category_enabled[TRACE_EVENT_MAX_CATEGORIES] = { false }; On 2012/01/12 ...
8 years, 11 months ago (2012-01-12 22:22:11 UTC) #20
jar (doing other things)
IMO, re-usability in C context seems like a weaker reason to avoid style guide suggestions ...
8 years, 11 months ago (2012-01-12 23:41:55 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jbates@chromium.org/9155024/18013
8 years, 11 months ago (2012-01-12 23:43:27 UTC) #22
commit-bot: I haz the power
Try job failure for 9155024-18013 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 11 months ago (2012-01-13 00:01:05 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jbates@chromium.org/9155024/10018
8 years, 11 months ago (2012-01-13 00:41:40 UTC) #24
commit-bot: I haz the power
8 years, 11 months ago (2012-01-13 03:12:48 UTC) #25
Change committed as 117598

Powered by Google App Engine
This is Rietveld 408576698