-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
src: internalize v8::ConvertableToTraceFormat
in traces
#57866
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
Open
legendecas
wants to merge
1
commit into
nodejs:main
Choose a base branch
from
legendecas:perfetto/traced-value
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
jasnell
approved these changes
Apr 13, 2025
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
f5c59b2
to
1a1951f
Compare
I can not reproduce the windows test failure locally. Trying to rebase on top of the main branch and trigger a CI run again. |
`v8::ConvertableToTraceFormat` is only available in legacy V8 tracing API and no longer supported in perfetto. This internalize `node::tracing::TracedValue` and `v8::ConvertableToTraceFormat` by defining specialized trace argument classes. The newly defined structured trace argument classes can be easily converted to `perfetto::TracedValue` by perfetto traced value protocol. For example, when adding perfetto support, `CastTracedValue` will be a no-op and these classes can add a new conversion method like: ```cpp class Foo { void WriteIntoTrace(TracedValue context) const { auto dict = std::move(context).WriteDictionary(); dict->Add("key", 42); dict->Add("foo", "bar"); dict->Add("member", member_); } }; ```
1a1951f
to
596fd86
Compare
Rebased with #57987 to fix linter errors. |
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::ConvertableToTraceFormat
is only available in legacy V8 tracingAPI and no longer supported in perfetto. This internalize
node::tracing::TracedValue
andv8::ConvertableToTraceFormat
bydefining specialized trace argument classes.
Using the new format in traces be like:
The newly defined structured trace argument classes can be easily
converted to
perfetto::TracedValue
by perfetto traced value protocol.For example, when adding perfetto support,
CastTracedValue
will be ano-op and these classes can add a new conversion method like:
Refs: nodejs/diagnostics#654
Refs: https://github.com/google/perfetto/blob/9ddf987d48cdfd9129987a3af1e85052c377756f/include/perfetto/tracing/traced_value.h#L46