From: Maynard J. <may...@us...> - 2008-06-27 20:01:17
|
William Cohen wrote: > Maynard Johnson wrote: > >> William Cohen wrote: >> >>> Maynard Johnson wrote: >>> >>> >>>> William Cohen wrote: >>>> >>>> >>> >>> >>>>> What happens when someone has multiple JITs on the machine and >>>>> oprofile is configured for a particular one? Oprofile is always going >>>>> to use the one used for the build? Might be an issue if someone puts >>>>> in a newer version on the machine and oprofile isn't rebuilt. >>>>> >>>>> >>>> The Java agent libraries support a particular API. So, if you specify a >>>> JDK version 1.5 via the '--with-java' configure option, both JVMPI and >>>> JVMTI agent libraries are built. (JVMPI was deprecated in Java 1.5 and >>>> removed in 1.6.) During profiling, you can use any JVM version that >>>> supports the API of the agent library, as long as that JVM is the same >>>> bitness as the agent library. On bi-arch machines, there may be both >>>> bitness versions of the JVM that can be installed by the user. So it >>>> would be recommended to build oprofile both ways (e.g., 32-bit and >>>> 64-bit). This is another reason for putting the libopagent and the Java >>>> agent libraries in a separate package, since it's only the libraries >>>> (which are used by the JVM) that need both bitness versions. (I think >>>> that's another tip I should put in the README_PACKAGERS file.) >>>> >>>> Thanks! >>>> >>>> -Maynard >>>> >>>> >>>>> -Will >>>>> >>>>> >>> Hi Maynard, >>> >>> Been looking at the OProfile spec file a bit more. Only found jvmti.h for fedora >>> 9 this in java-1.6.0-openjdk-devel. I looked for jvmpi.h; couldn't find >>> anything. Not surprising given there doesn't appear to be a java-1.5.0 based >>> >>> >> Yes, that's as expected. >> >>> version. Are all the jvm interoperable for jvmti.h and jvmpi.h? Trying to figure >>> out if the resulting oprofile is going to work for all 1.6-based jvms, or just >>> the one the oprofile is built against. >>> >>> >> JVMTI agent library can be used with any JVM 1.5 or greater. The caveat >> is that if the JVM is, say, 64-bit, then the must be a 64-bit JVMTI >> agent library availalble. Likewise, if the JVM is 32-bit, then a 32-bit >> JVMTI agent lib is needed. That's why I mentioned above that for >> bi-arch systems, the packager would probably want to package the >> libopagent and agent libraries (libjvm[t | p]i_oprofile) in a separate >> package and build twice -- once as 32-bit and a second time as 64-bit. >> >>> With the shared libraries I would think that an entry would be needed for >>> /etc/ld.conf.d and /sbin/ldconfig would need to be run in %post %postun. >>> >>> >> I don't have any real-life experience in packaging rpms, so I hadn't >> thought about this. Good catch. That's another tip to add to the >> README_PACKAGERS file. :-) >> >>> Did you verify that the shared library from the rpm was the one being used when >>> testing things out? It could be possible that another copy elsewhere on the >>> machine was being used. >>> >>> >> I was just manually setting the session's LD_LIBRARY_PATH. >> >> -Maynard >> >>> -Will >>> > > Hi Maynard, > > I took another pass at generating the rpm based on oprofile 0.9.4rc2. I put some > stuff to avoid people having to manually set LD_LIBRARY_PATH. The current > version of the source rpm is at: > > http://people.redhat.com/wcohen/oprofile-0.9.4rc2-7.fc9.src.rpm > > This may be a silly question, but how does one get profiling data on a java > program using a jit? There doesn't seems to be a manpage for /usr/bin/opjitconv. > Are there instructions some where for profiling java/jit programs? > Not a silly question at all. Actually, opjitconv is not a user-runnable program, so that's why there's no man page. The doc/oprofile.html file has some new and updated sections on building/installing/profiling with the new JIT support. Additionally, there's a new manual (doc/op-jit-devel.html) that describes how third parties can leverage the JIT support to build agent libraries for other JIT virtual machines. Both of these HTMLs are in the oprofile-0.9.4-rc2 tar ball. Regards, -Maynard > -Will > > |