Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

vtune for our java web based application

Priyadhars_K_Intel
417 Views
After a lot of trials we were not able to use vtune for our java web based application .

We were not able to launch a web based application i.e. .war file from vtune.

According to study we realized that vtune does not support it directly, so please let me know what can be done.
0 Kudos
5 Replies
TimP
Honored Contributor III
417 Views
Did you try setting up the entire environment and launching the application in a script?
0 Kudos
David_A_Intel1
Employee
417 Views
After a lot of trials we were not able to use vtune for our java web based application .

We were not able to launch a web based application i.e. .war file from vtune.

According to study we realized that vtune does not support it directly, so please let me know what can be done.

What is a .war file and what application executes it? You need to have the VTune analyzer launch the app that executes that type of file.

0 Kudos
Amol_Ghotankar
Beginner
417 Views

What is a .war file and what application executes it? You need to have the VTune analyzer launch the app that executes that type of file.

A .war file is a web application archive. It is self extractable archive which is directly deployed on tomcat server.

Apache tomcat (or similar to IIS) application loads these war files, extract them and make them ready to use to clients.

Clients use web application using Internet explorer.

Now, I would like to know how to profile such web application using tomcat also do we need profile internet explorer also.

Again the web applications uses database like mysql and is there need to profile mysql also.

Tomcat internally uses javaw.exe (i am not sure), so do we need to profile it also.

I appreciate your reply.
0 Kudos
Peter_W_Intel
Employee
417 Views

As I know, VTune Analyzer only supports java program's profiling by using JVMand launchingclass file .java or .jar.

For example (in command line),

vtl activity -d 360 -c sampling -o "java" -app "JVM_Pathjava, -jar Jar_Pathfn.jar" run
vtl activity -d 360 -c callgraph -o "java" -app "JVM_Pathjava, -cp Java_File_Path java_file" run

I don't think that javaw.exe will be supported, javaw.exe should have hook functions then can communicate with VTune Analyzer, supported JVMs are described in release notes.

Regards, Peter
0 Kudos
David_A_Intel1
Employee
417 Views
Quoting - Amol Ghotankar
A .war file is a web application archive. It is self extractable archive which is directly deployed on tomcat server.

Apache tomcat (or similar to IIS) application loads these war files, extract them and make them ready to use to clients.

Clients use web application using Internet explorer.

Now, I would like to know how to profile such web application using tomcat also do we need profile internet explorer also.

Again the web applications uses database like mysql and is there need to profile mysql also.

Tomcat internally uses javaw.exe (i am not sure), so do we need to profile it also.

I appreciate your reply.

I've had experience getting VTune analyzer profiling working on a Tomcat server with Jboss - it was difficult, at best. Basically, there are just too many levels of apps running.

Sampling is the easiest to get working, but you need to update the startup scripts so that where javaw is launched, you launch the VTune analyzer command line, vtl, and tell it to launch javaw.exe, being sure to pass the command line option to the JVM (javaw.exe) to enable profiling, typically, -agentlib:javaperf.

Also, if you are collecting too much data, you may need to use the Pause/Resume APIs from your java code, then start collection paused and resume collection from within your code.

I think Peter is correct, also. I don't think it will work with javaw.exe, but you can easily download and run Sun's JVM via their JRE or JDK.

0 Kudos
Reply