cc:ing serviceability-dev, since I believe the SA agent is the primary consumer of dynamic symbols in the jvm library.

On 2016-01-21 11:37, Magnus Ihse Bursie wrote:
Hi,

It seems that build_vm_def.sh is broken on macosx. The script lists all from *.o using nm, and filters them using this awk expression:
'{ if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }'

However, the typical output from nm on macosx looks like this:
__ZTV10methodOper
__ZTV11MachNopNode

That is, only a single column, and two leading underscore. The awk expression will fail to match anything, and an empty vm.def will be produced.

If I modify the script to:
'{ if ($1 ~ /^__ZTV/ || $1 ~ /^_gHotSpotVM/) print "\t" $1 }'
then it will match and print these symbols.

The build_vm_def.sh script has not been modified since 2013, so if this ever worked, then most likely the nm output has changed in Xcode at some point.

My main concern here is the new hotspot build. Does this mean that the vm.def fills no purpose on the macosx build, and that the whole process of running nm on all object files can be skipped? Or is this a bug that has not been discovered? If so, it should be fixed in the old build.

Is it really the case that no one cares about the dynamic symbols in libjvm.dylib? If so, we can just skip this code altogether, rather than running a lots of command that seem to have an effect but have none.

/Magnus

Reply via email to