TRCAXMI FILE [message #35509] |
Mon, 17 October 2005 08:01  |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
I have two questions about the trcaxmi file.
Is the CPU Time in ms?
Why isn't the CPU Time shown for all the methods?
|
|
|
|
|
|
|
|
|
Re: TRCAXMI FILE [message #35781 is a reply to message #35747] |
Tue, 18 October 2005 13:56   |
Eclipse User |
|
|
|
As I said in my previous message if the value of the attribute in the in
memory EMF model is 0, you would not see it in the XMI representation (EMF
doesn't serialize in XMI the attributes that contains their default value).
In order to double check that the CPU time received from the JVMPI agent is
0, please profile to file then import the resulting trace using the Import
Profiling File wizard and select the "Show full data" option.
Search in the raw trace file (trcxml) for that specific invocation use the
ticket number, on the methodExit event that has that ticket you should see
cpuTime="0.000000000" which translates into totalCPUTime=0 in memory (EMF
object) which translates into missing totalCPUTime attribute in XMI
representation (because 0 is the default value).
That's why for all those methodExit elements in the raw trace where
cpuTime="0.000000000" you will see invocations elements in XMI with missing
totalCpuTime attribute.
The cpuTime="0.000000000" because of the granularity of this attribute on
that specific system, if you look at your example DemoFilter method has a
cumulative time of 5.4E-5 and the granularity of the CPU time might be at
millisecond level so it is adjusted to 0 (CPU time should be close by
smaller than cumulative time on a specific method).
Please let me know if you have any further questions.
Regards,
Marius
"clelia" <cleliacangiano@hotmail.com> wrote in message
news:953867e985816fddaa288cefca1321a6$1@www.eclipse.org...
> I'll show you an example.
>
> <invocations xsi:type="Trace:TRCFullMethodInvocation"
> method="//@process/@packages.0/@classes.0/@methods.0"
> thread="//@process/@threads.0" owningObject="//@process/@objects.0"
> stackDepth="15" entryTime="251.01316618919373"
> exitTime="251.0134665966034" ticket="2578537" overhead="2.45977E-4"/>
>
> where @classes.0/@methods.0 is:
>
> <methods id="12360" name="DemoFilter" signature="()" modifier="128"
> baseTime="5.443040966796877E-5" cumulativeTime="5.443040966796877E-5"
> calls="1"/>
>
> There's one call(calls="1"), in fact in the invocations sequence there's
> one invocation of this method.
> And the CPUTime?
>
> I'll show you an other example.
>
> This is the classes.0:
>
> <classes id="12362" name="DemoFilter" loadTime="251.01326298713684"
> baseTime="12.26862503897815" cumulativeTime="12.26862503897815" calls="6"
> totalCpuTime="3.9099999999999997" loadedBy="//@process/@threads.0"
> classObjects="//@process/@objects.0"
> sourceInfo="//@process/@sourceInfos.0">
>
> <methods id="12360" name="DemoFilter" signature="()" modifier="128"
> baseTime="5.443040966796877E-5" cumulativeTime="5.443040966796877E-5"
> calls="1"/>
>
> <methods id="12359" name="init" signature="(javax.servlet.FilterConfig)
> void" baseTime="3.713602832031249E-5"
> cumulativeTime="3.713602832031249E-5" calls="1"/>
>
> <methods id="12361" name="doFilter"
> signature="(javax.servlet.ServletRequest, javax.servlet.ServletResponse,
> javax.servlet.FilterChain) void" baseTime="12.268533472540161"
> cumulativeTime="12.268533472540161" calls="4"
> totalCpuTime="3.9099999999999997"/>
> </classes>
>
>
> Init and DemoFilter methods haven't CpuTime, but they're called in the
> execution(in fact the DemoFilter class has 6 calls, 4 for doFilter method,
> 1 for init method, 1 for DemoFilter method).
> All the methods without CPUTme wich are present in the initial
> declaration, haven't CPU Time in "invocations".
> Why?
>
>
> I work on Linux.
>
> Thanks a lot!
>
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: TRCAXMI FILE(important) [message #37963 is a reply to message #36518] |
Fri, 28 October 2005 00:29  |
Eclipse User |
|
|
|
Cleila,
Here is a snapshot from this article
http://www.javaworld.com/javaworld/javatips/jw-javatip92.htm l which should
answer your question:
"The JVMPI provides a function, GetCurrentThreadCpuTime(), which returns the
CPU time in nanoseconds for the current Java thread. It does this no matter
which technique you use to map Java threads to OS threads. Despite the
nanosecond resolution, the function is not more precise than the underlying
operating system. On Windows NT it works in 10 millisecond increments. An
extremely simple profiler agent with the ability to access this information
consists of the following C++ code:"
All the time values in the TPTP trace model and related UI (including
baseTime,cumultativeTime) are in seconds with nanosecond resolution.
Regards,
Marius
"clelia" <cleliacangiano@hotmail.com> wrote in message
news:89c33d67e18025b859d8ec4b262b0b22$1@www.eclipse.org...
> Dear Marius, watching the file you've linked i find this notation:
>
>
> /* Append the Thread CPU time.
> This function appends the cumulative cpuTime into the trace. It assumes
> the time value passed in is in nanoseconds (the JVMPI method
> GetCurrentThreadCPUTime() returns values in units of nanoseconds). @param
> buffer the buffer to write to
> @param offset the offset into the buffer where we're writing
> @param time the cumulative cpu time to put into the trace element (in
> nanoseconds) */
>
> In performance.c file, of the same directory, I find this:
>
> /** GET_CURRENT_THREAD_CPU_TIME
> ************************************************
> * Retruns the amount of CPU time consumed by this thread as a 64 bit
> number.
> * This is nominally returned in nanoseconds but units are reported to
> vary
> * between platforms and JDKs.
> */
>
>
> Now i've a doubt:
> Is the cpu time measured in seconds?
> or is it measured in nanoseconds?
> Some times are in seconds and other in ms o ns?
>
> Thanks a lot!
>
|
|
|
Powered by
FUDForum. Page generated in 0.06873 seconds