Red Hat Bugzilla – Bug 474666
[LTC 5.4 FEAT] Java Support support for OProfile 
Last modified: 2011-01-24 18:35:46 EST
Emily J. Ratliff <firstname.lastname@example.org> -
1. Feature Overview:
Feature Id: 
a. Name of Feature: Java Support support for OProfile
b. Feature Description
Provide infrastructure to profile Java programs running inside a JVM.
2. Feature Details:
Arch Specificity: Purely Common Code
Delivery Mechanism: Direct from community
Request Type: Toolchain - Enhancement from Upstream
d. Upstream Acceptance: Accepted
Sponsor Priority 1
f. Severity: High
IBM Confidential: no
Code Contribution: IBM code
g. Component Version Target: oProfile 0.9.4 (or later)
3. Business Case
Most IBM Middleware use the IBM JVM. Having good support for profiling Java programs is an important
feature for developing and deploying enterprise server middleware software.
4. Primary contact at Red Hat:
5. Primary contacts at Partner:
Project Management Contact:
Michael Hohnbaum, email@example.com, 503-578-5486
Steven Munroe, firstname.lastname@example.org
Maynard Johnson, email@example.com
Alexander Johnson, firstname.lastname@example.org
Support for profiling Java code with OProfile is now included in OProfile 0.9.4, available at:
Note that special build instructions are required to enable this Java support. Please see the README_PACKAGERS file in the oprofile root directory for new RPM build instructions.
Also, Will Cohen built an RPM for Fedora and posted a link to it on the
oprofile-list. Here's the URL to that oprofile-list posting:
If you follow the link to the Fedora RPM, you'll see a src rpm that you can
download. I've done a test rpmbuild of that src rpm and it seems to work correctly on a RHEL 5 system.
NOTE: I don't think the spec file contained in this src rpm supports the notion of bi-arch -- that is, building both 32-bit and 64-bit libraries. Since OProfile 0.9.4 includes libraries for the first time (i.e., JIT agent libraries need at runtime for JIT profiling), please be sure to build both 32-bit and 64-bit RPMs.
Also, please build/configure OProfile using a JDK 1.5 in order to build both JVMPI and JVMTI agent libraries.
Thank you for your support.
IBM is signed up to test and provide feedback.
Hello, Red Hat,
In today's eSDT call between IBM and Red Hat, I explained that both my ppc64 team and the IBM Cell team had unknowingly opened RHEL 6 feature requests for OProfile. Both of these requests would be satisfied by shipping OProfile 0.9.4 release in RHEL 6. But now, the Cell team will no longer be pushing for Cell support in RHEL 6. They have quit their feature and intend to close their bug. However, this ppc64 bug (RH474666) will remain open as our feature request is still valid. I just wanted to clarify the situation to make sure there's no confusion. Are there any actions needed on the RH side to reflect this situation? I see that the external target milestone is "alpha", so that's a good sign.
For reference, the Cell team's feature request that was quit was:
"[LTC 6.0 FEAT] 201605:Update of oprofile to 0.9.4 (or later) in RHEL6"
The Red Hat bugzilla opened for that feature was RH462955, and the IBM bugzilla was 48083.
Sigh. . . Please disregard my previous comment since it was made under the mistaken assumption that this is a RHEL 6 feature bugzilla instead of RHEL 5.4 Sorry for the confusion.
This enhancement request was evaluated by the full Red Hat Enterprise Linux
team for inclusion in a Red Hat Enterprise Linux minor release. As a
result of this evaluation, Red Hat has tentatively approved inclusion of
this feature in the next Red Hat Enterprise Linux Update minor release.
While it is a goal to include this enhancement in the next minor release
of Red Hat Enterprise Linux, the enhancement is not yet committed for
inclusion in the next minor release pending the next phase of actual
code integration and successful Red Hat and partner testing.
java-1.6.0-openjdk is only available for i386 and x86_64 machines. This presents a problem building java enabled oprofile for s390, ia64, and ppc. May need to limit java support to i386 and x86_64.
------- Comment From email@example.com 2009-04-21 15:57 EDT-------
Why not use the IBM JDK off of extras.
I asked about the IBM jdk and it isn't available in the build system's build roots. java-1.6.0-openjdk was released in RHEL-5.3 and is available in the i386 and x86_64 buildroots. thus, packages dependent on java are only built for i386/x86_64.
------- Comment From firstname.lastname@example.org 2009-04-21 17:57 EDT-------
Will, in fact, the only thing that's needed at build-time for oprofile is the header files -- jvmti.h and jmvpi.h. So all you need to do is create some dummy <jdk-dir> and an "include" dir underneath it; then copy the two header files from any JDK 1.5 into the include dir. Then when you invoke oprofile's configure, use '--with-java=<jdk-dir>. Providing both the jvmpi.h and jvmti.h will result in both JVMPI and JVMTI oprofile libraries being built and installed. That way, if a user wanted to install their own JDK, we'd be covered with both the older and newer interfaces.
I was thinking about this approach also. The question is where to find appropriate jvmti.h and jvmpi.h files. They need to have a compatible license (gpl v2) so they can be included in the oprofile source.
------- Comment From email@example.com 2009-04-22 15:16 EDT-------
The source code for the JVMTI agent library that #includes jvmti.h (agents/jvmti/libjvmti_oprofile.c) states that it's distributed under LGPL, so we should be OK on that one, no matter what JDK you build with. Unfortunately, the JVMPI agent library source code (agenst/jvmpi/jvmpi_oprofile.cpp) does not have the same LGPL statement. This was an oversight of mine when I contributed that code. I will work with the community to change the license for that file. Then, I think that should resolve your licensing concerns. Right?
Oprofile 0.9.4-7 has been built to address this bug.
~~ Attention Partners RHEL 5.4 Partner Alpha Released! ~~
RHEL 5.4 Partner Alpha has been released on partners.redhat.com. There should
be a fix present that addresses this particular request. Please test and report back your results here, at your earliest convenience. Our Public Beta release is just around the corner!
If you encounter any issues, please set the bug back to the ASSIGNED state and
describe the issues you encountered. If you have verified the request functions as expected, please set your Partner ID in the Partner field above to indicate successful test results. Do not flip the bug status to VERIFIED. Further questions can be directed to your Red Hat Partner Manager. Thanks!
------- Comment From firstname.lastname@example.org 2009-06-22 17:46 EDT-------
Hello, Will. I tested the oprofile JIT support on RHEL 5.4. I installed the IBM 1.5 JRE (java-1.5.0-ibm-18.104.22.168-1jpp.3.el5.ppc.rpm) and successfully profiled a Java app using the -agentlib:jvmti_oprofile option. Thank you! However, I found I was unable to do Java profiling when using the 64-bit IBM JRE (java-1.5.0-ibm-22.214.171.124-1jpp.3.el5.ppc64.rpm). This is due to the fact that the oprofile-jit package was not built for both 32-bit and 64-bit libraries. Can we get the 64-bit libraries built, too?
Also, we had a conversation back in April (see comments in this bugzilla) about the JVMPI agent library source code (agenst/jvmpi/jvmpi_oprofile.cpp) not
having the LGPL statement. I fixed that upstream, but neglected to post a patch to this bugzilla so you could go ahead and build the JVMPI oprofile agent library as we discussed. I've attached that patch now. Can you integrate that with your oprofile package and build the JVMP library, too?
Created attachment 349007 [details]
Patch to change JVMPI agent lib source code to LGPL
------- Comment (attachment only) From email@example.com 2009-06-22 17:44 EDT-------
~~ Attention - RHEL 5.4 Beta Released! ~~
RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!
If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.
Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.
Questions can be posted to this bug or your customer or partner representative.
------- Comment From firstname.lastname@example.org 2009-07-06 11:51 EDT-------
Hello, Red Hat. I posted some comments about the OProfile package back on June 22. I've not seen a response to those comments yet, so I'm wondering whether or not oprofile got updated (as a result of those comments) in the latest RHEL 5.4 beta. Thank you.
IBM, this is correct. oprofile was not updated to include the additional change you requested. It should be included though at a later point. At this moment, its hard to say exactly when though. We will update this bugzilla with more information when we get it.
For comment #21 As part of the RHEL build, ppc64 versions of the packages are built. There is a ppc64 version of oprofile-jit. However, it is not included in the distribution for ppc in RHEL. It looks like the oprofile-jit for ppc64 will need to be added to the distribution. However, I need to verify that is the complete fix for the problem today.
Will add the appropriate patch to correct the license in #22.
In reference to comment #22. Do the additional comments need to be include and the package respun for these comments? None of the binaries rpms include agents/jvmpi/jvmpi_oprofile.cpp.
------- Comment From email@example.com 2009-07-07 16:32 EDT-------
(In reply to comment #27)
> In reference to comment #22. Do the additional comments need to be include and
> the package respun for these comments? None of the binaries rpms include
Our gcc team leader says that comments in source code won't be seen in the binary. So from a legal standpoint, it's probably not necessary to rebuild the package. But I would rebuild it anyway, if only so the line numbers match if a user were to ever need to use gdb on that library (assuming debuginfo were made available). Of course, the patched file should be included in the src rpm.
------- Comment From firstname.lastname@example.org 2009-07-17 09:50 EDT-------
Hi Red Hat - any update on when the code for this feature will be include in a snapshot?
Scheduled for Snapshot 3.
------- Comment From email@example.com 2009-07-30 14:53 EDT-------
Hello, Red Hat. I examined the oprofile-jit rpms for RHEL 5.4 snap4. I found that one of the two issues I brought to your attention in my June 22 comment has been fixed -- adding an oprofile-jit.ppc64 rpm with 64-bit JIT agent libraries. However, the other problem -- no JVMPI agent library -- has not been resolved. On July 7, Will Cohen indicated that this problem would be addressed, but I'm guessing something was missed in the build. Can you please resolve this for the next beta?
Thanks for your support.
It's getting very late into the release cycle. Chances are lowered daily with
regard to our ability to commit new code into 5.4. Speak with your Partner
Manager for more details about the schedule particulars.
At this phase, we are excepting only release blocker items. Therefore, if you
feel this item must be fixed in RHEL 5.4 as originally planned, it is vital
that you provide a business justification for blocker status as soon as
Otherwise, this request will need to be deferred to RHEL 5.5. Please clone this bug and describe the issues encountered in detail.
Thank you for your understanding and expedited response. We are sorry for
any inconvenience this might cause.
The way that the Red Hat build system works complicates this a bit. The packages put through the build system need to be buildable with open source packages. Many of the java packages are not open source. The build system has java openjdk available for only x86 platforms. The work around for this was to include header files from a GPL compatible java in oprofile, then oprofile can be built on the various platforms (ppc, s390, etc). However, the headers included with the oprofile source were from java-1.6.0-opendjdk-1.6.0. java 1.6.0 only includes support for JVMTI. Need to find similar java 1.5.0 that have support for both JVMTI and JVMPI.
------- Comment From firstname.lastname@example.org 2009-07-31 11:56 EDT-------
A defect has been opened for this problem: 55195 - RIT324892- JVMPI agent library missing from oprofile-jit rpm
JVMPI has been deprecated for quite some time. The following article from July 1, 2004 and May 2004:
JVMTI is supported on JDK 5 and newer. Are there a significant number of people using JDK 4 (or older) on RHEL5? Is IBM still supporting JDK 4?
------- Comment From email@example.com 2009-08-03 14:40 EDT-------
Closing this bugzilla with the caveat that there is still a missing piece to this feature -- a JVMPI agent library of oprofile. That problem is being handled via LTC bug # 55195 ( RIT324892 ).
> JVMTI is supported on JDK 5 and newer. Are there a significant number of people
> using JDK 4 (or older) on RHEL5? Is IBM still supporting JDK 4?
From IBM's point of view, the main group of people who still use JDK 4 are the SAP customers. Our SWG products have all moved away from JDK 4, but the SAP customers have not. In fact, that is why both Red Hat and IBM are still supporting JDK 4.
IBM should clone this bug and then request for JDK 4 support for RHEL 5.5
We will not block RHEL 5.4 for this feature request. We will consider adding JDK 4 support to oprofile in RHEL 5.5
Oprofile in RHEL 5.4 will support JDK 5 and JDK 6.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
------- Comment From firstname.lastname@example.org 2009-09-02 09:35 EDT-------
(In reply to comment #42)
> An advisory has been issued which should help the problem
> described in this bug report. This report is therefore being
> closed with a resolution of ERRATA. For more information
> on therefore solution and/or where to find the updated files,
> please follow the link below. You may reopen this bug report
> if the solution does not work for you.
This link is broken.
------- Comment From email@example.com 2009-09-02 10:34 EDT-------
(In reply to comment #43)
> (In reply to comment #42)
> > An advisory has been issued which should help the problem
> > described in this bug report. This report is therefore being
> > closed with a resolution of ERRATA. For more information
> > on therefore solution and/or where to find the updated files,
> > please follow the link below. You may reopen this bug report
> > if the solution does not work for you.
> > http://rhn.redhat.com/errata/RHBA-2009-1322.html
> This link is broken.
The link works now.