Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Empty Execution Flow, Call Tree
Empty Execution Flow, Call Tree [message #136608] Thu, 02 October 2008 11:33 Go to next message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
Hi,

I'm sorry, that my previous messages was posted to wrong maillist.

I remind, that I successfully profiling my OSGi-based web application. I
can view Execution statistic information, but I can't see Method
Invocation flow and Call Tree. When I'm trying to view Method Invocation
flow I see an empty field with title "Selected method has no invocation
information" or "No method selected". When I'm trying to view Call Tree, I
see the threads list, but without "+"-s, i.e. without child method
invocation information. And when I'm trying to click by right button of
mouse on monitor and choose "Open in->Execution flow" I can see Execution
flow of all threads. But it contains too much information, because my web
app is very complex, So it would be more convinience to me to analyze
execution flow of selected methods. Could somebody help me?

P.S.
Execution environment: JRE 1.6.0_06, Eclipse 3.4, TPTP release - 4.5.1, IAC
Profiling scenario:
1. select "Profile" on configured server Tomcat;
2. Choose "Execution Time Analysis";
3. Edit this data collector and set property "Show execution flow
graphical details" to true;
4. Start profiling

Thank's
Vadim
Re: Empty Execution Flow, Call Tree [message #136644 is a reply to message #136608] Thu, 02 October 2008 14:10 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene Chan
Messages: 287
Registered: July 2009
Senior Member
Hi Vadim

Profile on Server feature uses enabled mode to launch the server which has a
limitation on execution details collection (see bug
https://bugs.eclipse.org/194385). The workaround would be to manually modify
the server startup script with vm argument to starts the server in
controlled mode (outside of Eclipse) and attach to the sever process with
the Eclispe TPTP Attach configuration to collect such information from agent
started. Detail about the vm argument can be found here >
http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclips e.tptp.platform.agentcontroller/src-native-new/packaging_md/ windows/getting_started.html?root=TPTP_Project&view=co#J ava_15

Eugene

"Vadim Gindin" <vgindin@gmail.com> wrote in message
news:8c45ebdaab9cee1a0e72a85cb167d9c3$1@www.eclipse.org...
> Hi,
>
> I'm sorry, that my previous messages was posted to wrong maillist.
> I remind, that I successfully profiling my OSGi-based web application. I
> can view Execution statistic information, but I can't see Method
> Invocation flow and Call Tree. When I'm trying to view Method Invocation
> flow I see an empty field with title "Selected method has no invocation
> information" or "No method selected". When I'm trying to view Call Tree, I
> see the threads list, but without "+"-s, i.e. without child method
> invocation information. And when I'm trying to click by right button of
> mouse on monitor and choose "Open in->Execution flow" I can see Execution
> flow of all threads. But it contains too much information, because my web
> app is very complex, So it would be more convinience to me to analyze
> execution flow of selected methods. Could somebody help me?
>
> P.S.
> Execution environment: JRE 1.6.0_06, Eclipse 3.4, TPTP release - 4.5.1,
> IAC
> Profiling scenario:
> 1. select "Profile" on configured server Tomcat;
> 2. Choose "Execution Time Analysis";
> 3. Edit this data collector and set property "Show execution flow
> graphical details" to true;
> 4. Start profiling
>
> Thank's Vadim
>
>
Re: Empty Execution Flow, Call Tree [message #136718 is a reply to message #136644] Fri, 03 October 2008 08:12 Go to previous messageGo to next message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
Thank's for answer Eugene.

My story is continuing. I've done things, you adviced:
1. I disabled Internal Agent Controller in Window->Preferences->... and
stopped it's process.
2. I created new Java Application configuration for Tomcat and specified
in it's VM arguments this:
-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true
3. I installed Standalone Agent Controller IA32 release 4.5.1.,
successfully configured and ran it.
4. I ran the tomcat using command "Run" and new configuration. I did it at
this moment because if I tried to run command "Profile" before tomcat
started, than agents list will be empty.
5. Then I run "Profile" using "Attach to agent" configuration. Standalone
Agent Controller, I installed at step 3, appeared in agents list at this
step.
6. I open the web page, wich rendering process I want to profile, And get
following:

6.a. Profile monitor had fallen down.
6.b. This error message had appeared in console:

#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d99835d, pid=1864,
tid=4092
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode windows-x86)
# Problematic frame:
# V
#
# An error report file with more information is saved as:
# C:\eclipse\hs_err_pid1864.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
6.c. Started Tomcat had fallen down too.


So, what can I do in this situation?
Thank's a lot for help.
Vadim

P.S. I'm posting eclipse log file, created when servers fell down:

--------------- T H R E A D ---------------

Current thread (0x05170400): JavaThread "Thread-0" daemon

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x00000000, EBX=0x05170400, ECX=0x337ee930, EDX=0x00000000
ESP=0x0563fa70, EBP=0x00000000, ESI=0x00000000, EDI=0x05170d34
EIP=0x6d99835d, EFLAGS=0x00010246

Top of Stack: (sp=0x0563fa70)
0x0563fa70: 05170400 00000000 05165608 0563fb80
0x0563fa80: 0563fb80 00000106 05170a50 05170a4c
0x0563fa90: 05170a54 05170a4c 05170400 05142780
0x0563faa0: 05170940 05170a4c 05170d34 0563fcbc
0x0563fab0: 6d9989fa 00000000 05170a40 05170400
0x0563fac0: 0563fb80 054c1880 0000af01 0563fb80
0x0563fad0: 05170a40 0563fb80 00000000 00000000
0x0563fae0: 0563fb80 0517094c 05165608 05165608

Instructions: (pc=0x6d99835d)
0x6d99834d: 30 8b 54 24 1c 89 44 24 44 8b 0a 8b 51 18 3b d5
0x6d99835d: 8b 00 75 08 8b 49 08 89 48 18 eb 03 89 50 18 8b


Stack: , sp=0x0563fa70, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native
code)
V




--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x07ecd000 JavaThread "Thread-41"
0x07c65400 JavaThread "scheduler-idle-1" daemon
0x07ba4c00 JavaThread "TP-Monitor" daemon
0x05895400 JavaThread "TP-Processor4" daemon
0x07c31400 JavaThread "TP-Processor3" daemon
0x0587a400 JavaThread "TP-Processor2" daemon
0x0589e800 JavaThread "TP-Processor1" daemon
0x07ba3c00 JavaThread "http-8080-Monitor"
0x0790e400 JavaThread "http-8080-Processor25" daemon
0x0790d800 JavaThread "http-8080-Processor24" daemon
0x0790cc00 JavaThread "http-8080-Processor23" daemon
0x05b92800 JavaThread "http-8080-Processor22" daemon
0x05b91c00 JavaThread "http-8080-Processor21" daemon
0x059dc400 JavaThread "http-8080-Processor20" daemon
0x059db400 JavaThread "http-8080-Processor19" daemon
0x059dac00 JavaThread "http-8080-Processor18" daemon
0x07908000 JavaThread "http-8080-Processor17" daemon
0x07907400 JavaThread "http-8080-Processor16" daemon
0x05b44000 JavaThread "http-8080-Processor15" daemon
0x07ba0000 JavaThread "http-8080-Processor14" daemon
0x07b9f400 JavaThread "http-8080-Processor13" daemon
0x05b80800 JavaThread "http-8080-Processor12" daemon
0x07bae400 JavaThread "http-8080-Processor11" daemon
0x079b6400 JavaThread "http-8080-Processor10" daemon
0x07b4fc00 JavaThread "http-8080-Processor9" daemon
0x05b6d400 JavaThread "http-8080-Processor8" daemon
0x05b8c800 JavaThread "http-8080-Processor7" daemon
0x057cc400 JavaThread "http-8080-Processor6" daemon
0x05c78400 JavaThread "http-8080-Processor5" daemon
0x05b8e000 JavaThread "http-8080-Processor4" daemon
0x05be9400 JavaThread "http-8080-Processor3" daemon
0x05b90800 JavaThread "http-8080-Processor2" daemon
0x059dcc00 JavaThread "http-8080-Processor1" daemon
0x05bd9400 JavaThread
"ContainerBackgroundProcessor[StandardEngine]" daemon

0x07c81c00 JavaThread "EvictionTimer-1" daemon
0x07b61000 JavaThread "MailDispatcherThread" daemon
0x078fe400 JavaThread "Scheduler" daemon
0x079fa400 JavaThread "PlannedBackgroundTaskEnqueuer" daemon

0x07a10400 JavaThread "Thread-5" daemon
0x079fd400 JavaThread "Listener:3148" daemon
0x07aa9400 JavaThread "EvictionTimer-0" daemon
0x057fc400 JavaThread "Framework Event Dispatcher" daemon

0x05172800 JavaThread "Low Memory Detector" daemon
0x05171000 JavaThread "CompilerThread0" daemon
=>0x05170400 JavaThread "Thread-0" daemon
0x05168c00 JavaThread "Attach Listener" daemon
0x05168000 JavaThread "Signal Dispatcher" daemon
0x0513a800 JavaThread "Finalizer" daemon
0x05139800 JavaThread "Reference Handler" daemon
0x00395c00 JavaThread "main"

Other Threads:
0x0512f800 VMThread
0x05174400 WatcherThread

VM state:synchronizing (normal execution)

VM Mutex/Monitor currently owned by a thread: ()
Threads_lock - owner thread: 0x0512f800
[0x00395598/0x00002680] Heap_lock - owner thread: 0x0790cc00

Heap
def new generation total 16128K, used 146K [0x12250000, 0x133c0000,
0x149b0000)
eden space 14400K, 1% used [0x12250000, 0x12274b88, 0x13060000)
from space 1728K, 0% used [0x13060000, 0x13060000, 0x13210000)
to space 1728K, 0% used [0x13210000, 0x13210000, 0x133c0000)
tenured generation total 213584K, used 128148K [0x149b0000, 0x21a44000,
0x32250000)
the space 213584K, 59% used [0x149b0000, 0x1c6d52c0, 0x1c6d5400,
0x21a44000)
compacting perm gen total 65536K, used 65535K [0x32250000, 0x36250000,
0x36250000)
the space 65536K, 99% used [0x32250000, 0x3624fff8, 0x36250000,
0x36250000)
No shared spaces configured.

Dynamic libraries:
0x00400000 - 0x00423000 F:\Java\jdk1.6.0_06\bin\javaw.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f8000 C:\WINDOWS\system32\kernel32.dll
0x77dc0000 - 0x77e6c000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f02000 C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000 C:\WINDOWS\system32\Secur32.dll
0x7e360000 - 0x7e3f1000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000 C:\WINDOWS\system32\GDI32.dll
0x76360000 - 0x7637d000 C:\WINDOWS\system32\IMM32.DLL
0x7c340000 - 0x7c396000 F:\Java\jdk1.6.0_06\jre\bin\msvcr71.dll
0x6d870000 - 0x6dac0000 F:\Java\jdk1.6.0_06\jre\bin\client\jvm.dll
0x76b20000 - 0x76b4e000 C:\WINDOWS\system32\WINMM.dll
0x6d320000 - 0x6d328000 F:\Java\jdk1.6.0_06\jre\bin\hpi.dll
0x76be0000 - 0x76beb000 C:\WINDOWS\system32\PSAPI.DLL
0x10000000 - 0x10019000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\JPIBoot Loader.dll
0x008e0000 - 0x008eb000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\Martini OSA.dll
0x00b10000 - 0x00b50000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\JPI.dll
0x01b20000 - 0x01b49000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\JPIAgen t.dll
0x01c60000 - 0x01c82000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\CGProf. dll
0x01da0000 - 0x01db9000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\ACColle ctor.dll
0x01dc0000 - 0x01dde000 C:\tptpAC_ia32\bin\AgentBase.dll
0x01de0000 - 0x01df2000 C:\tptpAC_ia32\bin\transportSupport.dll
0x71a90000 - 0x71aa7000 C:\WINDOWS\system32\WS2_32.dll
0x77c00000 - 0x77c58000 C:\WINDOWS\system32\msvcrt.dll
0x71a80000 - 0x71a88000 C:\WINDOWS\system32\WS2HELP.dll
0x01e00000 - 0x01e27000 C:\tptpAC_ia32\bin\tptpUtils.dll
0x12000000 - 0x12241000 C:\tptpAC_ia32\bin\xerces-c_2_6.dll
0x01e30000 - 0x01e40000 C:\tptpAC_ia32\bin\hcclco.dll
0x01e40000 - 0x01e50000 C:\tptpAC_ia32\bin\hcclsm.dll
0x01e50000 - 0x01e67000 C:\tptpAC_ia32\bin\tptpConfig.dll
0x01e70000 - 0x01e7c000 C:\tptpAC_ia32\bin\processControlUtil.dll
0x01e80000 - 0x01e8c000 C:\tptpAC_ia32\bin\tptpLogUtils.dll
0x028c0000 - 0x028cf000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\CGAdapt or.dll
0x029e0000 - 0x02a62000
C:\tptpAC_ia32\plugins\org.eclipse.tptp.javaprofiler\JIE.dll
0x6d820000 - 0x6d82c000 F:\Java\jdk1.6.0_06\jre\bin\verify.dll
0x6d3c0000 - 0x6d3df000 F:\Java\jdk1.6.0_06\jre\bin\java.dll
0x6d860000 - 0x6d86f000 F:\Java\jdk1.6.0_06\jre\bin\zip.dll
0x6d620000 - 0x6d633000 F:\Java\jdk1.6.0_06\jre\bin\net.dll
0x06540000 - 0x0658b000 C:\WINDOWS\system32\imon.dll
0x774d0000 - 0x7760d000 C:\WINDOWS\system32\ole32.dll
0x71ab0000 - 0x71aba000 C:\WINDOWS\system32\WSOCK32.dll
0x065a0000 - 0x065ac000 C:\Program Files\Eset\pr_imon.dll
0x71a30000 - 0x71a70000 C:\WINDOWS\system32\mswsock.dll
0x698b0000 - 0x69908000 C:\WINDOWS\system32\hnetcfg.dll
0x71a70000 - 0x71a78000 C:\WINDOWS\System32\wshtcpip.dll
0x6d640000 - 0x6d649000 F:\Java\jdk1.6.0_06\jre\bin\nio.dll
0x76f10000 - 0x76f37000 C:\WINDOWS\system32\DNSAPI.dll
0x76fa0000 - 0x76fa8000 C:\WINDOWS\System32\winrnr.dll
0x76f50000 - 0x76f7d000 C:\WINDOWS\system32\WLDAP32.dll
0x76fb0000 - 0x76fb6000 C:\WINDOWS\system32\rasadhlp.dll

VM Arguments:
jvm_args: -Dcatalina.home=D:\tomcat
-Djava.endorsed.dirs=D:\tomcat\common\endorsed -Dcatalina.base=D:\tomcat
-Djava.io.tmpdir=D:\tomcat\temp
-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true
-Xms128m -Xmx512m -Dfile.encoding=UTF-8
java_command: org.apache.catalina.startup.Bootstrap -config
D:\tomcat\conf\server.xml start
Launcher Type: SUN_STANDARD

Environment Variables:
JAVA_HOME=F:\Java\jdk1.6.0_06\
PATH=F:/Java/jre1.6.0_06/bin/client;F:/Java/jre1.6.0_06/bin; C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;F:\J ava\jdk1.6.0\bin\;C:\Program
Files\Intel\DMIX;;F:\eclipse\plugins\org.apache.ant_1.6.5\bi n;C:\Program
Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Common
Files\GTK\2.0\bin;C:\Program Files\Common
Files\GTK\2.0\lib;C:\tptpAC_ia32\plugins\org.eclipse.tptp.ja vaprofiler;C:\tptpAC_ia32\bin
USERNAME=1
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 4, GenuineIntel



--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 3

CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 6
stepping 4, cmov, cx8, fxsr, mmx, sse, sse2, sse3

Memory: 4k page, physical 2086936k(653840k free), swap 4024928k(2631608k
free)

vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE
(1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1

time: Fri Oct 03 13:47:26 2008
elapsed time: 295 seconds
Re: Empty Execution Flow, Call Tree [message #136730 is a reply to message #136718] Fri, 03 October 2008 08:37 Go to previous messageGo to next message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
I solved the last issue by inceasing of MaxPermSize up to 96m!

Profiling is working, but execution flow and method invocation information
are still empty.

I've done something wrong?

Thank's for help
Vadim
Re: Empty Execution Flow, Call Tree [message #136753 is a reply to message #136730] Fri, 03 October 2008 15:56 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene Chan
Messages: 287
Registered: July 2009
Senior Member
What is the filter setting of your configuration? Is your target application
INCLUDED in the filter setting?
Is your agent in Monitoring mode or Attach mode? If it is in attach mode,
you should start monitoring with the action available in the context menu of
the agent in selection.

Eugene

"Vadim Gindin" <vgindin@gmail.com> wrote in message
news:42662848306cb603684c33e20fd9e8e0$1@www.eclipse.org...
>I solved the last issue by inceasing of MaxPermSize up to 96m!
>
> Profiling is working, but execution flow and method invocation information
> are still empty.
>
> I've done something wrong?
>
> Thank's for help
> Vadim
>
Re: Empty Execution Flow, Call Tree [message #136801 is a reply to message #136753] Mon, 06 October 2008 08:34 Go to previous messageGo to next message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
Eugene Chan wrote:

> What is the filter setting of your configuration? Is your target application
> INCLUDED in the filter setting?

There is no filter settings in my configuration.

> Is your agent in Monitoring mode or Attach mode? If it is in attach mode,
> you should start monitoring with the action available in the context menu of
> the agent in selection.

I think, that the agent is in Monitoring mode, because of "start
monitoring" function is disabled in the context menu.


I made following observations:


1. I had only one scenario of profiling my webapp: run Tomcat using "Run"
(without -agent option) and then "Attach to agent" to runned Standalone
Agent. And, remind, I can see execution statistics but without method
invocation flow.
But I paid attention that agent icon in "Profiling Monitor" View is the
same, that the icon, that appears when I ran the "Profile the server" -
server icon.


2. When I tried to run "Profile" with my Tomcat configuration, I'm getting
the error:

org.eclipse.osgi error loading hook:
ru.naumen.fx.internal.FxHookConfigurator
java.lang.ClassNotFoundException: ru.naumen.fx.internal.FxHookConfigurator

When I tried to run "Run" with my Tomcat configuration, server is starting
ok.
I also paid attention that in this case agent icon is the same as usual
Java application (not server) - java application icon. I tried to solve
this problem by adding of my projects to CLASSPATH in configuration, but
it was not helped: after that I got an error, that Tomcat could not found
the necessary Locale:

java.util.MissingResourceException: Can't find bundle for base name
org.apache.coyote.tomcat5.LocalStrings, locale ru_RU


3. I decided to run Tomcat outside of Eclipse with

-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true

option (in controlled mode of server) and run command "Attach to agent" in
eclipse exactly as you wrote in one of your previous messages. But I've
got the same result as in issue 1. (Including server icon)


4. When I try to run the Tomcat with option:

-agentlib:JPIBootLoader=JPIAgent:server=controlled;CGProf:ex ecdetails=true

It is not starting with absolutely empty console in both cases: when I run
tomcat under eclipse workbench and when I run tomcat externally to eclipse
using startup.bat.


Ñonclusive questions.
1. How can I run the Tomcat as Java Application, but not as Server?
2. Why does Eclipse recognise external runned Tomcat as Server too?
3. The main question. How can I get the method invocation information of
one of methods of the webapp, runned under Tomcat?

Hope for answers
Vadim
Re: Empty Execution Flow, Call Tree [message #136833 is a reply to message #136801] Mon, 06 October 2008 14:42 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene Chan
Messages: 287
Registered: July 2009
Senior Member
Hi Vadim,

To collect data for your profile session, you must configure the profiling
filter in the attach configuration, Select a profiler under the 'monitor'
tab of the attach configuration dialog and click 'Edit Option' opens a
filter dialog UI where you can edit your own filter or modified predefined
filter. you should edit a filter set to INCLUDE your target
package/class/method to trigger collection of your profiling data.

It sounds like the agent is correctly attach and monitoring. Try the steps
above to setup profiling filter to trigger collection of data.

In 1. I am not sure how you can Run a Tomcat with no vm argument (-agent
option) and attach to an agent. Do you mean you have modified the server
startup.bat with the vm argument instead for attach?
In 2. It looks like your classpath may not have everything included for the
profile to run.

To start a Tomcat as a Java application, you will need all the launch
parameter from the startup.bat file. Alternatively, you can try look at the
Process view in the Debug perspective to look at the server process launched
and check its parameter with the properties option of a server process in
the view.

To collection data for Execution Flow, make sure you have the proper filter
setup for your profile.

HTH,
Eugene


"Vadim Gindin" <vgindin@gmail.com> wrote in message
news:308ca9dc5a0a8c8fe1024a251a21350e$1@www.eclipse.org...
> Eugene Chan wrote:
>
>> What is the filter setting of your configuration? Is your target
>> application INCLUDED in the filter setting?
>
> There is no filter settings in my configuration.
>> Is your agent in Monitoring mode or Attach mode? If it is in attach mode,
>> you should start monitoring with the action available in the context menu
>> of the agent in selection.
>
> I think, that the agent is in Monitoring mode, because of "start
> monitoring" function is disabled in the context menu.
>
>
> I made following observations:
>
>
> 1. I had only one scenario of profiling my webapp: run Tomcat using "Run"
> (without -agent option) and then "Attach to agent" to runned Standalone
> Agent. And, remind, I can see execution statistics but without method
> invocation flow.
> But I paid attention that agent icon in "Profiling Monitor" View is the
> same, that the icon, that appears when I ran the "Profile the server" -
> server icon.
>
> 2. When I tried to run "Profile" with my Tomcat configuration, I'm getting
> the error:
>
> org.eclipse.osgi error loading hook:
> ru.naumen.fx.internal.FxHookConfigurator
> java.lang.ClassNotFoundException: ru.naumen.fx.internal.FxHookConfigurator
>
> When I tried to run "Run" with my Tomcat configuration, server is starting
> ok.
> I also paid attention that in this case agent icon is the same as usual
> Java application (not server) - java application icon. I tried to solve
> this problem by adding of my projects to CLASSPATH in configuration, but
> it was not helped: after that I got an error, that Tomcat could not found
> the necessary Locale:
>
> java.util.MissingResourceException: Can't find bundle for base name
> org.apache.coyote.tomcat5.LocalStrings, locale ru_RU
>
>
> 3. I decided to run Tomcat outside of Eclipse with
> -agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true
>
> option (in controlled mode of server) and run command "Attach to agent" in
> eclipse exactly as you wrote in one of your previous messages. But I've
> got the same result as in issue 1. (Including server icon)
>
>
> 4. When I try to run the Tomcat with option:
>
> -agentlib:JPIBootLoader=JPIAgent:server=controlled;CGProf:ex ecdetails=true
>
> It is not starting with absolutely empty console in both cases: when I run
> tomcat under eclipse workbench and when I run tomcat externally to eclipse
> using startup.bat.
>
>
>
Re: Empty Execution Flow, Call Tree [message #136870 is a reply to message #136833] Tue, 07 October 2008 11:08 Go to previous messageGo to next message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
Hi Eugene.

Thank's for your answers. I will try to answer your questions and describe
my current situation.

Eugene Chan wrote:

> Hi Vadim,

> To collect data for your profile session, you must configure the profiling
> filter in the attach configuration, Select a profiler under the 'monitor'
> tab of the attach configuration dialog and click 'Edit Option' opens a
> filter dialog UI where you can edit your own filter or modified predefined
> filter. you should edit a filter set to INCLUDE your target
> package/class/method to trigger collection of your profiling data.

I used default profiling filter settings before. The problem is not in
filter settings, as I think, because I can change filter settings after
agent started. I could see my filtered packages after changing filter
settings in Execution Statistics View for example. But I tried to add my
packages in filter settings too.

> It sounds like the agent is correctly attach and monitoring. Try the steps
> above to setup profiling filter to trigger collection of data.

> In 1. I am not sure how you can Run a Tomcat with no vm argument (-agent
> option) and attach to an agent. Do you mean you have modified the server
> startup.bat with the vm argument instead for attach?

No I don't. I mean, I'm creating new "Java Application" launch
configuration, than specifying org.apache.catalina.startup.Bootstrap as
main class, than specifying "start" as command argument, then specifying
other VM arguments such as TOMCAT_HOME, TOMCAT_BASE, JAVA_HOME and others,
then specifying CLASSPATH adding <TOMCAT_HOME>\bin\boostrap.jar and some
others and so on. Then I'm running "Run" using this configuration. After
Tomcat had started I'm runing "Profile" using "Attach to Agent"
configuration and so on. I used precisely this scenario.

> In 2. It looks like your classpath may not have everything included for the
> profile to run.

Today I tried to fix classpath problems. And as result Tomcat began
starting. But unfortunately at the step of building Hibernate session
factory the Tomcat is stopping to respond. Processor is loaded in 50-70%
of it's power at that. At this time this is exclusive way for me to try to
run Tomcat as Java Application. But unfortunately it fails, and I don't
know why.

> To start a Tomcat as a Java application, you will need all the launch
> parameter from the startup.bat file. Alternatively, you can try look at the
> Process view in the Debug perspective to look at the server process launched
> and check its parameter with the properties option of a server process in
> the view.

> To collection data for Execution Flow, make sure you have the proper filter
> setup for your profile.

I noticed something, when calling Attach to agent dialog. I'm opening
"Edit Options" of Execution Time Analysis and under Edit dialog title I
see the notice: "Analize the application execution time by monitoring
method time information. Note: Call graph not supported on agent
attach/detach scenario with JRE 1.5 or newer". So, attach/detach scenario
is not for me, if I want to see method invocation flow.

My situation.

1. Resuming my previous messages I can say I couldn't run Tomcat using
controlled mode: tomcat was not responding and console was empty.
2. I can "Run" Tomcat using enabled server mode
(-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:exec details=true)
and then run "Profile" with "Attach to Agent" configuration. And
successfully collect execution statistics. .
3. But method invocation flow is unavailable because of NOTE described
above. I can't using attach mechanism because call graph is not supported
then.
3. The only way, as I think, is to profile Tomcat as Java Application
under eclipse using procedure described above (run "Profile" with "Java
Application" configuration of Tomcat). But for some strange reasons,
Tomcat is stopping to respond. I tried to increase heap sizes, but it was
not helped.

So I don't know what to do.

Hope, that my situation is clear, and decision of my problem exists.
Thanks.
Vadim

> HTH,
> Eugene


> "Vadim Gindin" <vgindin@gmail.com> wrote in message
> news:308ca9dc5a0a8c8fe1024a251a21350e$1@www.eclipse.org...
>> Eugene Chan wrote:
>>
>>> What is the filter setting of your configuration? Is your target
>>> application INCLUDED in the filter setting?
>>
>> There is no filter settings in my configuration.
>>> Is your agent in Monitoring mode or Attach mode? If it is in attach mode,
>>> you should start monitoring with the action available in the context menu
>>> of the agent in selection.
>>
>> I think, that the agent is in Monitoring mode, because of "start
>> monitoring" function is disabled in the context menu.
>>
>>
>> I made following observations:
>>
>>
>> 1. I had only one scenario of profiling my webapp: run Tomcat using "Run"
>> (without -agent option) and then "Attach to agent" to runned Standalone
>> Agent. And, remind, I can see execution statistics but without method
>> invocation flow.
>> But I paid attention that agent icon in "Profiling Monitor" View is the
>> same, that the icon, that appears when I ran the "Profile the server" -
>> server icon.
>>
>> 2. When I tried to run "Profile" with my Tomcat configuration, I'm getting
>> the error:
>>
>> org.eclipse.osgi error loading hook:
>> ru.naumen.fx.internal.FxHookConfigurator
>> java.lang.ClassNotFoundException: ru.naumen.fx.internal.FxHookConfigurator
>>
>> When I tried to run "Run" with my Tomcat configuration, server is starting
>> ok.
>> I also paid attention that in this case agent icon is the same as usual
>> Java application (not server) - java application icon. I tried to solve
>> this problem by adding of my projects to CLASSPATH in configuration, but
>> it was not helped: after that I got an error, that Tomcat could not found
>> the necessary Locale:
>>
>> java.util.MissingResourceException: Can't find bundle for base name
>> org.apache.coyote.tomcat5.LocalStrings, locale ru_RU
>>
>>
>> 3. I decided to run Tomcat outside of Eclipse with
>> -agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true
>>
>> option (in controlled mode of server) and run command "Attach to agent" in
>> eclipse exactly as you wrote in one of your previous messages. But I've
>> got the same result as in issue 1. (Including server icon)
>>
>>
>> 4. When I try to run the Tomcat with option:
>>
>> -agentlib:JPIBootLoader=JPIAgent:server=controlled;CGProf:ex ecdetails=true
>>
>> It is not starting with absolutely empty console in both cases: when I run
>> tomcat under eclipse workbench and when I run tomcat externally to eclipse
>> using startup.bat.
>>
>>
>> Ñonclusive questions.
>> 1. How can I run the Tomcat as Java Application, but not as Server?
>> 2. Why does Eclipse recognise external runned Tomcat as Server too?
>> 3. The main question. How can I get the method invocation information of
>> one of methods of the webapp, runned under Tomcat?
>>
>> Hope for answers
>> Vadim
>>
Re: Empty Execution Flow, Call Tree [message #136882 is a reply to message #136870] Tue, 07 October 2008 21:09 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene Chan
Messages: 287
Registered: July 2009
Senior Member
Hi Vadim,

When you try with controlled mode, the process is actually suspended until
it's attached. That may explain why you don't see anything in console and
process is behaved like frozen. Try attach to the agent right after the
process is started in controlled mode.

Eugene

"Vadim Gindin" <vgindin@gmail.com> wrote in message
news:56d4b73013b92a5f4e5068e2f3e05b0b$1@www.eclipse.org...
> Hi Eugene.
> Thank's for your answers. I will try to answer your questions and describe
> my current situation.
>
> Eugene Chan wrote:
>
>> Hi Vadim,
>
>> To collect data for your profile session, you must configure the
>> profiling filter in the attach configuration, Select a profiler under the
>> 'monitor' tab of the attach configuration dialog and click 'Edit Option'
>> opens a filter dialog UI where you can edit your own filter or modified
>> predefined filter. you should edit a filter set to INCLUDE your target
>> package/class/method to trigger collection of your profiling data.
>
> I used default profiling filter settings before. The problem is not in
> filter settings, as I think, because I can change filter settings after
> agent started. I could see my filtered packages after changing filter
> settings in Execution Statistics View for example. But I tried to add my
> packages in filter settings too.
>> It sounds like the agent is correctly attach and monitoring. Try the
>> steps above to setup profiling filter to trigger collection of data.
>
>> In 1. I am not sure how you can Run a Tomcat with no vm argument (-agent
>> option) and attach to an agent. Do you mean you have modified the server
>> startup.bat with the vm argument instead for attach?
>
> No I don't. I mean, I'm creating new "Java Application" launch
> configuration, than specifying org.apache.catalina.startup.Bootstrap as
> main class, than specifying "start" as command argument, then specifying
> other VM arguments such as TOMCAT_HOME, TOMCAT_BASE, JAVA_HOME and others,
> then specifying CLASSPATH adding <TOMCAT_HOME>\bin\boostrap.jar and some
> others and so on. Then I'm running "Run" using this configuration. After
> Tomcat had started I'm runing "Profile" using "Attach to Agent"
> configuration and so on. I used precisely this scenario.
>
>> In 2. It looks like your classpath may not have everything included for
>> the profile to run.
>
> Today I tried to fix classpath problems. And as result Tomcat began
> starting. But unfortunately at the step of building Hibernate session
> factory the Tomcat is stopping to respond. Processor is loaded in 50-70%
> of it's power at that. At this time this is exclusive way for me to try to
> run Tomcat as Java Application. But unfortunately it fails, and I don't
> know why.
>
>> To start a Tomcat as a Java application, you will need all the launch
>> parameter from the startup.bat file. Alternatively, you can try look at
>> the Process view in the Debug perspective to look at the server process
>> launched and check its parameter with the properties option of a server
>> process in the view.
>
>> To collection data for Execution Flow, make sure you have the proper
>> filter setup for your profile.
>
> I noticed something, when calling Attach to agent dialog. I'm opening
> "Edit Options" of Execution Time Analysis and under Edit dialog title I
> see the notice: "Analize the application execution time by monitoring
> method time information. Note: Call graph not supported on agent
> attach/detach scenario with JRE 1.5 or newer". So, attach/detach scenario
> is not for me, if I want to see method invocation flow.
>
> My situation.
> 1. Resuming my previous messages I can say I couldn't run Tomcat using
> controlled mode: tomcat was not responding and console was empty. 2. I can
> "Run" Tomcat using enabled server mode
> (-agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:exec details=true)
> and then run "Profile" with "Attach to Agent" configuration. And
> successfully collect execution statistics. .
> 3. But method invocation flow is unavailable because of NOTE described
> above. I can't using attach mechanism because call graph is not supported
> then.
> 3. The only way, as I think, is to profile Tomcat as Java Application
> under eclipse using procedure described above (run "Profile" with "Java
> Application" configuration of Tomcat). But for some strange reasons,
> Tomcat is stopping to respond. I tried to increase heap sizes, but it was
> not helped.
>
> So I don't know what to do.
> Hope, that my situation is clear, and decision of my problem exists.
> Thanks.
> Vadim
>
>> HTH,
>> Eugene
>
>
>> "Vadim Gindin" <vgindin@gmail.com> wrote in message
>> news:308ca9dc5a0a8c8fe1024a251a21350e$1@www.eclipse.org...
>>> Eugene Chan wrote:
>>>
>>>> What is the filter setting of your configuration? Is your target
>>>> application INCLUDED in the filter setting?
>>>
>>> There is no filter settings in my configuration.
>>>> Is your agent in Monitoring mode or Attach mode? If it is in attach
>>>> mode, you should start monitoring with the action available in the
>>>> context menu of the agent in selection.
>>>
>>> I think, that the agent is in Monitoring mode, because of "start
>>> monitoring" function is disabled in the context menu.
>>>
>>>
>>> I made following observations:
>>>
>>>
>>> 1. I had only one scenario of profiling my webapp: run Tomcat using
>>> "Run" (without -agent option) and then "Attach to agent" to runned
>>> Standalone Agent. And, remind, I can see execution statistics but
>>> without method invocation flow.
>>> But I paid attention that agent icon in "Profiling Monitor" View is the
>>> same, that the icon, that appears when I ran the "Profile the server" -
>>> server icon.
>>>
>>> 2. When I tried to run "Profile" with my Tomcat configuration, I'm
>>> getting the error:
>>>
>>> org.eclipse.osgi error loading hook:
>>> ru.naumen.fx.internal.FxHookConfigurator
>>> java.lang.ClassNotFoundException:
>>> ru.naumen.fx.internal.FxHookConfigurator
>>>
>>> When I tried to run "Run" with my Tomcat configuration, server is
>>> starting ok.
>>> I also paid attention that in this case agent icon is the same as usual
>>> Java application (not server) - java application icon. I tried to solve
>>> this problem by adding of my projects to CLASSPATH in configuration, but
>>> it was not helped: after that I got an error, that Tomcat could not
>>> found the necessary Locale:
>>>
>>> java.util.MissingResourceException: Can't find bundle for base name
>>> org.apache.coyote.tomcat5.LocalStrings, locale ru_RU
>>>
>>>
>>> 3. I decided to run Tomcat outside of Eclipse with
>>> -agentlib:JPIBootLoader=JPIAgent:server=enabled;CGProf:execd etails=true
>>>
>>> option (in controlled mode of server) and run command "Attach to agent"
>>> in eclipse exactly as you wrote in one of your previous messages. But
>>> I've got the same result as in issue 1. (Including server icon)
>>>
>>>
>>> 4. When I try to run the Tomcat with option:
>>>
>>> -agentlib:JPIBootLoader=JPIAgent:server=controlled;CGProf:ex ecdetails=true
>>>
>>> It is not starting with absolutely empty console in both cases: when I
>>> run tomcat under eclipse workbench and when I run tomcat externally to
>>> eclipse using startup.bat.
>>>
>>>
>>>
Re: Empty Execution Flow, Call Tree [message #136894 is a reply to message #136882] Wed, 08 October 2008 07:57 Go to previous message
Vadim Gindin is currently offline Vadim Gindin
Messages: 6
Registered: July 2009
Junior Member
Well :), It works at last!

I fixed a lot of classpath problems and ran Tomcat using "Profile" command
with "Java Application" tomcat configuration. I corrected filter settings
to decrease the number of packages (to decrease CPU workload) and finally
ran Tomcat. But after server started, web pages were not working. I
decided to try the way you describe in the last message, and it helped
inspite of NOTE in "Edit option" dialog of "Execution Time Analysis", that
Call graph is nut supported in attach/detach scenario.

May be there is the point to make an accent about this specialty in
documentation.

So, Eugene, thank's a lot for help and patience.
Have a nice day
Vadim

Eugene Chan wrote:

> Hi Vadim,

> When you try with controlled mode, the process is actually suspended until
> it's attached. That may explain why you don't see anything in console and
> process is behaved like frozen. Try attach to the agent right after the
> process is started in controlled mode.

> Eugene
Previous Topic:integrating tptp with my product.
Next Topic:4.5.1 IAC profiling failure: org.eclipse.tptp.jvmti unavailable: JPIBootLoader
Goto Forum:
  


Current Time: Wed Sep 17 05:42:12 GMT 2014

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

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