Request for approval: Allow Java's ELF symtab reader to use separate debuginfo files

Andrew Haley aph at redhat.com
Sat Jan 9 03:03:20 PST 2010


On 01/08/2010 07:54 PM, Tom Rodriguez wrote:

> I think a better fix is to add the required gHotSpot* symbols to the
> mapfile so that they are always exported.

I'm not sure this will work on all GNU/Linux distros, since symtabs
are routinely removed in their entirety from DSOs.  Is there some
logic in the symtab handling to do a look-aside into the dynamic
symtab instead of the symtab?

Also, are these the only symbols that are ever looked up by this
symtab reader?

> This way jmap would work even if the debug symbols for libjvm.so
> weren't installed on the machine.  I actually thought we already did
> this because we explicitly export a few vtbls for use by the SA but
> apparently we don't.  I must have been thinking of windows where you
> have to explicitly export them or they won't show up at all.
> Anyway, adding this to the mapfiles will allow it work as is:
> 
>                 # SA symbols
>                 gHotSpotVMIntConstantEntryArrayStride;
>                 gHotSpotVMIntConstantEntryNameOffset;
>                 gHotSpotVMIntConstantEntryValueOffset;
>                 gHotSpotVMIntConstants;
>                 gHotSpotVMLongConstantEntryArrayStride;
>                 gHotSpotVMLongConstantEntryNameOffset;
>                 gHotSpotVMLongConstantEntryValueOffset;
>                 gHotSpotVMLongConstants;
>                 gHotSpotVMStructEntryAddressOffset;
>                 gHotSpotVMStructEntryArrayStride;
>                 gHotSpotVMStructEntryFieldNameOffset;
>                 gHotSpotVMStructEntryIsStaticOffset;
>                 gHotSpotVMStructEntryOffsetOffset;
>                 gHotSpotVMStructEntryTypeNameOffset;
>                 gHotSpotVMStructEntryTypeStringOffset;
>                 gHotSpotVMStructs;
>                 gHotSpotVMTypeEntryArrayStride;
>                 gHotSpotVMTypeEntryIsIntegerTypeOffset;
>                 gHotSpotVMTypeEntryIsOopTypeOffset;
>                 gHotSpotVMTypeEntryIsUnsignedOffset;
>                 gHotSpotVMTypeEntrySizeOffset;
>                 gHotSpotVMTypeEntrySuperclassNameOffset;
>                 gHotSpotVMTypeEntryTypeNameOffset;
>                 gHotSpotVMTypes;
> 
> Would this be acceptable?

I'll try it and report back.

It seems a bit fragile, in that it depends on having a few magic names
and it won't get tested in the standard build.  I considered this
option but rejected it in favour of fixing the root cause of the
problem, which was that the symtab reader wasn't looking in the right
place.

Having said that, it's nice not to require the debuginfo files.

Andrew.


More information about the hotspot-dev mailing list