Bug 74890 - (Trace) UI view Method Level CPU usage
Summary: (Trace) UI view Method Level CPU usage
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Hyades (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 2000
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Eugene Chan CLA
QA Contact:
URL:
Whiteboard:
Keywords: Documentation, PII, ui
Depends on: 74888 82519
Blocks:
  Show dependency tree
 
Reported: 2004-09-23 20:50 EDT by Eugene Chan CLA
Modified: 2012-02-15 13:42 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Chan CLA 2004-09-23 20:50:05 EDT
Method Level CPU usage (ie CPU time used by a method as distinct from its 
elapsed time)
BCI Instrumentation provides this metric
Comment 1 Valentina Popescu CLA 2004-12-30 10:20:08 EST
Update target and priority based on TPTP Features for 3.2+ document
Comment 2 Valentina Popescu CLA 2005-01-10 15:57:32 EST
Updating feature target per 01/10 UI main committers meeting

Need to be discussed the validity of this feature for 3.3 since there are no 
agents controllers to send this type of data yet.
Eugene, please open a feature for the agent controller and mark this as a 
dependency
Comment 3 Eugene Chan CLA 2005-02-21 17:08:12 EST
After discussion with Hendra, prerequisite runtime feature 82519 is not
containable in 3.3. As a result. I am proposing to defer this feature to the
same release as 82519 which is 4.1
Comment 4 Robert Danek CLA 2005-03-15 13:25:28 EST
The fix for bug 82519 was checked in on 03/15 1:20pm. 

methodEntry and methodExit elements have attributes 

threadCpuTime

that represents the elapsed cpu time in nanoseconds that the thread associated
with threadIdRef has been running. The value is a standard java long. 

The way to turn on the printing of these attributes in the trace is by setting

THREAD_CPU_TIME = true 
Comment 5 Eugene Chan CLA 2005-03-15 15:25:55 EST
Robert, According to Marius, the attribute supported on loader side is 'cpuTime'
and it's only supported in methodExit.

Marius, can you give more information here?
Comment 6 Robert Danek CLA 2005-03-15 15:34:40 EST
threadCpuTime was the name that Richard gave the attribute when he did the
preliminary work on this item way back with jdk1.2. It's easy enough to change.
Just let me know. 

As for it being only in methodExit -- I'm not sure how you would be able to
calculate cpu method timings if you don't also have the cpuTime value in the
methodEntry attribute. 
Comment 7 Marius Slavescu CLA 2005-03-15 16:32:46 EST
Here is the JavaDoc for this attribute:

         * Holds the thread CPU time consumed during the execution of this call
invocation.
	 * Note the "TRCFullMethodInvocation" includes an existing "double" attribute
"overhead" which is currently used as the instrumentation overhead in elapsed
time measurement.
	 * When "cpuTime" is set this "overhead" attribute will also apply to both
elapsed and CPU calculation (Duration = exitTime - entryTime - overhead) and in
calculating the raw CPU time (Method CPU Time = cpuTime - overhead)

The cpuTime should be sent only on the methodExit (not as an absolute value on
methodEntry/methodExit.) and should represent the CPU consumed time in that
method invocation (including the overhead, I subtract the overhead in the
loader, so you'll get the real value).
Comment 8 Ruth Lee CLA 2005-03-15 18:17:08 EST
Now that we have a "3.3" Version in bugzilla, updating bugzillas targeted to 3.3
or a 3.3 iteration so that their Version matches their Target. "future",
"unspecified", "4.0", and "4.1" Versions will not be updated.
Comment 9 Robert Danek CLA 2005-03-16 14:47:30 EST
Per discussion with Harm, Marius and Eugene:

attribute is now "cpuTime" and appears only on methodExit elements. 

It represents the cumulative cpu time of the method invocation represented by
the methodExit and corresponding methodEntry element. I subtract any cpu time
overhead  (i.e. cpu time spent in the piAgent) prior to outputting the value. 

Also, to enable the option, set

CPU_TIME = true

(instead of THREAD_CPU_TIME = true) 

(Update is in CVS as of 3/16/05 2:40pm.) 
Comment 10 Eugene Chan CLA 2005-03-18 12:18:52 EST
code checked into TPTP 3.3
Comment 11 Eugene Chan CLA 2005-03-20 16:25:46 EST
fixed in tptp 4.0
Comment 12 Eugene Chan CLA 2005-04-08 10:56:52 EDT
close feature