Bug 463223 - [LTC 6.0 FEAT] 200979:Java Support support for OProfile
[LTC 6.0 FEAT] 200979:Java Support support for OProfile
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: oprofile (Show other bugs)
6.0
ppc64 All
medium Severity high
: alpha
: 6.0
Assigned To: William Cohen
: FutureFeature, Reopened
: 462955 606308 (view as bug list)
Depends On: 566042 594492
Blocks: 356741 554559
  Show dependency treegraph
 
Reported: 2008-09-22 12:50 EDT by IBM Bug Proxy
Modified: 2010-11-15 09:34 EST (History)
9 users (show)

See Also:
Fixed In Version: oprofile-0.9.6-5.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-15 09:34:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 48135 None None None Never

  None (edit)
Description IBM Bug Proxy 2008-09-22 12:50:40 EDT
=Comment: #0=================================================
Emily J. Ratliff <emilyr@us.ibm.com> - 2008-09-16 18:24 EDT
1. Feature Overview:
Feature Id:	[200979]
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:
Sponsor:	PPC
Architectures:
ppc64

Arch Specificity: Purely Common Code
Delivery Mechanism: Direct from community
Category:	Toolchain
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: 
John Jarvis
jjarvis@redhat.com

5. Primary contacts at Partner:
Project Management Contact:
Michael Hohnbaum, hbaum@us.ibm.com, 503-578-5486

Technical contact(s):
Steven Munroe, sjmunroe@us.ibm.com
Maynard Johnson, mpjohn@us.ibm.com

IBM Manager:
Alexander Johnson, acjohnso@us.ibm.com
Comment 1 Bill Nottingham 2008-10-01 16:48:49 EDT
Given the versioning requirements, marking as a duplicate of another IBM LTC feature.

*** This bug has been marked as a duplicate of bug 462955 ***
Comment 2 John Jarvis 2009-02-09 14:09:24 EST
Reopening due to BZ 462955 being quit
Comment 3 John Jarvis 2009-02-09 17:16:54 EST
*** Bug 462955 has been marked as a duplicate of this bug. ***
Comment 4 William Cohen 2009-09-23 09:22:59 EDT
OProfile 0.9.5 does have support for Java. Will need to do the same trick in RHEL 5 to allow oprofile java support on platforms don't build openjdk on. That is bundle a few of the java header files in the srpm.
Comment 5 William Cohen 2009-12-17 09:51:19 EST
oprofile-0.9.6-4.el6 has been built for RHEL 6. This bugzilla entry should be
addressed by that build.
Comment 7 IBM Bug Proxy 2010-01-11 19:42:43 EST
This bugzilla can be closed as Red Hat has indicated it is a duplicate of LTC bug 48083 (RH # 462955).

*** This bug has been marked as a duplicate of bug 48083 ***
*** Bug 48083 has been marked as a duplicate of this bug. ***

------- Comment From halves@linux.vnet.ibm.com 2009-11-26 11:28 EDT-------
Hello Team,

I ran this test on RHEL6-20091110 with IBM JVM 1.6, IBM JVM 1.5 and IBM JVM 1.4 and got the following results:

ibm jvm 1.6 ppc - pass
ibm jvm 1.6 ppc64 - pass

ibm jvm 1.5 ppc - pass
ibm jvm 1.5 ppc64 - pass

ibm jvm 1.4 ppc - not supported
ibm jvm 1.4 ppc64 - not supported

Regards,

Higor

------- Comment From mpjohn@us.ibm.com 2009-11-30 18:42 EDT-------
Hi, Will.  As you can see from Higor's Nov 26 comment, the oprofile package does not have support for Java 1.4.  This is because a libjvmpi_oprofile.so library is not included in the oprofile package, which was most likely caused by not having a jvmpi.h file available when configure was run.  (By the way, this is the same issue as in RIT bug #352746, originally reported in RIT #324892.)

I realize that Java 1.4 is pretty old now, but it's still used by certain apps.  Repeating a comment from 324892:

"SAP still uses 1.4.2 and is supported for IBM customers.  There are also some
quantity of IBM customers that are still using applications built on 1.4.2.
Not providing the JVMPI agent will prevent these customers from being able to
use oprofile.  oprofile is an important tool for identifying problems that
arise when older software is moved to newer OS releases."

Can we get the oprofile package for RHEL 6 rebuilt to include both JVMPI and JVMTI support?  Thanks!
Comment 9 IBM Bug Proxy 2010-04-27 15:52:53 EDT
------- Comment From mpjohn@us.ibm.com 2010-04-27 15:30 EDT-------
There are a couple problems with oprofile regarding the Java profiling support.  First, there's only the oprofile-jit-0.9.6-4.el6.ppc64 and no oprofile-jit-0.9.6-4.el6.ppc (i.e., no 32-bit RPM).  Secondly (and more critically), the oprofile-jit package contains only libopagent, whereas it should also include libjvmti_oprofile (for JVMTI support) and libjvmpi_oprofile (for JVMPI support).
Comment 10 John Jarvis 2010-05-07 15:30:16 EDT
Flipping back to ASSIGNED to get a review of the problems IBM discovered.
Comment 11 William Cohen 2010-05-07 19:03:51 EDT
The need for 32-bit ppc support makes sense. There should be 32-bit oprofile-jit rpms for java support. When the rpms were built earlier they could not be built for s390 and ppc. However, they can be built now. It is possible to rebuild oprofile with 32-bit versions. The 32-bit oprofile-jit rpm will need to be added to the RHEL-6 composes.

The lack of jvmpi support due to how oprofile is built in the Red Hat build system.

The jvmpi is a very old interface in java. There two reasons for not including the jvmpi interface in the RHEL-6 oprofile:

1) jvmpi is deprecated for well over 5 years (will be 6 years July 2010)
http://java.sun.com/developer/technicalArticles/Programming/jvmpitransition/

