Robert Alatalo
2011-Jul-04 19:42 UTC
[dtrace-discuss] Question about application supplied probes and tracking the impact
Hello, Java 1.6 prior to 1.6.0_22 (though I think it may have been fixed in a later version) when they switched to demand loading of their probes can cause performance problems if they are running many Java processes of one of the earlier 1.6 versions. The question I am trying to answer is how much of a problem this may actually be in an individual case. Initially I thought it should be easy just count the number of times probes are registered and when they are cleared, not nearly as easy as I had hoped. Using the simple test of running java -version and stopping the process with ctrl-Z or truss -Texit and can see: $ ./jdk1.6.0_10/bin/java -version ^Z [1]+ Stopped ./jdk1.6.0_10/bin/java -version # /usr/sbin/dtrace -lf '':lib*:'' | wc -l 515 $ ./jre1.6.0_26/bin/java -version ^Z # /usr/sbin/dtrace -lf '':lib*:'' ID PROVIDER MODULE FUNCTION NAME dtrace: failed to match :lib*::: No probe matches description I think I have managed to track when the helpers are copies or removed, but I can''t think of any easy way to record when they are registered with Dtrace and I am confused a little as to which version of java used lazy loading because some of my testing seem to perplex me, so I am hoping for some help from the alias. Here is what I have so far for my Dtrace script. $ cat dtrace_helpers.d #!/usr/sbin/dtrace -qs fbt:genunix:exec_args:entry, fbt:genunix:proc_exit:entry { printf("Dtrace probes %s de-listed by %s for %s ( %d )\n", \ ((proc_t *)(curpsinfo->pr_addr))->p_dtrace_helpers == 0 ? "NOT" : "ARE", \ probefunc , execname , pid ); } fbt:genunix:cfork:entry { printf("Dtrace probes listing %s copied by %s from %s ( %d )\n", \ ((proc_t *)(curpsinfo->pr_addr))->p_dtrace_helpers == 0 ? "NOT" : "ARE", \ probefunc , execname , pid ); } /* end */ Thanks in advance for any help, Robert
Keith McGuigan
2011-Jul-05 12:56 UTC
[dtrace-discuss] Question about application supplied probes and tracking the impact
On Jul 4, 2011, at 3:42 PM, Robert Alatalo wrote:> I think I have managed to track when the helpers are copies or > removed, but I can''t think of any easy way to record when they are > registered with Dtrace > and I am confused a little as to which version of java used lazy > loading because > some of my testing seem to perplex me, so I am hoping for some help > from the alias.Lazy loading was added to hotspot in jdk 1.6.0u25. -- - Keith