Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » No Execution Statistics on stand-alone
No Execution Statistics on stand-alone [message #87204] Wed, 15 November 2006 08:29 Go to next message
No real name is currently offline No real name
Messages: 8
Registered: July 2009
Junior Member
Hi,

i try to profile a application with the stand-alone mode.

call:
java
-XrunpiAgent:server=standalone,filters=myfilter,profile=mypr ofile,file=trace.trcxml
test.Main

myprofile looks like:
MONITOR_MDE = all
FILTERS = true
ID_STYLE = static
TIMESTAMPS = true
METHOD_COUNTS = true
STACK_INFORMATION = boundaryAndContigous
BOUNDARY_DEPTH = 2
TRACE_MODE = full

But i get no execution statistics. Have i forgot an option? Which options
i have to aktivate to get the execution statistics (or execution flow) ??

thx for any help!

regards Michael
Re: No Execution Statistics on stand-alone [message #87292 is a reply to message #87204] Wed, 15 November 2006 09:12 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Michael wrote:
> Hi,
>
> i try to profile a application with the stand-alone mode.
>
> call: java
> -XrunpiAgent:server=standalone,filters=myfilter,profile=mypr ofile,file=trace.trcxml
> test.Main
>
> myprofile looks like:
> MONITOR_MDE = all
> FILTERS = true
> ID_STYLE = static
> TIMESTAMPS = true
> METHOD_COUNTS = true
> STACK_INFORMATION = boundaryAndContigous
> BOUNDARY_DEPTH = 2
> TRACE_MODE = full
>
> But i get no execution statistics. Have i forgot an option? Which
> options i have to aktivate to get the execution statistics (or execution
> flow) ??
>
> thx for any help!
>
> regards Michael
>
I suggest to start with a simple configuration and then check which
additional option prevents the profiler from working as expected.
For example, you can use the following command line (without any
additional profiling options) to get execution statistics/flow:

java
-XrunpiAgent:mode=full,server=standalone,filters=myfilter,fi le=trace.trcxml
test.Main

If this still does not work, try to remove the filter option and check
again.

Also, when you import the trace.trcxml file to Eclipse, make sure to
select the correct option in the Import Profiling File wizard (e.g,
select either "Show Execution Statistics" or "Show Full Data"). Note
that the default option is "Show Heap Statistics", which does not import
execution information.

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: No Execution Statistics on stand-alone [message #87308 is a reply to message #87292] Wed, 15 November 2006 09:19 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 8
Registered: July 2009
Junior Member
THX Asaf,

now all works fine. When i import the trace file into eclipse i select the
wrong options :((

regards
Michael
Re: No Execution Statistics on stand-alone [message #88715 is a reply to message #87292] Sun, 26 November 2006 14:33 Go to previous messageGo to next message
Ravi Roy is currently offline Ravi Roy
Messages: 47
Registered: July 2009
Member
Hi Asaf,

I have different problem while trying to profile an application in headless
way.

I try to profile as per the following command line options :

java -XrunpiAgent:server=standalone,profile=myprofile,file=trace. trcxml
MyApp

which gives the following exception :

Exception in thread "main" java.lang.NoClassDefFoundError: MyApp (wrong
name: com/mycomp/myapp/MyApp)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Test Application to be profiled itself is located where I am running the
above command line options, but still it says NoClassDefFoundError.

I have installed Agent Controller seperately. I can run the sample
application (SampleClient) located in Agent Controller directory, it works
fine.

Thanks for your help!

Regards,
Ravi.




"Asaf Yaffe" <asaf.yaffe@intel.com> wrote in message
news:ejell9$u3c$1@utils.eclipse.org...
> Michael wrote:
>> Hi,
>>
>> i try to profile a application with the stand-alone mode.
>>
>> call:
>> java -XrunpiAgent:server=standalone,filters=myfilter,profile=mypr ofile,file=trace.trcxml
>> test.Main
>>
>> myprofile looks like:
>> MONITOR_MDE = all
>> FILTERS = true
>> ID_STYLE = static
>> TIMESTAMPS = true
>> METHOD_COUNTS = true
>> STACK_INFORMATION = boundaryAndContigous
>> BOUNDARY_DEPTH = 2
>> TRACE_MODE = full
>>
>> But i get no execution statistics. Have i forgot an option? Which options
>> i have to aktivate to get the execution statistics (or execution flow) ??
>>
>> thx for any help!
>>
>> regards Michael
>>
> I suggest to start with a simple configuration and then check which
> additional option prevents the profiler from working as expected.
> For example, you can use the following command line (without any
> additional profiling options) to get execution statistics/flow:
>
> java -XrunpiAgent:mode=full,server=standalone,filters=myfilter,fi le=trace.trcxml
> test.Main
>
> If this still does not work, try to remove the filter option and check
> again.
>
> Also, when you import the trace.trcxml file to Eclipse, make sure to
> select the correct option in the Import Profiling File wizard (e.g, select
> either "Show Execution Statistics" or "Show Full Data"). Note that the
> default option is "Show Heap Statistics", which does not import execution
> information.
>
> HTH,
> Asaf
>
> --
> Asaf Yaffe
> Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: No Execution Statistics on stand-alone [message #88895 is a reply to message #88715] Wed, 29 November 2006 07:44 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Ravi Roy wrote:

> I try to profile as per the following command line options :
>
> java -XrunpiAgent:server=standalone,profile=myprofile,file=trace. trcxml
> MyApp
>
> which gives the following exception :
>
> Exception in thread "main" java.lang.NoClassDefFoundError: MyApp (wrong
> name: com/mycomp/myapp/MyApp)

Ravi,

This problem does not seem to be related to the profiler (the -Xrun...
stuff). Please check whether you get the same error when trying to run
your application from the command line without the profiler (just try
java MyApp).

When launching Java classes from the command line, you need to:
1. Use the fully qualified class name (e.g. com.mycomp.myapp.MyApp
instead of just MyApp)
2. Set the working/current directory to be the one that includes your
*root* package, and not the application itself.
3. In some VMs, you may need to add the current directory to the VM
classpath using '-cp .;' (Windows) or '-cp .:' (Linux).

Bottom line: assuming all class files are located somewhere under a
'bin' directory (the default configuration when using Eclipse to build
your Java applications):
1. Change directory to 'bin'
2. Type 'java -cp .; com.mycomp.myapp.MyApp' and check that it works
3. Add the '-X...' stuff to profile your application in standalone mode

HTH!
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: No Execution Statistics on stand-alone [message #88953 is a reply to message #88895] Wed, 29 November 2006 09:25 Go to previous messageGo to next message
Ravi Roy is currently offline Ravi Roy
Messages: 47
Registered: July 2009
Member
Thanks Asaf,

Thanks a lot, It worked, I was just wondering why it is not working, as you
mentioned in your post that I had to run it from root of the package and
specify the class name preceding the full package name.

Now I have the "myapp.trcxml", is it also possible to generate a HTML report
on the basis of this XML document in the headless way too ?

Great, Thanks a lot again for the pointer you provided.

Regards.
Ravi.



"Asaf Yaffe" <asaf.yaffe@intel.com> wrote in message
news:ekjdpc$fij$1@utils.eclipse.org...
> Ravi Roy wrote:
>
>> I try to profile as per the following command line options :
>>
>> java -XrunpiAgent:server=standalone,profile=myprofile,file=trace. trcxml
>> MyApp
>>
>> which gives the following exception :
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError: MyApp (wrong
>> name: com/mycomp/myapp/MyApp)
>
> Ravi,
>
> This problem does not seem to be related to the profiler (the -Xrun...
> stuff). Please check whether you get the same error when trying to run
> your application from the command line without the profiler (just try java
> MyApp).
>
> When launching Java classes from the command line, you need to:
> 1. Use the fully qualified class name (e.g. com.mycomp.myapp.MyApp instead
> of just MyApp)
> 2. Set the working/current directory to be the one that includes your
> *root* package, and not the application itself.
> 3. In some VMs, you may need to add the current directory to the VM
> classpath using '-cp .;' (Windows) or '-cp .:' (Linux).
>
> Bottom line: assuming all class files are located somewhere under a 'bin'
> directory (the default configuration when using Eclipse to build your Java
> applications):
> 1. Change directory to 'bin'
> 2. Type 'java -cp .; com.mycomp.myapp.MyApp' and check that it works
> 3. Add the '-X...' stuff to profile your application in standalone mode
>
> HTH!
> Asaf
>
> --
> Asaf Yaffe
> Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: No Execution Statistics on stand-alone [message #88969 is a reply to message #88953] Wed, 29 November 2006 09:36 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Ravi Roy wrote:

> Now I have the "myapp.trcxml", is it also possible to generate a HTML report
> on the basis of this XML document in the headless way too ?

Hi Ravi,

Not sure about that. I suggest to post a new question to this newsgroup,
so it won't be "lost" inside this discussion.


Glad I could help.
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Re: No Execution Statistics on stand-alone [message #89027 is a reply to message #88969] Wed, 29 November 2006 10:40 Go to previous message
Ravi Roy is currently offline Ravi Roy
Messages: 47
Registered: July 2009
Member
Thanks Asaf, I had already posted a question, but did not get a response so
far.
Regards,
Ravi.

"Asaf Yaffe" <asaf.yaffe@intel.com> wrote in message
news:ekjkan$pit$1@utils.eclipse.org...
> Ravi Roy wrote:
>
>> Now I have the "myapp.trcxml", is it also possible to generate a HTML
>> report on the basis of this XML document in the headless way too ?
>
> Hi Ravi,
>
> Not sure about that. I suggest to post a new question to this newsgroup,
> so it won't be "lost" inside this discussion.
>
>
> Glad I could help.
> Asaf
>
> --
> Asaf Yaffe
> Eclipse TPTP Committer, Platform Project (JVMTI Profiler)
Previous Topic:error occurred while attempting to resolve the data collectors
Next Topic:[AGR] Disablement of test macros in suite editor's Behavior tab
Goto Forum:
  


Current Time: Thu Oct 02 06:31:40 GMT 2014

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

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