TRCAXMI FILE [message #35509] |
Mon, 17 October 2005 12: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 #35577 is a reply to message #35543] |
Mon, 17 October 2005 23:35 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
What do you intend with "serialization"? Is it about application execution?
The methods without CPU time are yet counted in the CPU time of methods
with CPU time? If they aren't counted how can I trace this information?
Thanks a lot.
Clelia
|
|
|
Re: TRCAXMI FILE [message #35611 is a reply to message #35577] |
Tue, 18 October 2005 09:14 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Another information:
Does the cpuTime represent the effective time spent by the method
execution or is it comprehensive of the overhead?
Thanks a lot!
|
|
|
|
|
Re: TRCAXMI FILE [message #35747 is a reply to message #35679] |
Tue, 18 October 2005 16:47 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
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 [message #35781 is a reply to message #35747] |
Tue, 18 October 2005 17:56 |
Marius Slavescu Messages: 67 Registered: July 2009 |
Member |
|
|
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 [message #35883 is a reply to message #35781] |
Wed, 19 October 2005 09:41 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Thanks for your help, the xmi is now clearer for me.
Anyway there're other questions.
Which is the smallest unit to be represented by CpuTime?
How is CPU time calculated? By which instruments?
Can CpuTime resolution depend on the so on which you work?
Thanks, have a nice day!
|
|
|
Re: TRCAXMI FILE [message #35917 is a reply to message #35883] |
Wed, 19 October 2005 09:46 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Sorry..
Obiouvsly with "so" i intend Operating System, it's a little italian
mystake.
Thanks!
|
|
|
|
Re: TRCAXMI FILE [message #36122 is a reply to message #36090] |
Thu, 20 October 2005 08:54 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Thanks Marius.
I need the methods cpuTime for a future simulation.
That's way I'd have all the cpuTime, even if they're small and negligible.
If the CpuTime is not set, can I calculate it in another way?
For example: exitTime - entryTime - overhead?
Is it possible?
Have a nice day.
|
|
|
Re: TRCAXMI FILE [message #36155 is a reply to message #36090] |
Thu, 20 October 2005 09:51 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Sorry Marius, but what's granularity? how is it measured? in nanoseconds
or clock cycle?
thanks.
|
|
|
|
|
Re: TRCAXMI FILE [message #36458 is a reply to message #36446] |
Thu, 20 October 2005 16:34 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Dear Marius,
watching the file you've linked i find this notation:
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!
|
|
|
Re: TRCAXMI FILE [message #36474 is a reply to message #36458] |
Thu, 20 October 2005 16:36 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
Sorry...
/* 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)
*/
|
|
|
Re: TRCAXMI FILE(important) [message #36518 is a reply to message #36452] |
Thu, 20 October 2005 19:33 |
Eclipse User |
|
|
|
Originally posted by: cleliacangiano.hotmail.com
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!
|
|
|
Re: TRCAXMI FILE(important) [message #37963 is a reply to message #36518] |
Fri, 28 October 2005 04:29 |
Marius Slavescu Messages: 67 Registered: July 2009 |
Member |
|
|
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.07568 seconds