-
Notifications
You must be signed in to change notification settings - Fork 291
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
Various fixes to node/V8 #333
base: main
Are you sure you want to change the base?
Conversation
interpreter/nodev8/v8.go
Outdated
// that manually here. | ||
vms.ScopeInfo.HeapObject = true | ||
} | ||
if d.version >= v8Ver(12, 5, 0) && !vms.DeoptimizationData.FixedArray && !vms.DeoptimizationData.TrustedFixedArray { |
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.
Can you also update the list of supported versions near the start of the file?
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.
Done
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.
There's few lint errors that should be fixed, otherwise LGTM
0820df7
to
7716075
Compare
@@ -414,9 +425,20 @@ type v8Data struct { | |||
Flags uint16 `name:"flags__uint32_t"` | |||
} | |||
|
|||
DeoptimizationData struct { |
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.
Can you add a link to the origin of this struct? Similar to the other structs above?
Also please for SourcePositionTable
and SharedFunctionInfoWrapper
.
@@ -1877,6 +1932,26 @@ func (d *v8Data) readIntrospectionData(ef *pfelf.File, syms libpf.SymbolFinder) | |||
} | |||
|
|||
// Add some defaults when needed | |||
if d.version >= v8Ver(11, 9, 0) { | |||
// the class hierarchy changed: HeapObject no longer | |||
// derives from Object. This confuses gen-postmortem-metadata.py |
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.
Neat script - maybe we should name it more prominently somewhere to help people dig into this unwinder.
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.
We do mention it in the main comment at the top of the file: https://github.com/open-telemetry/opentelemetry-ebpf-profiler/blob/44a0c25/interpreter/nodev8/v8.go#L28-L33
as well as various other places throughout v8.go
This PR brings us up to date with the latest origin/main of Node.