Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » TRCAXMI FILE
TRCAXMI FILE [message #35509] Mon, 17 October 2005 12:01 Go to next message
Eclipse UserFriend
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 #35543 is a reply to message #35509] Mon, 17 October 2005 20:02 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
Hi Clelia,

The CPU time is in seconds and if it's 0 (the default value for that
attribute) it won't be serialized.

The default behavior of EMF XMI serialization mechanism is to avoid the
serialization of the features (attributes/references) that has not been set
(the value of those features is equal with their default value which in most
cases is 0 or null).

Regards,
Marius

"clelia" <cleliacangiano@hotmail.com> wrote in message
news:1e16dc89afbccbdffa9c9ea2e646f0d2$1@www.eclipse.org...
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #35679 is a reply to message #35577] Tue, 18 October 2005 15:08 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
Files with TRCAXMI extension represents the XMI serialized form of an
TRCAgent, in your case it contains serialized objects from the Trace model.

I'm not sure what you mean by methods without CPU time, all methods should
have CPU time if you collect it, if a <methods> element doesn't have the
totalCpuTime attribute that means that the value of that attribute was equal
with the default value (0 in this case).

The granularity of the CPU time on Windows is not that good, that's why you
might see 0 as CPU time although the method spent more than a nanosecond
which is the smallest unit for this attribute.

Please let me know if this answers your question.

Regards,
Marius

"clelia" <cleliacangiano@hotmail.com> wrote in message
news:2422c4b325966b5057d7175e844f0fcc$1@www.eclipse.org...
> 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 #35713 is a reply to message #35611] Tue, 18 October 2005 15:12 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
The totalCpuTime attribute value is in seconds (with granularity up to
nanoseconds), and the overhead has been already subtracted.

Regards,
Marius

"clelia" <cleliacangiano@hotmail.com> wrote in message
news:baeffbaa2e2b6f8c023ca5e93ee9249b$1@www.eclipse.org...
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #36090 is a reply to message #35883] Thu, 20 October 2005 00:10 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
I forgot to ask, why are you looking at the XMI file directly, wouldn't you
be able to use the Trace EMF Java model for your use cases? Would be good to
know what are you trying to do with this information?

The CPU time precision and granularity is (as defined in
/org.eclipse.tptp.platform.agentcontroller/src-native/collec tion/collectors/
native/java_profiler/print.c):

/* CPU timestamp granularity for each plaform */
#ifdef _WIN32 /* _WIN32 */
#include <process.h>
#define THREADCPUPRECISION 7
#define THREADCPUGRANULARITY 10000000
#else /* else */
#define THREADCPUPRECISION 6
#define THREADCPUGRANULARITY 1000000
#endif

You can also track back how this value is computed by starting with this
function:

jvmpiAgent_appendThreadCPUTime

in the same file.

Regards,
Marius


"clelia" <cleliacangiano@hotmail.com> wrote in message
news:103eaf53c37ebf6b0035c355f1d3eaff$1@www.eclipse.org...
> 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 #36122 is a reply to message #36090] Thu, 20 October 2005 08:54 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #36446 is a reply to message #36122] Thu, 20 October 2005 16:09 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
exitTime - entryTime - overhead is probably the only way to approximate the
CPU time (when is 0), although not accurate, because entry/exit times are
the wall clock time not CPU time related.

We use entry/exit/overhead times to compute the base/cumulative times at
method/class/package level.

Regards,
Marius

"clelia" <cleliacangiano@hotmail.com> wrote in message
news:2b0e99c60f96cea9b697382077f8fa65$1@www.eclipse.org...
> 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 #36452 is a reply to message #36155] Thu, 20 October 2005 16:16 Go to previous messageGo to next message
Marius Slavescu is currently offline Marius SlavescuFriend
Messages: 67
Registered: July 2009
Member
I'm not sure exactly how it is measured, but I think it means that although
the value is in nanosecond (precision) the values would be captured
(computed) at 10 seconds interval (the granularity on Windows for example).

This might help in understanding how the thread CPU time is computed:
http://www.ej-technologies.com/products/jprofiler/java-profi ler-faq.html#faq4

Regards,
Marius

"clelia" <cleliacangiano@hotmail.com> wrote in message
news:86a80715ba233df3caf478b5f698725b$1@www.eclipse.org...
> 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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Marius Slavescu is currently offline Marius SlavescuFriend
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!
>
Previous Topic:Test automation
Next Topic:RAServer error ..
Goto Forum:
  


Current Time: Thu Mar 28 10:27:48 GMT 2024

Powered by FUDForum. Page generated in 0.07568 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top