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.

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 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

  • 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

  • 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

  • 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

  • Profiles of Java instance

    Hi people,
    I´ve theoretical doubt about the administration of the start, java instance and SCS instance profiles. I know that ABAP instance profiles can be managed with the RZ10 and RZ11, but in java? I´ve searching on config tool, but i don´t find anything relationated with the start and java profiles.
    more thanks.

    Hi Ruben,
    for the j2ee Engine or Java Applikation Server the java related parameter could by located on os level (JAVA_HOME), instance profile of the abap instance, configtool(offline tool), visual admin(online tool).
    on os level under (zb. on unix) /usr/sap/Sid/JC<XX> /j2ee/cluster/instance.properties in this xml file there are some paramters for the java bootstrap prozess you can also edit this properties file with the configtool.
    br
    julius

  • Trace a variable in a java program

    Hi all,
    I'm doing a project which require me to trace a variable or method and record down their occurrence and modification log in a java program. Are there any tools available?
    Thx

    I think java profiler can do the job. There are sharewares i know of like JSprint and JProfiler.

  • Cursor variable in a Java program

    Hi all,
    I would like to know is how to explicitly pass a cursor variable to a stored procedure after defining it in the java source and to get the result back to the same variable.
    An example would be appreciated.
    Thanks in advance
    Giridhar

    I think java profiler can do the job. There are sharewares i know of like JSprint and JProfiler.

  • Java.lang.OutOfMemoryError: unable to create new native thread

    Hi All,
    I have installed weblogic server 8 sp4 in production environment . I am facing problems with JVM issues .
    JVM is crashing very frequently with the following errro :
    ####<Jun 18, 2009 10:58:22 AM IST> <Info> <Common> <IMM90K-21> <SalesCom> <ExecuteThread: '24' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-000628> <Created "1" resources for pool "PIConnectionPool", out of which "1" are available and "0" are unavailable.>
    ####<Jun 18, 2009 11:00:09 AM IST> <Info> <EJB> <IMM90K-21> <SalesCom> <ExecuteThread: '23' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-010051> <EJB Exception occurred during invocation from home: payoutCheck.ejb.payoutCheck_s6v3so_HomeImpl@121a735 threw exception: java.lang.OutOfMemoryError: unable to create new native thread
    java.lang.OutOfMemoryError: unable to create new native thread
         at java.lang.Thread.start(Native Method)
         at payoutCheck.classes.MyThread2.MyThreadv(PayoutCheckBOImpl.java:249)
         at payoutCheck.classes.PayoutCheckBOImpl.genSP(PayoutCheckBOImpl.java:184)
         at payoutCheck.ejb.PayoutCheckSLSB.genSP(PayoutCheckSLSB.java:191)
         at payoutCheck.ejb.payoutCheck_s6v3so_EOImpl.genSP(payoutCheck_s6v3so_EOImpl.java:315)
         at payoutCheck.ejb.payoutCheck_s6v3so_EOImpl_CBV.genSP(Unknown Source)
         at payoutCheck.deligate.PayoutCheckBD.genSP(PayoutCheckBD.java:226)
         at ui.action.SearchAction.callFilter(SearchAction.java:378)
         at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:220)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    The above mentioned is coming several times , anybody please help out to get rid of this issue.
    Thanks in advance ,
    Krikar.

    This only tells you that the JVM is running out of heap space. It doesn't tell you what is causing the problem. You likely have a memory leak, but you could also try increasing the max heap size of the JVM (-Xmx command line option). It would help to watch the % mem in use statistic, but only immediately after a garbage collection cycle (you can force a GC from the admin console). If the % mem in use after the GC is increasing over time, then that likely confirms you have a memory leak. Note that looking at that statistic during the server startup probably is irrelevant. You'd need to wait until the server finishes starting up, and likely processed a few messages (to load static data).
    If you get to the point of confirming that you have a memory leak, that requires doing detailed analysis with a Java profiler (JProfiler, JProbe, YourKit, etc.) to track down the source of the leak.

  • Performance of a java program.

    Dear team,
    how I can know when a java application is 'faster'?
    I mean, is better to use arrays or not? Is better to use bytes than integers?etc etc...
    Do you know any software that it can show me when my program uses low memory, or something that can help me??
    Best wishes!

    Antony13 wrote:
    Dear team,
    how I can know when a java application is 'faster'?By measuring it.
    I mean, is better to use arrays or not? Is better to use bytes than integers?etc etc...Don't worry about these microoptimizations unless and until you profile and find a bottleneck that could reasonably be caused by one of them. Use the proper data structures and algorithms (which is a CS principle that has nothing to do with Java) and write "dumb" code that's easy to follow and that clearly expresses your design.
    Do you know any software that it can show me when my program uses low memory, or something that can help me??Google for java profiler.

  • WEB AS Java 640 and Sap Gateway

    Hello,
    I have installed a J2EE 640 in HA for internet sales (ISA) in the following scenario:
    SCS in failover switch group and a Central Instance on node A, Dialogue Instance node B.
    Then I installed a SAP Gateway on node B for TREX 6.0, but I'm having a problem with GWS (Sap Gateway instance id) in MMC, this instance is appearing as defect after I have done a reboot to the cluster servers.
    Does any one have a clue?
    Can I install SAP Gateway on another server apart from TREX?

    Pedro,
    you probably solved your problem a long time ago.
    You don't need a standalone gateway for TREX.
    Instead use the gateway on the CRM server.
    I'm also currently doing a J2EE 640 HA for internet
    sales and have come across a problem you may have had.
    When I run sapinst to install the CRM Non Abap
    components using the CRM 4.0 SR1 installation master
    CD, it fails because it cannot find the Java profile
    directory. It should use
    <SCS-virthostname>\sapmnt
    but instead it looks in the \usr\sap\<SID> directory
    of the local CI installation and fails when it can't find the profile directory.
    Did you have the same problem ?

Maybe you are looking for

  • How to remove locks in BPc netweaver?

    Hi all, How to avoid locks and how to remove locks in BPC netweaver and what is meant  by concrete locks and work station locks in bpc netweaver ? Thanks Pooja

  • Ipod classic having trouble to connect my car USB

    I use to connect everyday in my new camry 2012 but recently it is not connecting through USB . when i plugin into USB it just shows charging . when i connected to my laptop its works fine. i checked with my wife iPhone , it is working fine in my car

  • Filter Import by Number of Rating Stars and other such

    My work flow is to look at the card with Nikon ViewNX2, and assign rating stars to the keepers, then import the keepers into Lightroom.  I  can't see the stars in the import dialog, though I can see them once I  do the import.  LR clearly understands

  • IIOP Connection with Session Shell

    Hi there, I am trying to test the Orcale 8.1.6.0 for EJB deployment. when I use the following command, it works fine for SYS account, but not for any other schema owners, example scott/tiger. sess_sh -u username/password -s sess_iiop://localhost:2881

  • IPod Photo 60G

    If i were to sell a iPod Photo (4th generation) with 60G about 2 yrs and 3 months old, for how much should i sell it? what is it's current worth?