Java profiler results.

Greetings all ---
I am trying to use the java profiler that comes with the jvm (jdk1.3). Searching the forums, I found the suggestion to run with -Xprof switch. I did that here are my results. Can someone please explain:
I ran my program with this command
java -Xprof findLinkThread
Flat profile of 26.56 secs (2586 total ticks): Keep-Alive-Timer:localhost
Thread-local ticks:
100.0% 2586      Blocked (of total)
Flat profile of 83.34 secs (8077 total ticks): Thread-1
Thread-local ticks:
100.0% 8077      Blocked (of total)
Global summary of 84.84 seconds :
100.0% 8262      Received ticks
0.4% 35      Received GC ticks
0.2% 13     Compilation
0.0% 2 Other VM operations
0.8% 66 Class loader
0.0% 2 Unknown code
what does this mean ? is it good or bad ?
can I get the prepackaged profiler to tell me anything useful in terms of what is slowing things down etc /
stev

All that those results say to me is that garbage collection and class loading doesn't represent much of a hit for your application. I think you were after something a little more like...$ java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
$java -Xrunhprof:help
Hprof usage: -Xrunhprof[:help]|[<option>=<value>, ...]
Option Name and Value   Description             Default
heap=dump|sites|all     heap profiling          all
cpu=samples|times|old   CPU usage               off
monitor=y|n             monitor contention      n
format=a|b              ascii or binary output  a
file=<file>             write data to file      java.hprof(.txt for ascii)
net=<host>:<port>       send data over a socket write to file
depth=<size>            stack trace depth       4
cutoff=<value>          output cutoff point     0.0001
lineno=y|n              line number in traces?  y
thread=y|n              thread in traces?       n
doe=y|n                 dump on exit?           y
Example: java -Xrunhprof:cpu=samples,file=log.txt,depth=3 FooClass
$java -Xrunhprof:cpu=times,file=prof.txt,depth=10 Shuffle
$cat prof.txt
CPU TIME (ms) BEGIN (total = 180) Mon Nov 19 11:10:57 2001
rank   self  accum   count trace method
   1 11.11% 11.11%       5    14 java.util.jar.Attributes.read
   2  5.56% 16.67%       3     9 java.io.PrintStream.write
   3  5.56% 22.22%       1    10 java.util.Properties.load
   4  5.56% 27.78%      30    17 java.io.PrintStream.write
   5  5.56% 33.33%       1     3 java.security.Security.loadProviders
   6  5.56% 38.89%       5    11 java.io.ByteArrayInputStream.<init>
   7  5.56% 44.44%     831     8 java.util.jar.Attributes$Name.isAlpha
   8  5.56% 50.00%       1     2 java.lang.ClassLoader$NativeLibrary.load
   9  5.56% 55.56%       5     7 sun.misc.URLClassPath$JarLoader.getClassPath
  10  5.56% 61.11%     105     5 java.io.BufferedReader.readLine
  11  5.56% 66.67%       1     6 java.io.Win32FileSystem.getBooleanAttributes
  12  5.56% 72.22%      44    12 java.lang.StringBuffer.expandCapacity
  13  5.56% 77.78%     185    16 java.lang.StringBuffer.append
  14  5.56% 83.33%       1    13 java.lang.ClassLoader.checkCerts
  15  5.56% 88.89%       1    18 java.io.FilePermission.<init>
  16  5.56% 94.44%      30     4 java.io.PrintStream.newLine
  17  5.56% 100.00%     210    15 java.io.Win32FileSystem.isSlashFor example, in the above profile, StringBuffer.expandCapacity takes 5% of the running time, so I might want to create my StringBuffers with higher initial capacity.
BTW- this was running on Windows NT, the runhprof options may be different (or omitted) on other platforms.
Hope this helps,
-Troy

