I've been told That Tom had suggested an alternative fix, I had not seen this
email. But if adding symbols to the mapfiles fixes it, then than seems
easier.

Does adding in the ability to read alternative debuginfo files provide
some additional functionality?

-kto

-------------------------------
Subject:
Re: Request for approval: Allow Java's ELF symtab reader to use separate 
debuginfo files
From:
Tom Rodriguez <thomas.rodrig...@sun.com>
Date:
Fri, 08 Jan 2010 11:54:46 -0800
To:
Andrew Haley <a...@redhat.com>
CC:
hotspot-dev Source Developers <hotspot-...@openjdk.java.net>, 
t...@openjdk.java.net

I think a better fix is to add the required gHotSpot* symbols to the mapfile so that they are always exported. 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?

tom

On Jan 8, 2010, at 10:48 AM, Andrew Haley wrote:

> > On 12/09/2009 03:36 PM, Andrew Haley wrote:
>> >> This is https://bugzilla.redhat.com/show_bug.cgi?id=541548
>> >> The symptom is that jmap doesn't work because target libraries are 
stripped.
>> >> The fix is to allow the symtab reader to use the separate debuginfo files
>> >> that are available for all (AFAIK) GNU/Linux distributions.
> >
> > This is now also https://bugs.openjdk.java.net/show_bug.cgi?id=100126
> >
> > Webrev at http://cr.openjdk.java.net/~aph/100126-hotspot-webrev/
> >
> > I have now checked several Linux distros, old and new, and although
> > they keep their debuginfo files in different places, this patch works
> > on all of them.
> >
> > Is this OK?  And, if so, which repos should I push the patch to?
> >
> > Thanks.
> > Andrew.

Reply via email to