2) The open source java available in the Red Hat build systems do not have the jvmpi interface. The oprofile package includes the needed headers from the java-1.6.0-openjdk avoid having a dependency on java environment.

To get the jvmpi support would require a java/headers that has jvmpi support, The Red Hat build system doesn't have a version of java that has jvmpi. Copying of the java headers was allowable because of the licensing of java-1.6.0-openjdk. However, proprietary java implementation licenses probably won't allow that.
Comment 12 IBM Bug Proxy 2010-05-13 14:31:22 EDT
------- Comment From mpjohn@us.ibm.com 2010-05-13 14:23 EDT-------
(In reply to comment #21)
> The need for 32-bit ppc support makes sense. There should be 32-bit
> oprofile-jit rpms for java support. When the rpms were built earlier they could
> not be built for s390 and ppc. However, they can be built now. It is possible
> to rebuild oprofile with 32-bit versions. The 32-bit oprofile-jit rpm will need
> to be added to the RHEL-6 composes.

My apologies for not responding before now.  Thank you for your response that you will provide 32-bit support.
>
> The lack of jvmpi support due to how oprofile is built in the Red Hat build
> system.

OK, for customers that *really* need it, we'll provide it by some alternative means.

Thanks.
-Maynard

>
> The jvmpi is a very old interface in java. There two reasons for not including
> the jvmpi interface in the RHEL-6 oprofile:
>
> 1) jvmpi is deprecated for well over 5 years (will be 6 years July 2010)
> http://java.sun.com/developer/technicalArticles/Programming/jvmpitransition/
>
> 2) The open source java available in the Red Hat build systems do not have the
> jvmpi interface. The oprofile package includes the needed headers from the
> java-1.6.0-openjdk avoid having a dependency on java environment.
>
> To get the jvmpi support would require a java/headers that has jvmpi support,
> The Red Hat build system doesn't have a version of java that has jvmpi. Copying
> of the java headers was allowable because of the licensing of
> java-1.6.0-openjdk. However, proprietary java implementation licenses probably
> won't allow that.
Comment 13 William Cohen 2010-05-13 17:36:38 EDT
Tweaked the oprofile.spec and rebuilt oprofile to include a ppc version, so there is a 32-bit version of the java instrumentation. Will still need to get the oprofile-jit rpm included in the compose for RHEL-6
Comment 14 IBM Bug Proxy 2010-05-20 14:03:49 EDT
------- Comment From mpjohn@us.ibm.com 2010-05-20 13:51 EDT-------
(In reply to comment #23)
> Tweaked the oprofile.spec and rebuilt oprofile to include a ppc version, so
> there is a 32-bit version of the java instrumentation. Will still need to get
> the oprofile-jit rpm included in the compose for RHEL-6
Will, we got snap 4 today, so I took a look to see if the problems I pointed out have been fixed yet.  Unfortunately, there's still only a 64-bit oprofile-jit rpm, and that rpm still only has libopagent in it (i.e. no libjvmti_oprofile).  Is this expected?  Was this going to be fixed in something later than snap 4?  Thanks.
Comment 15 William Cohen 2010-05-20 16:27:45 EDT
A bugzilla entry has been made for releng to add the 32-bit ppc oprofile-jit rpm to the ppc64 compose. That should address the issue of collecting profiling data from 32-bit JVMs.

The jvmpi support is not going to be added as mentioned in comment #11.
Comment 16 IBM Bug Proxy 2010-05-28 10:02:11 EDT
------- Comment From mpjohn@us.ibm.com 2010-05-28 09:52 EDT-------
I was glad to see that beta 1 snap5 contains both a 32-bit and 64-bit oprofile-jit rpm.  Unfortunately, both of them still only have libopagent in it (i.e. no
libjvmti_oprofile library).
Comment 17 IBM Bug Proxy 2010-06-07 10:21:55 EDT
------- Comment From mpjohn@us.ibm.com 2010-06-07 10:18 EDT-------
Will, I see there's no change to oprofile in snap6.  Do you have a target date for when the oprofile-jit packages will be updated to include libjvmti_oprofile?  Thanks.
Comment 18 William Cohen 2010-06-07 12:09:41 EDT
I tracked the problem down to a missing "-a1" on the %setup. The oprofile-0.9.6-6 has been built with the fix.

Still need to address the /usr/share/oprofile/stl.pat. The differs between ppc and ppc64 (same also on s390). This file is part of the oprofile rpm, so one might make the argument that only one version be installed. However, still should avoid files that are differ due to arch in /usr/share.
Comment 19 IBM Bug Proxy 2010-06-07 14:21:03 EDT
------- Comment From mpjohn@us.ibm.com 2010-06-07 14:14 EDT-------
(In reply to comment #28)
> I tracked the problem down to a missing "-a1" on the %setup. The
> oprofile-0.9.6-6 has been built with the fix.
That's great!
>
> Still need to address the /usr/share/oprofile/stl.pat. The differs between ppc
> and ppc64 (same also on s390). This file is part of the oprofile rpm, so one
> might make the argument that only one version be installed. However, still
> should avoid files that are differ due to arch in /usr/share.
I agree.  I've seen your posting to oprofile-list on this subject, but haven't had time to delve into it yet.  But for now with RHEL 6, I propose doing what's always been done (and what seems to work) -- just install the primary arch version of the file.
Comment 23 William Cohen 2010-06-21 08:57:39 EDT
*** Bug 606308 has been marked as a duplicate of this bug. ***
Comment 24 IBM Bug Proxy 2010-06-23 03:40:55 EDT
------- Comment From mgrf@de.ibm.com 2010-06-23 03:36 EDT-------
(In reply to comment #32)
> *** Bug 606308 has been marked as a duplicate of this bug. ***

Since this bug is a feature request and the DUPed BZ is a problem report
I post it here as reference.
LTC 65221 - RH606308 - oprofile-jit: libjvmti_oprofile.so is not built

Red Hat please confirm that beside the fix in oprofile-0.9.6-6, that  has been built with the fix. also the part in  /usr/share/oprofile/stl.pat. is resolved.

The last comment from the DUPed bug as reference
- the comment did not mirror to Red Hat because the RHBZ is already closed
DUP.

Description of problem:

The libjvmti_oprofile.so is not built and packaged in the oprofile-jit package.
Without the libjvmti_oprofile.so library, performance profiling is not
available for Java programs.

The lib is not built because the in the %prep section of the rpm specfile, the
openjdk-include.tar.gz tarball containing required header files are not
extracted.  The oprofile configure script does not find the required jvmti.h
file and, therefore, the lib is built and packaged.

Fix proposal: extract the the openjdk-include.tar.gz during the %prep step of
the rpm build. For example, add the following into the %prep section (after the
first %setup):
%setup -T -D -a 1

Version-Release number of selected component (if applicable):
oprofile-0.9.6-5.el6.src.rpm

How reproducible:
always

Steps to Reproduce:
check the file list of the oprofile-jit if
"/usr/lib64/oprofile/libjvmti_oprofile.so" is included

Actual results:
The lib is not included.

Expected results:
"/usr/lib64/oprofile/libjvmti_oprofile.so" is included.

Additional info:
The problem has been found on s390x, but it might exist on other architectures.

This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 25 IBM Bug Proxy 2010-07-08 05:31:47 EDT
------- Comment From mgrf@de.ibm.com 2010-07-08 05:20 EDT-------
As per bug call 7-07 this should be fixed
Can we expect oprofile-0.9.6-7.el6 with snap7?

Also could we get the oprofile-0.9.6-7.el6 to verify it resolves the problem in advance of snap7?
Comment 26 IBM Bug Proxy 2010-07-19 11:00:50 EDT
------- Comment From mpjohn@us.ibm.com 2010-07-19 10:53 EDT-------
The oprofile-0.9.6-7 package in snapshot 7 resolves the issue described above where only libopagent was included in the oprofile-jit rpms.  I've verified that OProfile works for profiling both 64-bit and 32-bit JVMs.  I've marked this feature "Verified".  Thanks for your support.
Comment 27 IBM Bug Proxy 2010-07-29 10:33:30 EDT
------- Comment From borntraeger@de.ibm.com 2010-07-29 10:29 EDT-------
I can confirm that on beta2 "/usr/lib64/oprofile/libjvmti_oprofile.so" is available after installing oprofile-jit.
Comment 28 releng-rhel@redhat.com 2010-11-15 09:34:29 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.