Content-Type: multipart/alternative; boundary="------------090204090906010108040706" --------------090204090906010108040706 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Thanks so much for the support. I tried the debug option. So, in a loop I call two static methods Test.doSomething() which calls Test.wasteSomeMoreCycles() This is what I see in the debug . I have also attached the entire log. [Lines beginning with "Exiting" are my debug ] At the start, a lot of entries like * dyncode: name=I2C/C2I adapters(0x0000000000144d20)@0xb4ec33c0, addr=0xb4ec33c0, size=200* and then print statements from these methods and before the profiler quits, there is */Source Test.java 0xb4ecc9ba 9 0xb4ecc9bc 6 0xb4ecc9c4 15 0xb4ecc9d3 9 0xb4ecc9d8 21 0xb4ecc9e0 23 0xb4ecca 0 19 15 20 18 21 26 22 b4ecc9ba 20 b4ecc9bc 20 b4ecc9c4 21 b4ecc9d3 20 b4ecc9d8 22 b4ecc9e0 22 b4ecca08 load: declaring_class=0x70403bdc, class=LTest;, method=doSomethingI, signature=()V, addr=0xb4ecc9a0, size=128/* Also I was using Sun java6 JVM for my runs (but 1.5 or 6 does not make a diff though) Instance methods also give the same output. I see the some other symbols, but not the ones in my program. They are somehow 'anonymous'. samples % linenr info symbol name 1 1.1765 (no location information) main 1 1.1765 (no location information) logical_processors_per_package 1 1.1765 (no location information) hyperthreading_support 1 1.1765 (no location information) SelectVersion 1 1.1765 (no location information) RemovableMachineDependentOption 1 1.1765 (no location information) ParseArguments 1 1.1765 (no location information) JavaMain 1 1.1765 (no location information) GetApplicationHome 1 1.1765 (no location information) AddOption 2 2.3529 (no location information) NewPlatformString 2 2.3529 (no location information) GetJVMPath 2 2.3529 (no location information) CheckJvmType 3 3.5294 (no location information) CreateExecutionEnvironment 7 8.2353 (no location information) ReadKnownVMs 60 70.5882 (no location information) anonymous symbol from section .plt It will be great if Daniel can lend a helping hand!! :) thanks Vinoth On 7/1/2009 12:59 PM, Maynard Johnson wrote: > Vinoth Chandar wrote: >> Hi Maynard, >> >> Thanks for the reply. I do iterate over one of the static methods >> [for like 10000 times] >> >> I use Java HotSpot(TM) Client VM (build 1.5.0_17-b02, mixed mode) >> >> $JDK_INSTALL/bin/java >> -agentpath:$OPROFILE_INSTALL/lib/oprofile/libjvmti_oprofile.so >> $MAIN_CLASS >> is how I invoke the JVM > > OK, let's try adding the debug option: > > $JDK_INSTALL/bin/java > -agentpath:$OPROFILE_INSTALL/lib/oprofile/libjvmti_oprofile.so=debug > $MAIN_CLASS > >> >> So, does this mean that , we may not be able to get the symbols >> printed out at all times? > Samples for JITed methods should be printed by opreport. We just need > to figure out why this isn't working for you. Daniel works in > Germany, so maybe by Monday he might have a chance to look at this, too. > > -Maynard >> I want to use this as a general purpose java profiling tool, that >> will profile any java code. >> >> thanks >> Vinoth >> >> On 7/1/2009 10:57 AM, Maynard Johnson wrote: >>> Vinoth Chandar wrote: >>>> Hi, >>>> >>>> [RESENDING IN THE HOPE OF GETTING IT ANSWERED] >>> Daniel (on cc) is our expert in the Java profiling area, but I'll >>> give it a shot. >>>> I am using oprofile 0.9.4 on P4 / Xeon with 2 hyper-threads for >>>> java profiling. >>>> I am listening for the default event >>>> event=GLOBAL_POWER_EVENTS:6000:1:1:1. >>>> My test program simply calls two static java methods from the main >>>> method. [I do a Math.pow >>>> computation in each of those methods]. >>> OProfile's Java support uses an agent library to listen for >>> "compiled method load" events from the JVM. This means the methods >>> you want to profile must be JITed. If you're using the Sun Java >>> Hotspot, this won't happen the first time around, so be sure that >>> you iterate over the methods you want to profile. >>> >>> What JVM are you using? How are you invoking your Java application, >>> with -agentlib, agentpath, or Xrun? >>> >>> -Maynard >>>> But, my profile results generated using >>>> opreport -l shows no symbols from my program. I see >>>> something like the following.. >>>> >>>> samples % symbol name >>>> 59 74.6835 anonymous symbol from section .plt >>>> 3 3.7975 AddOption >>>> 3 3.7975 main >>>> ..... >>>> ..... >>>> >>>> But, the same code in C, shows up the function names neatly. >>>> As you can see, I am doing profiling very aggressively with maximum >>>> overhead in >>>> the hope of seeing my method names. >>>> >>>> Can someone point out if I am doing something wrong? >>>> I would ideally like to see something as in >>>> http://oprofile.sourceforge.net/doc/getting-jit-reports.html >>>> >>>> thanks >>>> Vinoth >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> oprofile-list mailing list >>>> oprofile-list@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list >>> > --------------090204090906010108040706 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

Thanks so much for the support. I tried the debug option.
So, in a loop I call two static methods Test.doSomething() which calls Test.wasteSomeMoreCycles()

This is what I see in the debug . I have also attached the entire log. [Lines beginning with "Exiting" are my debug ]
At the start, a lot of entries like

dyncode: name=I2C/C2I adapters(0x0000000000144d20)@0xb4ec33c0, addr=0xb4ec33c0, size=200


and then print statements from these methods and before the profiler quits, there is

Source Test.java
0xb4ecc9ba 9    0xb4ecc9bc 6    0xb4ecc9c4 15   0xb4ecc9d3 9    0xb4ecc9d8 21   0xb4ecc9e0 23   0xb4ecca
0 19    15 20   18 21   26 22
b4ecc9ba 20     b4ecc9bc 20     b4ecc9c4 21     b4ecc9d3 20     b4ecc9d8 22     b4ecc9e0 22     b4ecca08
load: declaring_class=0x70403bdc, class=LTest;, method=doSomethingI, signature=()V, addr=0xb4ecc9a0, size=128


Also I was using Sun java6 JVM for  my runs (but 1.5 or 6 does not make a diff though)
Instance methods also give the same output.
I see the some other symbols, but not the ones in my program. They are somehow 'anonymous'.

samples  %        linenr info                 symbol name
1         1.1765  (no location information)   main
1         1.1765  (no location information)   logical_processors_per_package
1         1.1765  (no location information)   hyperthreading_support
1         1.1765  (no location information)   SelectVersion
1         1.1765  (no location information)   RemovableMachineDependentOption
1         1.1765  (no location information)   ParseArguments
1         1.1765  (no location information)   JavaMain
1         1.1765  (no location information)   GetApplicationHome
1         1.1765  (no location information)   AddOption
2         2.3529  (no location information)   NewPlatformString
2         2.3529  (no location information)   GetJVMPath
2         2.3529  (no location information)   CheckJvmType
3         3.5294  (no location information)   CreateExecutionEnvironment
7         8.2353  (no location information)   ReadKnownVMs
60       70.5882  (no location information)   anonymous symbol from section .plt

It will be great if Daniel can lend a helping hand!! :)

thanks
Vinoth

On 7/1/2009 12:59 PM, Maynard Johnson wrote:
Vinoth Chandar wrote:
Hi Maynard,

Thanks for the reply. I do iterate over one of the static methods [for like 10000 times]

I use Java HotSpot(TM) Client VM (build 1.5.0_17-b02, mixed mode)

$JDK_INSTALL/bin/java  -agentpath:$OPROFILE_INSTALL/lib/oprofile/libjvmti_oprofile.so $MAIN_CLASS
is how I invoke the JVM

OK, let's try adding the debug option:

$JDK_INSTALL/bin/java -agentpath:$OPROFILE_INSTALL/lib/oprofile/libjvmti_oprofile.so=debug $MAIN_CLASS


So,  does this mean that , we may not be able to get the symbols printed out at all times?
Samples for JITed methods should be printed by opreport.  We just need to figure out why this isn't working for you.  Daniel works in Germany, so maybe by Monday he might have a chance to look at this, too.

-Maynard
I want to use this as a general purpose java profiling tool, that will profile any java code.

thanks
Vinoth

On 7/1/2009 10:57 AM, Maynard Johnson wrote:
Vinoth Chandar wrote:
Hi,

[RESENDING IN THE HOPE OF GETTING IT ANSWERED]
Daniel (on cc) is our expert in the Java profiling area, but I'll give it a shot.
I am using oprofile 0.9.4 on P4 / Xeon with 2 hyper-threads for java profiling.
I am listening for the default event event=GLOBAL_POWER_EVENTS:6000:1:1:1.
My test program simply calls two static java methods from the main method. [I do a Math.pow
computation in each of those methods].
OProfile's Java support uses an agent library to listen for "compiled method load" events from the JVM.  This means the methods you want to profile must be JITed.  If you're using the Sun Java Hotspot, this won't happen the first time around, so be sure that you iterate over the methods you want to profile.

What JVM are you using?  How are you invoking your Java application, with -agentlib, agentpath, or Xrun?

-Maynard
But, my profile results generated using
opreport -l <path-to-jvm> shows no symbols from my program. I see
something like the following..

samples  %        symbol name
59       74.6835  anonymous symbol from section .plt
3         3.7975  AddOption
3         3.7975  main
.....
.....

But, the same code in C, shows up the function names neatly.
As you can see, I am doing profiling very aggressively with maximum overhead in
the hope of seeing my method names.

Can someone point out if I am doing something wrong?
I would ideally like to see something as in
http://oprofile.sourceforge.net/doc/getting-jit-reports.html

thanks
Vinoth



------------------------------------------------------------------------------
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list


--------------090204090906010108040706--