Skip to main content

Profiling RI

Please note these forums are being decommissioned and use the new and improved forums at
15 replies [Last post]
Joined: 2011-07-14

Hi ,

I am a beginner for this,

I try to creating the profiling for tunetest ,so that i modified the mpeenv.ini file like this

VMOPT.9=-J-agentlib:hprof=heap=sites,format=b org.cablelabs.impl.ocap.OcapMain

When i tried first time it created the java.hprof inside the OcapMain class package for circlexlet.

i modified the host.prop file for tune test and launch it ,the hprof is not created,but the application is working fine.

(i tried using xrun also #VMOPT.9=-J-Xrunhprof:file=ocapmain.hprof,format=b org.cablelabs.impl.ocap.OcapMain)

Could you please clarify on this and help me how to create this(not using netBeans).

i attached my trace and previously created hprof file here,

java.hprof_.txt397.43 KB
RILog.txt84.32 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-02-02

We've only been able to successfully profile the RI and its included JVM using NetBeans 6.8 following the instructions here:

Your JVM vendor may be able to provide more information on what profiling options are available for your JVM.


Joined: 2011-07-14

Ok fine,

Thanks Scott,

i will follow the given.


Joined: 2011-07-14

Hi ,

As per the given instruction here, - i created the netbeansremotepack,

when i come to this point


Update phoneME remote pack binaries

  • copy $OCAPROOT/jvm/phoneME/phoneME/build/mpe-x86-cygmingw/lib/profiler/lib/*.jar to $OCAPROOT/bin/$OCAPTC/env/

copy $OCAPROOT/jvm/phoneME/phoneME/build/mpe-x86-cygmingw/lib/libprofilerinterface.dll to $OCAPROOT/bin/$OCAPTC/env/


i checked my PhoneME dir, not able to find the given path ,so that what i done is un-zip the following file,

(\RI_Stack\jvm\phoneME) phoneME_102409.tar.bz2

i got \jvm\phoneME\phoneME\build\mpe-x86-cygmingw\lib

but the profilier dir is not available here,

whether my approach is correct or how to do this?

Joined: 2008-07-03

Sorry about that. The jvm build system was recently updated and some of the directory names changed. The correct path is $OCAPROOT/jvm/phoneME/cdc/build/...

I have updated the wiki page to reflect the correct pathnames


Joined: 2011-07-14

sorry for the mistake,

actually i am not able to build the phoneME successfully,

even i checked out from here(

it showing some dependancy is missing,

i attached the trace file here,

how to solve this?

Joined: 2008-03-05

I was just able to build the JVM on Windows using the RI_I1_1_4_REL_A tag. I've attached build log file for reference. If you are using the latest cygwin build environment, you need to make sure that your /usr/bin/cc points to gcc-3, not gcc-4, as the support for -mno-cygwin flag was removed in gcc-4.

Looking your log file, it looks like there are some settings that are getting picked up by your build environment:

Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes

Can you remove/unset those variables from your environment and try building again?

Joined: 2011-07-14

i unset the Picked up option, using
$ unset _JAVA_OPTIONS in cygwin..
now it is not Picked.

But still my phoneME build is failing, i attached the log file here,
and one more think when i check the phoneME folder i did't get this(/phoneME/cdc/build)
whether it will come after the whole build is success? or how to get this.

my stack details:
-using cygwin for build

and gcc detail
$ cygcheck -c gcc
Cygwin Package Information
Package Version Status
gcc 3.4.4-999 OK

In the build

[exec] jar: `-u' mode unimplemented.

which jar.exe will support this,how to update this .

please guide me on this,

Joined: 2011-07-14


Joined: 2011-07-14

sorry for the so many update....

After some modification as per profiling doc

i got the info

(RI.Stack.StdOut- Starting calibration.. followed by Calibration performed successfully)

.nbprofiler folder is generated.

After modifying the org.cablelabs.impl.ocap.OcapMain and VMOPT.8

i launch the ri using cygwin , verify the ri log it displaying

RI.Stack.StdOut- Profiler Agent: Waiting for connection on port 5140 (Protocol version: 9) and some err

the tunetest video is not coming,

- i tried to attach the profiler in netbeans is just displaying "connecting to target vm"

i attached the log here,

please help me on this,

Joined: 2009-02-02

I see in your log that the RI waited for a profiler connection, a connection was made, some socket communication occurred (the RI was sending data to the profiler) and then the profiler was disconnected.

I'm not sure why the RI didn't

RI.Stack.StdOut- Profiler Agent: Established remote connection with the tool

This means you successfully connected to the RI using netbeans. I see the JVM is successfully created, but I don't see logging associated with the RI (OcapMain or managers). Is this because the RI JVM is starting and has to be un-paused, like the suspend=y option when debugging?


Joined: 2011-07-14


Now i got the connection in netbeans and able to see the profile informations

i attached the profiler output here,

but in the emulator the tunetest application video is not that not able to tune and check the profile

how to solve this.

and one more thing

i moved this from final.prop to mpeenv.ini after that only i can able to connected..

#add netbeans package as an ocap extension to (should work in mpeenv.ini but doesn't)

Joined: 2009-04-11

You probably need to configure the RI for Tunetest.

Have you tried running the RI (perhaps without profiling) and configured for Tunetest? Instructions are here:

Joined: 2011-07-14


I can able to view the profile info for tunetest application,also able to tune the channel,.

when i try "dump heap " in the profiling window, it displaying the warning message like

" the profiled application must be run on JDK 1.6,1.7 or 1.5.0_12 to take a heap dump"

only the snapshot is working.

i am using the \jdk1.6.0_13 , but why it is displaying like this

how to rectify this to get heap dump details?

and i am using the remote profiler pack as per the profiling using netbeans doc

Joined: 2009-02-02

I believe the Wiki topic mentions this limitation - heap dumps are not available with NetBeans and the JVM included with the RI. A commercial JVM may have this ability. The JVM running the RI is PBP 1.1, which is close to Java 1.4.

I'm glad you have everything working.


Joined: 2011-07-14

Thanks everyone,

Now it is working fine.