-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: separate trace_event_common from trace_event #10628
Conversation
/cc @jasongin @nodejs/diagnostics @nodejs/v8 I'm happy to remove the copy and directly include it from |
LGTM, certainly an improvement, though I don't know if it's the best approach. @ofrobots do you know why Ideally @matthewloring should also comment on this, but I don't know when he is going to be back at work. |
IIRC it was quite intentional that @matthewloring did not directly include Perhaps we can go with #10623 as the workaround for now and figure out a longer-term solution (this PR or otherwise) once @matthewloring is back. |
#10623 is not a workaround for this issue, it is just a fix for a separate tracing-related bug. |
This change is definitely a step in the right direction. The reason I did not depend on the file directly was to avoid a dependency on a directory outside of |
V8 includes trace_event_common.h here with @ofrobots @fmeawad would it be a good idea for Node to include the "trace_event_common" repo from Chromium directly under |
Conclusion in discussion in Diag WG meeting today is that Node should manage its copy of the trace_event headers however we see fit and not worry about upstream Chromium. V8/Google plan to provide a proper tracing library eventually and when that's ready we can sync with it upstream. |
@joshgav thanks. Does it mean that we should go on with this PR? |
Currently, trace_event.h contains a full copy of the header present in deps/v8/base/trace_event/common/trace_event_common.h mixed with implementation-specific macros. This patch moves the V8 code to its own file and includes it from trace_event.h. The header is also updated to the latest version from V8 5.6.
fde6e01
to
f09c2bc
Compare
Rebased and updated to the latest version from V8 5.6. |
Any updates on this one? |
I'm just waiting for some reviews |
@@ -0,0 +1,1073 @@ | |||
// Copyright 2015 The Chromium Authors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file doesn't need include guards?
|
||
#if defined(TRACE_EVENT0) | ||
#error "Another copy of this file has already been included." | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bnoordhuis It has this ^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but the file you moved that from has traditional include guards. I wondered (and wonder) if there is a reason not to add them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think about that. This is just a copy of the file from V8. Would you like me to add include guards?
LGTM. But it doesn't seem to fix the break noted here (comment), per my testing with this follow-on commit. |
There are likely more changes required to account for updates to the macros in V8 5.7 which just landed on master. I'm currently working to put together a set of steps for updating these macros when V8 is updated. I also have a patch that will fix these files for 5.7. I can post the steps I've been using here or open the patch separately. @targos What would you prefer? |
@matthewloring go ahead and open a PR |
Opened here: #12127 |
Thanks. I'll close this one then. |
Currently, trace_event.h contains a full copy of the header present in
deps/v8/base/trace_event/common/trace_event_common.h mixed with
implementation-specific macros.
This patch moves the V8 code to its own file and includes it from
trace_event.h.
make -j4 test
(UNIX), orvcbuild test
(Windows) passessrc