Matty's email at 10/12/2007 9:49 PM, said:
> Howdy,
> 
> I am trying to use the Java 6 hotspot provider's object-alloc probe to
> determine where objects are being allocated in an application. When I
> use the attached DTrace script [1], I keep seeing unresolved symbols
> and "couldn't find start" errors in the output:
>               
> libjvm.so`__1cNSharedRuntimeYdtrace_object_alloc_base6FpnGThread_pnHoopDesc__i_+0x7d
>               
> libjvm.so`__1cNSharedRuntimeTdtrace_object_alloc6FpnHoopDesc__i_+0x4f
>               
> libjvm.so`__1cNCollectedHeapbCpost_allocation_setup_common6FnLKlassHandle_pnIHeapWord_I_v_+0x121
>               
> libjvm.so`__1cOtypeArrayKlassIallocate6MipnGThread__pnQtypeArrayOopDesc__+0x19b
>               
> libjvm.so`__1cKoopFactoryNnew_typeArray6FnJBasicType_ipnGThread__pnQtypeArrayOopDesc__+0x2f
>               
> libjvm.so`__1cSInterpreterRuntimeInewarray6FpnKJavaThread_nJBasicType_i_v_+0x33
>               <couldn't find start>
>               java/nio/ByteBuffer.allocate(I)Ljava/nio/ByteBuffer;
>               
> sun/nio/cs/StreamDecoder.<init>(Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/CharsetDecoder;)V
>               
> sun/nio/cs/StreamDecoder.<init>(Ljava/io/InputStream;Ljava/lang/Object;Ljava/nio/charset/Charset;)V
>               
> sun/nio/cs/StreamDecoder.forInputStreamReader(Ljava/io/InputStream;Ljava/lang/Object;Ljava/lang/String;)Lsun/nio/cs/StreamDecoder;
>               0xfb402da7
>               0xfb402f0d
>               0xfb402f0d
>               0xfb402f0d
>               0xfb402da7
>               0xfb402da7
>               0xfb66e4d4
>               0xf7308980
>           4448736
> 
> Does anyone happen to know what is going on here? Without the method
> names leading up to the actual allocations, it is somewhat difficult
> to pinpoint who is keeping the garbage collector busy.
> 
> Thanks for any insight,
> - Ryan

The default buffer size passed the the Java helper is too small. Change 
your jstack() to be something like:

jstack(40,1024)

This gives a 1024 byte buffer. I would not make it arbitrarily large, 
but I have never needed more than 2048 in the hundreds of times I have 
looked at Java apps. That should help you be able to resolve all of the 
symbols (well actually, they are all resolved - just nowhere to put them).

Thanks,

Jarod
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to