Similar Messages

  • YourKit Java Profiler 6.0.16

    Hi here is my problem, I am using the YourKit Java Profiler.
    everytime time I am closing a JInternalFrame what I noticed in this YourKit Profiler is that Allocated Memory is not decreasing when I dispose() the JInternalFrame. What do I need to do so when I dispose() this JInternalFrame the Allocated Memory is free up.
    Allocated Memory is only increasing.
    Please I need big help on this one.
    Wilfer

    We have been running 1.6 update 12 without any problems.  We have only encountered problems when we recently updated to update 16. 
    For security purposes we are unable to use 1.5 because of some security flaw.

  • Help Urgent: Java Profiler

    Hi Frds,
    I am preparing a java profiler tool..i've seen a sample java profiler code..observed code with servlets and jsp..i'm new to J2EE..can you please tell me how to initiate it..i've observed few things to prepare own java profiler..
    Hook
    Java Agent
    ASM plugin
    plz..Can any one explain more about it..so that i can start writing code on it..
    thx in advance
    Rajesh.

    It is the project file(.jpx) and it has more than 1000 files in it..and it is completely applet application.. and it is not even showing what operation is unsupported..when i change to JDK1.4 ,it is working fine..the moment i shfted to jdk5.0 and try to rebuild it is giving "java.lang.UnsupportedOperationException" and it is not giving any other info.now..any one plz..help..

  • Java profiler

    Hi;
    I search a java profiler tool free like OPtimiZeit or Jprobe for testing my j2ee application ?
    Regards;

    There are free profilers, but I would suggest using an evaluation license of OptimizeIT and/or Jprofiler or JProbe.
    They will do a better jobs, possible so good, you will solve the problem before the license expires :)

  • Java profiler for WLS6 on Solaris.

    Hi,
    Is there any profiler that supports the Sun JDK 1.3.0 on Solaris, as
    OptimizeIt doesn't even start and JProbe hangs when trying to profile
    the server.
    Thanks,
    Deyan
    [dejan_bektchiev.vcf]

    To make it work a little better (but 100 times slower ;-) turn off hotspot
    and jit!!!
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    Yes,
    It is more stable than the others -- doesn't crash sometimes for 10minutes
    but it's not enough for me to collect performance data but I am still
    trying so eventually I might be able to gather some.
    I keep getting
    # HotSpot Virtual Machine Error, Unexpected Signal 11
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 4F533F534F4C415249530E435050079A 01
    # Problematic Thread: prio=5 tid=0x2a3328 nid=0x8 runnable
    but since without the profiler settings I do not get the problem I am
    unable to say what happens and the behaviour is not consistent --sometimes
    the JVM crashes at WLS startup sometimes later.
    Thanks,
    Deyan
    Cameron Purdy wrote:
    Have you tried the JDK's profiler?
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Is there any profiler that supports the Sun JDK 1.3.0 on Solaris, as
    OptimizeIt doesn't even start and JProbe hangs when trying to profile
    the server.
    Thanks,
    Deyan

  • Get content of web page in java. Result - bad chars.

    My common task is - get content of page in java. And parse data on this page.
    When i am opening page in browser - i have a good look of all data. But when i am using java code for getting page content i have a bad content with bad chars.
    How to do it right?
    Thanx in advance!
    public static void main(String[] args) {
                 String url_get_page = "http://www.pai.pt/search.ds?activeSort=name+-maindocflag|asc&distSort=false&encodedRefinement=namechar1..%3d..^A%24..%26..A&what=Advogados&startingPageNumber=1&stageName=What+search&originalOffset=1&expandWWWSearch=false&myplaces=false&distance=50&searchType=www&phoneNumberSearch=false&advancedSearch=true&alphaRefineable=AN4683|BN317|CN2373|DN696|EN704|FN1549|GN456|HN539|IN670|JN3704|KN8|LN1433|MN4143|NN606|ON318|PN1727|QN9|RN1383|SN1522|TN484|UN14|VN677|WN16|XN8|YN4|ZN23|[0-9]N0&excludeZone=false&restoSearch=false&firstMaxRank=43522&previousPath=search";
                 StringBuffer result = new StringBuffer();
                 URL url;
              try {
                      url = new URL(url_get_page);               
                         HttpURLConnection connection = null;
                             connection = (HttpURLConnection) url.openConnection();                       
                     connection.setRequestMethod("GET");
                     connection.setDoOutput(true);
                        connection.setReadTimeout(10000);           
                        connection.setRequestProperty("Host", "www.pai.pt");
                        connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6");
                    connection.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
                    connection.setRequestProperty("Accept-Language", "ru,en-us;q=0.7,en;q=0.3");
                    connection.setRequestProperty("Accept-Encoding", "gzip,deflate");
                    connection.setRequestProperty("Accept-Charset", "windows-1251,utf-8;q=0.7,*;q=0.7");
                    connection.setRequestProperty("Keep-Alive", "115");
                    connection.setRequestProperty("Connection", "keep-alive");
                    connection.setRequestProperty("Referer", "http://www.pai.pt/search.ds");
                     connection.setRequestProperty("Cookie", "MfPers=12678646695048a98819027298bf50127329f8c315e8f; vuid=8a98819027298bf50127329f8c315e8f; ptkn=40EAFA18-5758-F374-F570-A0480F306222; WT_FPC=id=174.142.104.57-1456441520.30063880:lv=1267888167073:ss=1267888167073; __utma=76091412.2059393411.1267864686.1267878351.1267891770.4; __utmz=76091412.1267864686.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); BFHost=wd-web04.osl.basefarm.net; JSESSIONID=20C8FD4414F50F3AE361C487D0E3C719; MfTrack=12678917654148a98819027298bf50127329f8c315e8f; BIGipServerwd-web-pt=285284362.20480.0000; __utmb=76091412.1.10.1267891770; __utmc=76091412");           
                     connection.connect();
                     BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream(),"UTF8"));
                     String line;
                     while ((line = rd.readLine()) != null) {
                         result.append(line).append("\n");
                     connection.disconnect();
                   } catch (MalformedURLException e) {
                        e.printStackTrace();
                   } catch (IOException e) {
                        e.printStackTrace();
                System.out.println(result.toString());            
         }

    Now the code is
    public static void main(String[] args) {
                 String url_get_page = "http://www.pai.pt/search.ds?activeSort=name+-maindocflag|asc&distSort=false&encodedRefinement=namechar1..%3d..^A%24..%26..A&what=Advogados&startingPageNumber=1&stageName=What+search&originalOffset=1&expandWWWSearch=false&myplaces=false&distance=50&searchType=www&phoneNumberSearch=false&advancedSearch=true&alphaRefineable=AN4683|BN317|CN2373|DN696|EN704|FN1549|GN456|HN539|IN670|JN3704|KN8|LN1433|MN4143|NN606|ON318|PN1727|QN9|RN1383|SN1522|TN484|UN14|VN677|WN16|XN8|YN4|ZN23|[0-9]N0&excludeZone=false&restoSearch=false&firstMaxRank=43522&previousPath=search";
                 StringBuffer result = new StringBuffer();
                 URL url;
              try {
                      url = new URL(url_get_page);               
                     HttpURLConnection connection = null;
                    connection = (HttpURLConnection) url.openConnection();                       
                     connection.setRequestMethod("GET");
                     connection.setDoOutput(true);
                    connection.setReadTimeout(10000);           
                    connection.setRequestProperty("Host", "www.pai.pt");
                    connection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2) Gecko/20100115 Firefox/3.6");
                    connection.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
                    connection.setRequestProperty("Accept-Language", "ru,en-us;q=0.7,en;q=0.3");
                    connection.setRequestProperty("Accept-Encoding", "gzip,deflate");
                    //connection.setRequestProperty("Accept-Charset", "windows-1251,utf-8;q=0.7,*;q=0.7");
                    connection.setRequestProperty("Keep-Alive", "115");
                    connection.setRequestProperty("Connection", "keep-alive");
                    connection.setRequestProperty("Referer", "http://www.pai.pt/search.ds");
                     connection.setRequestProperty("Cookie", "MfPers=12678646695048a98819027298bf50127329f8c315e8f; vuid=8a98819027298bf50127329f8c315e8f; ptkn=40EAFA18-5758-F374-F570-A0480F306222; WT_FPC=id=174.142.104.57-1456441520.30063880:lv=1267888167073:ss=1267888167073; __utma=76091412.2059393411.1267864686.1267878351.1267891770.4; __utmz=76091412.1267864686.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); BFHost=wd-web04.osl.basefarm.net; JSESSIONID=20C8FD4414F50F3AE361C487D0E3C719; MfTrack=12678917654148a98819027298bf50127329f8c315e8f; BIGipServerwd-web-pt=285284362.20480.0000; __utmb=76091412.1.10.1267891770; __utmc=76091412");           
                     connection.connect();
                     BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream(),"UTF8"));
                     String line;
                     while ((line = rd.readLine()) != null) {
                         result.append(line).append("\n");
                     connection.disconnect();
                   } catch (MalformedURLException e) {
                        e.printStackTrace();
                   } catch (IOException e) {
                        e.printStackTrace();
                System.out.println(result.toString());            
         }I have checked in FF encoding of page is - UTF8.
    The problem still exists.

  • Third party profiles results in color shifts

    Using LR on a calibrated iMac and printing to an Epson Pro 3800, I'm now getting easily noticeable color ***** in the printed output, when using 3rd party paper profiles (e.g. Hahnemuhle Fine Art Pearl or Pixel Genius Epson Exhibition Fiber profile), but if I specify an Epson profile, the output is a perfect screen match!? I specified the Epson Glossy Photo profile in LR and printed on their new Exhibition Fiber paper, and the print was perfect. Of interest here, is that print Preview showed the color shift with the other profiles and printed the same, which suggests Print Preview is an accurate rendition of the final output to paper (and yes ... no color control was specified in the driver).
    This was not the case prior to the last LR update, as the 3rd party profiles the job accurately!?

    "Also, I've emailed the correct people at Epson regarding the issue with the info sheet inside the paper. From what I know and the discussions I've had with the product manager for the 3800 and the EFP, the info sheet is WRONG. But, due to the holidays, I don't expect a response till mid-week next week. "
    I'd be curious to hear back what the response is. I hate ambiguities. There is one other thing that is bothering me about your theory, and that is I just came back from mounting an exhibit of my photos, printed using LR specifying the HFA3800FineArePearlPK.icc profile printing to their Fine Art Pearl paper. The results on paper matches the current LR screen images. This I did I think prior to applying 1.3.1 (a few weeks past). Those images in LR look the same to me, yet the profiles are now visibly altering the tonality. I will re-calibrate, but my confidence level is in the sewer.
    btw I'd love to see what PS does with the profile, but I can't install CS3 trial. It says CS3 is already installed, but it isn't.
    "System check: Adobe Photoshop CS3 cannot be installed because it conflicts with:
    Adobe Photoshop CS3"
    I had installed it a while back, but it got uninstalled along the way. Any tips around this. My gut feeling is CS3 won't have any problems with the profiles.

  • Java Profiling

    Hi All,
    I was wondering if anybody knew how profiling works in Java apps. How is the time computed. Is it based on clock cycles per execution or real time consumed during the excution.
    Also should a profiler output be affected by other apps running .
    Thanks

    There are a lot of profilers for Java, and most of them in fact allow you to choose the way in which time is computed (exact or statistical). Other apps would of course interfere, and although a good tool would
    try to factor out some of the interference, it's NOT recommended to run other apps when you do profiling. You never know in what way (e.g. by effectively increasing your app's disk latency, etc.) they may affect your performance.

  • DIP Profile & result analysis

    Hi GURUS,
    Can anyone explain me in detail, how to create DIP Profile for Biliing and result analysis?
    Regards,
    Partha
    [email protected]

    T.Code: ODP1
    Link: http://help.sap.com/
    Path: SAP Best Practices --> Baseline Packages --> Based on SAP ECC 5.00 --> Select Country: for eg, Localized for India --> Technical Information --> Building Blocks --> Select Country for eg, India -->
    <b>J46 - Fixed Price and Time and Material Billing Project</b>
    In above scerario, in configuration guide, you will get a good understanding on DIP Profile.
    Regards,
    Rajesh Banka
    Reward suitable points.
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left. You also get a point yourself for rewarding (one per thread).

  • Java profiler for AMD64 on Eclipse

    Does anyone know of a profiler that would work with Eclipse for profiling a 64 bit application on an AMD64 Opteron system?
    Thanks,
    Harsha

    To make it work a little better (but 100 times slower ;-) turn off hotspot
    and jit!!!
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    Yes,
    It is more stable than the others -- doesn't crash sometimes for 10minutes
    but it's not enough for me to collect performance data but I am still
    trying so eventually I might be able to gather some.
    I keep getting
    # HotSpot Virtual Machine Error, Unexpected Signal 11
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Error ID: 4F533F534F4C415249530E435050079A 01
    # Problematic Thread: prio=5 tid=0x2a3328 nid=0x8 runnable
    but since without the profiler settings I do not get the problem I am
    unable to say what happens and the behaviour is not consistent --sometimes
    the JVM crashes at WLS startup sometimes later.
    Thanks,
    Deyan
    Cameron Purdy wrote:
    Have you tried the JDK's profiler?
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    Is there any profiler that supports the Sun JDK 1.3.0 on Solaris, as
    OptimizeIt doesn't even start and JProbe hangs when trying to profile
    the server.
    Thanks,
    Deyan

  • Filter hud performance profiling results

    I was really curious why it took so long for the filter hud to open and I think I may have at least a partial answer. I used the awesome Sampler and fs_usage tools that come with the developer kit. I started profiling and pushed the filter button. Here's what I found:
    1) A bunch of database access happens in the main thread. When you push the filter hud button you loose control of the application (SBOD) until the query is complete. I'm guessing it's asking the database which keywords exist in the currently selected project so it can make filter buttons for them. Why does a query of 600 images take 10 seconds...
    2) Whenever you push the filter hud button thousands of little seeks and reads happen on the hard disk. I'm assuming this is the bottleneck.
    Is this interesting to anyone? It's wandering off the standard subject matter a bit. However, performance is abysmal and knowing is half the battle!
    Dual 1.8 G5   Mac OS X (10.4.3)   1GB RAM, Sony Artisan Monitor, Sony HC-1 HD Camera

    I've dissected the SQLite database that Aperture uses. My current best guess is that either Aperture is doing something wrong with SQLite or it's doing extra queries that I don't understand. I recreated the database query that gives you a list of keywords for all images in the working set. It only took between 1/4 and 1/2 second to execute. Opening the filter hud in Aperture with the same working set of images takes over 3 seconds.
    I've posted more detailed information on my site. It includes an overview of the database structure.
    http://www.mungosmash.com/archives/2005/12/theapertureda.php
    This is good news to me. It means the Aperture guys only have themselves to blame and should be able to speed it up considerably since the db is fast.
    Dual 1.8 G5   Mac OS X (10.4.3)   1GB RAM, Sony Artisan Monitor, Sony HC-1 HD Camera

  • Java Function result.addValue(newValue)?

    Hi All,
             Could you tell me what this function does?
    result.addValue(newValue);
    Regards,
    XIer

    Xier,
    Consider the below example
    My input xml looks like
    <Record>
    <row>
    <Value>1</Value>
    </row>
    <row>
    <Value>1</Value>
    </row>
    <row>
    <Value>1</Value>
    </row>
    <row>
    <Value>3</Value>
    </row>
    <row>
    <Value>5</Value>
    </row>
    <row>
    <Value>44</Value>
    </row>
    <row>
    <Value>55</Value>
    </row>
    <row>
    <Value>66</Value>
    </row>
    Then if you want to take all the values of element <Value> ,then
    u must write,
    for (int j =0;j<input.length;j++)
    <b>result.addValue(input[j]) ;</b>
    So the above UDF will add all the Value element into single queue as below picture.
    http://flickr.com/photo_zoom.gne?id=798590221&size=o
    If it's not clear, reply back.
    raj.

  • Can't install the Java Profiler

    I download the netbeans profiler but for some reason it is not installing properly. It seems to install fine but I do not have profile in the toolbar like I should. I've tried uninstalling and reinstalling several times. Can somebody help me? Thanks

    i forgot to mention my system is XP home with service pack 3(i think) & my comp is a dell deminsion 2400.

  • Java Profiler for RMI Applications

    I am looking for a profiler to monitor the bottlenecks and the memory usage when running my RMI application.
    What would you recommend to use and a comprehensive tool

    Couple of thoughts on scaling:
    1. Change the mx setting to 1200m -- this is the most you can scale a single instance on 32-bit
    2. Use a 64-bit platform you can set memory settings really high (AIX/Solaris)
    3. Multiple servers with planning on it using a load balancer
    Regards,
    John A. Booth
    http://www.metavero.com

  • Visual Studio profiler does not show results for XAML + DirectX project

    The case is simple: 
    1) The solution consists of 3 projects:  2 C# ones  (C# XAML project + C# library project) and one C++ runtime component initially created by the wizard, as this is a DirectX project.
    2) "Start Windows Phone application analysis"  runs OK, but when stopped  no profiling results are shown. The message is "0 total samples collected", "No call tree data is available".
    How can this problem be fixed?  What are the assumed reasons?

    (I know the thread is old - but I have found some threads on the net asking about this problem, but nowhere answered, so I'll rectify this here)
    Hey,
    do you happen to have been profiling the *release build* ?
    If so, try this:
    In solution explorer, right-click on the native C++ project -> Properties -> Configuration Properties -> Linker -> Debugging
    The top-most field "Generate Debugging Info" is probabyl empty, which is default for release build. But debugging info is needed to sample-profile functions! So select "Yes" there, and make sure the next option, "generate program
    database file" has a sensible entry.
    For me, this did it.

Maybe you are looking for