-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
trace_events: fix dynamic enabling of trace events #22114
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodejs-github-bot
added
build
Issues and PRs related to build files or the CI.
v8 engine
Issues and PRs related to the V8 dependency.
labels
Aug 3, 2018
jasnell
approved these changes
Aug 4, 2018
Embedder string was bumped twice :) |
ofrobots
force-pushed
the
trace-event-dynamic
branch
from
August 8, 2018 12:30
c154d6f
to
d77cd10
Compare
Original commit message: [tracing] allow dynamic control of tracing If the trace_buffer_ was null, we were returning a pointer to a static flag back that permanently disabled that particular trace point. This implied an assumption that tracing will be statically enabled at process startup, and once it is disabled, it will never be enabled again. On Node.js side we want to dynamically enable/disable tracing as per programmer intent. Change-Id: Ic7a7839b8450ab5c356d85e8e0826f42824907f4 Reviewed-on: https://chromium-review.googlesource.com/1161518 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{nodejs#54903} Refs: v8/v8@bf5ea81
I rebased the PR on top of master. Edit: resumed CI: https://ci.nodejs.org/job/node-test-pull-request/17002/ |
targos
force-pushed
the
trace-event-dynamic
branch
from
September 3, 2018 18:05
d77cd10
to
4dff389
Compare
targos
pushed a commit
that referenced
this pull request
Sep 4, 2018
Original commit message: [tracing] allow dynamic control of tracing If the trace_buffer_ was null, we were returning a pointer to a static flag back that permanently disabled that particular trace point. This implied an assumption that tracing will be statically enabled at process startup, and once it is disabled, it will never be enabled again. On Node.js side we want to dynamically enable/disable tracing as per programmer intent. Change-Id: Ic7a7839b8450ab5c356d85e8e0826f42824907f4 Reviewed-on: https://chromium-review.googlesource.com/1161518 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{#54903} Refs: v8/v8@bf5ea81 PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 4, 2018
PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 5, 2018
Original commit message: [tracing] allow dynamic control of tracing If the trace_buffer_ was null, we were returning a pointer to a static flag back that permanently disabled that particular trace point. This implied an assumption that tracing will be statically enabled at process startup, and once it is disabled, it will never be enabled again. On Node.js side we want to dynamically enable/disable tracing as per programmer intent. Change-Id: Ic7a7839b8450ab5c356d85e8e0826f42824907f4 Reviewed-on: https://chromium-review.googlesource.com/1161518 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{#54903} Refs: v8/v8@bf5ea81 PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 5, 2018
PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
This was referenced Sep 5, 2018
targos
pushed a commit
that referenced
this pull request
Sep 6, 2018
Original commit message: [tracing] allow dynamic control of tracing If the trace_buffer_ was null, we were returning a pointer to a static flag back that permanently disabled that particular trace point. This implied an assumption that tracing will be statically enabled at process startup, and once it is disabled, it will never be enabled again. On Node.js side we want to dynamically enable/disable tracing as per programmer intent. Change-Id: Ic7a7839b8450ab5c356d85e8e0826f42824907f4 Reviewed-on: https://chromium-review.googlesource.com/1161518 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Ali Ijaz Sheikh <ofrobots@google.com> Cr-Commit-Position: refs/heads/master@{#54903} Refs: v8/v8@bf5ea81 PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Sep 6, 2018
PR-URL: #22114 Reviewed-By: James M Snell <jasnell@gmail.com>
This was referenced Sep 6, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
V8 was assuming that trace-events can only be enabled at startup and, once disabled, will never be enabled again. In Node.js we have a lot more dynamic control over tracing. Fix bug upstream.
This PR back ports the fix and adds a test. This can be floated until (if) this is merged upstream.
/cc @nodejs/trace-events @nodejs/v8-update
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesV8-CI: https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1570/
CI: https://ci.nodejs.org/job/node-test-pull-request/16180/