@@ -166,17 +166,18 @@ type hotspotVMData struct {
166166 ConstMethod uint `name:"_constMethod"`
167167 } `name:"Method,methodOopDesc"`
168168 Nmethod struct { // .Sizeof >256
169- Sizeof uint
170- CompileID uint `name:"_compile_id"`
171- MetadataOffset uint `name:"_metadata_offset,_oops_offset"`
172- ScopesPcsOffset uint `name:"_scopes_pcs_offset"`
173- DependenciesOffset uint `name:"_dependencies_offset"` // JDK -22 only
174- ImmutableData uint `name:"_immutable_data"` // JDK 23+ only
175- ImmutableDataSize uint `name:"_immutable_data_size"` // JDK 23+ only
176- OrigPcOffset uint `name:"_orig_pc_offset"`
177- DeoptimizeOffset uint `name:"_deoptimize_offset,_deopt_handler_offset,_deopt_handler_begin"`
178- Method uint `name:"_method"`
179- ScopesDataOffset uint `name:"_scopes_data_offset,_scopes_data_begin"`
169+ Sizeof uint
170+ CompileID uint `name:"_compile_id"`
171+ MetadataOffset uint `name:"_metadata_offset,_oops_offset"`
172+ ScopesPcsOffset uint `name:"_scopes_pcs_offset"`
173+ DependenciesOffset uint `name:"_dependencies_offset"` // JDK -22 only
174+ ImmutableData uint `name:"_immutable_data"` // JDK 23+ only
175+ ImmutableDataSize uint `name:"_immutable_data_size"` // JDK 23+ only
176+ ImmutableDataRefCountOff uint `name:"_immutable_data_ref_count_offset"` // JDK 26+ only
177+ OrigPcOffset uint `name:"_orig_pc_offset"`
178+ DeoptimizeOffset uint `name:"_deoptimize_offset,_deopt_handler_offset,_deopt_handler_begin,_deopt_handler_entry_offset"`
179+ Method uint `name:"_method"`
180+ ScopesDataOffset uint `name:"_scopes_data_offset,_scopes_data_begin"`
180181 } `name:"nmethod,CompiledMethod"`
181182 OopDesc struct {
182183 Sizeof uint
@@ -601,6 +602,11 @@ func (d *hotspotData) newVMData(rm remotememory.RemoteMemory, bias libpf.Address
601602 vms .CodeBlob .RelocationSize = 0
602603 }
603604
605+ // JDK26+: immutable data has a ref count trailer; not present prior to JDK26
606+ if vms .Nmethod .ImmutableDataRefCountOff == ^ uint (0 ) {
607+ vms .Nmethod .ImmutableDataRefCountOff = 0
608+ }
609+
604610 // Check that all symbols got loaded from JVM introspection data
605611 err := forEachItem ("" , reflect .ValueOf (& vmd .vmStructs ).Elem (),
606612 func (item reflect.Value , name string ) error {
0 commit comments