src: internalize v8::ConvertableToTraceFormat
in traces
#57866
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