United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7013682 two test checking cpuTime filed java/lang/management/ThreadMXBean
7013682 : two test checking cpuTime filed java/lang/management/ThreadMXBean

Details
Type:
Bug
Submit Date:
2011-01-20
Status:
Closed
Updated Date:
2011-12-29
Project Name:
JDK
Resolved Date:
2011-04-05
Component:
core-svc
OS:
linux,generic
Sub-Component:
java.lang.management
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u25
Fixed Versions:
6u25

Related Reports
Backport:
Duplicate:
Relates:

Sub Tasks

Description
see comments

                                    

Comments
EVALUATION

The problem is that getThreadCpuTime(long[]) is dropping the result on the floor
in the case where there's only one entry in the thread id array.  The fix is to
change the line

getThreadTotalCpuTime0(id);

to

times[0] = getThreadTotalCpuTime0(id);
                                     
2011-01-27
EVALUATION

Something is incorrect about the bits being tested. Here is
a snippet of info from ThreadMXBean/ThreadCpuTime.jtr:

#section:script_messages
----------messages:(4/205)----------
JDK under test: (/export/reg/jdk)
java version "1.6.0-internal"
Java(TM) SE Runtime Environment (build 1.6.0-internal-jprtadm_17_Jan_2011_17_57-b00)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode)

The JDK1.6.0_25-B01 should be using HSX-20-B07.

The JDK part of the build identifer is right:

    1.6.0-internal-jprtadm_17_Jan_2011_17_57-b00

However, the VM identifer is not right:

     17.0-b17


Here is the same snippet of info from the other .jtr file,
ThreadMXBean/ThreadUserTime.jtr:

#section:script_messages
----------messages:(4/205)----------
JDK under test: (/export/reg/jdk)
java version "1.6.0-internal"
Java(TM) SE Runtime Environment (build 1.6.0-internal-jprtadm_17_Jan_2011_17_57-b00)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode)
                                     
2011-01-21
EVALUATION

Please provide URLs for the failures that use HSX-20-B07 bits.
I'm marking this bug as "incomplete" for now.
                                     
2011-01-21
SUGGESTED FIX

diff ThreadImpl.java~ ThreadImpl.java
252c252
<                 getThreadTotalCpuTime0(id);
---
>                 times[0] = getThreadTotalCpuTime0(id);
                                     
2011-01-21
EVALUATION

This problem is due to a typo in the fix for 6173675.  See Suggested Fix.
                                     
2011-01-21



Hardware and Software, Engineered to Work Together