Changes in version 2013

Changes in 2013 builds

Changes in previous versions:
  • 12 - December 3, 2012
  • 11 - April 10, 2012
  • 10 - September 12, 2011
  • 9.5 - November 2, 2010
  • 9.0 - April 30, 2010
  • 8.0 - February 13, 2009


CPU Profiling

  • Snapshot comparison: improvement: slave views "Back traces", "Callees list" and "Merged Callees" have been added for a method selected in the "Method list". They are especially useful when analysing a method called from different places in the snapshots being compared.

  • Java EE high-level profiling is now based on built-in probe results.

    This eliminates overhead of previously used dedicated callbacks, which partially repeated the built-in probe functionality, as well as performed some operations in runtime instead of performing them when the profiler opens a snapshot.

    The property high_level_cpu_profiling no longer exists in CPU sampling or tracing settings. The startup option disablej2ee has been removed. To turn Java EE high-level profiling off, you should turn off or disable corresponding probes.

  • CPU tracing: a new startup option _instrument_all_methods has been added to instrument primitive getters, setters and other similar short methods which only access object fields and/or return a value. By default, such methods are not instrumented to reduce overhead. Use this option when invocation counts for all called methods are more valuable than the time accuracy and lower overhead.
  • UI: added ability to show methods that took less than 1 ms by specifying -Dyjp.show.shortest.methods=true in <Profiler Installation Directory>/bin/yjp.ini
  • Optimization: Hot Spots view opens much faster
  • UI: added ability to disable the zero-time method correction with the help of the property -Dyjp.zero.time.methods=false in <Profiler Installation Directory>/bin/yjp.ini. The zero-time correction means that any calls to the following methods are ignored:

          java.lang.Object : wait(*)
          java.lang.Thread : sleep(*)
          java.lang.Thread : yield(*)
          java.net.PlainSocketImpl : socketAccept(*)
          java.net.PlainSocketImpl : accept(*)
          java.net.ServerSocket : accept()
          org.apache.tomcat.jni.Socket : accept(*)
          sun.nio.ch.ServerSocketChannelImpl : accept0(*)
          sun.misc.Unsafe : park(*)
          java.util.concurrent.locks.LockSupport : park*(*)
          com.ibm.tools.attach.javaSE.IPC : waitSemaphore(*)
          sun.nio.ch.EPollArrayWrapper : epollWait(*)
        

    Technically, their time is subtracted from the caller time up to the call tree root when CPU profiling results are loaded in UI. In other words, their time is always assumed to be 0 when the correction is applied.


Memory Profiling

  • Object explorer: class-specific object presentation: values are immediately shown for objects of the following classes:

    • java.util.Date
    • java.net.URL
    • java.io.File
    • java.util.zip.ZipFile
    • java.util.jar.JarFile
    • primitive value wrappers:
      • java.lang.Integer
      • java.lang.Long
      • java.lang.Short
      • java.lang.Boolean
      • java.lang.Byte
      • java.lang.Character
      • java.lang.Double
      • java.lang.Float
    • atomic values:
      • java.util.concurrent.atomic.AtomicInteger
      • java.util.concurrent.atomic.AtomicLong
      • java.util.concurrent.atomic.AtomicBoolean
    • other numeric classes:
      • java.math.BigDecimal
      • java.math.BigInteger
    • reflection:
      • java.lang.reflect.Field
      • java.lang.reflect.Constructor
      • java.lang.reflect.Method
    • (since build 13062) collection size for collection classes and their subclasses:
      • java.util.ArrayList
      • java.util.Arrays$ArrayList (returned from Arrays.asList())
      • java.util.HashMap
      • java.util.HashSet
      • java.util.Hashtable
      • java.util.IdentityHashMap
      • java.util.LinkedList
      • java.util.PriorityQueue
      • java.util.TreeMap
      • java.util.Vector
      • java.util.WeakHashMap
  • Object explorer: self referencing objects are explicitly indicated with [Self reference], and corresponding tree nodes are leafs now to avoid infinite expansion
  • Object explorer: added ability to customize the maximum number of shown individual objects with the help of the property -Dyjp.max.objects.to.show=<number> in <Profiler Installation Directory>/bin/yjp.ini. The default value remains 500. Note: setting bigger values increases memory usage and can slow down the UI.
  • Primitive arrays with all the same elements are explicitly indicated in object explorer, paths and other views presenting individual objects
  • Analysis of arrays with a big number of elements has been simplified with the help of the new action Memory | View Array Elements (Shift+F5) (also accessible via a popup menu) which opens all elements of selected reference array(s) in a new tab, where they can be comprehensively examined with all available views.

    This action is also available as the "Open all elements in a new tab" hyperlink in the object explorer in addition to the "Configure shown array element range..." hyperlink available for the arrays with hidden elements.

  • Merged paths: improvement: separate nodes are used for GC roots and objects retained from multiple objects
  • Merged paths: improvement: "<Retained from several objects simultaneously (don't have a dominator)>" entry expands to all shortest non-intersecting paths from GC roots
  • Merged paths: usability improvement: entries whose only child was "<Objects are GC roots>" are now leafs
  • New inspection Sparse Primitive Arrays finds arrays of primitive types with big number of 0 elements
  • New inspection Arrays with all the same elements
  • Added support of snapshots containing individual arrays with shallow size exceeding 2 GB
  • Bug fixed: some HPROF snapshots with huge arrays (> 2 GB shallow size each) were erroneously reported invalid and would not open
  • Bug fixed: "Non-serializable objects referenced from Serializable" inspection didn't properly treat LinkedList in newest Java versions
  • UI: bug fixed: exception "IllegalArgumentException: Comparison method violates its general contract!" might be thrown when obtaining paths from GC roots in some rare cases

Telemetry

  • New feature: performance charts.

    The performance charts graphically present high level statistics of the profiled application, such as:

    • JSP/Servlet requests:
      • count, per second
      • request duration (average, max)
    • Database connections:
      • how many opened and closed, per second
      • live time (average, max)
    • Database queries:
      • count, per second
      • call duration (average, max)
    • Sockets:
      • how many connections opened with accept() or connect() and how many closed, per second
      • for how long connections stayed open (average, max)
      • bytes read from sockets, per second
      • bytes written to sockets, per second
    • File I/O (includes FileInputStream, FileOutputStream, RandomAccessFile):
      • how many files opened and closed, per second
      • for how long files stayed open (average, max)
      • bytes read from files, per second
      • bytes written to files, per second
  • When you hover telemetry graphs or performance charts with the mouse pointer, you get a floating box with exact values at the hovered point. Now you can copy them to clipboard by using the new action "Copy Values to Clipboard", invoking the popup menu by right-clicking the time point of interest.
  • The telemetry graphs available in dedicated tabs such as CPU and memory usage, thread and class count etc. are also shown in the "Performance Charts" under the "Basic Telemetry" node.

    As the result, the "Performance Charts" tab is now the view where you can see all graphs shown in different places, or any subset of them, in the same place one above the other, with their time axis synchronized.

    This allows to easily correlate higher level events with basic telemetry graphs, as well as to simultaneously see basic telemetry graphs from different tabs e.g. CPU and memory usage.

  • Telemetry graphs: visual improvements
  • Memory usage telemetry: the view layout has been improved to give the graphs more space
  • Threads view: added ability to change the default thread show mode from "All Threads" to "Live Threads Only" by specifying -Dthreads.default.live_only=true in <Profiler Installation Directory>/bin/yjp.ini.
  • Threads view: added ability to choose "Show selected thread only" by default by specifying -Dthreads.default.selected_only=true in <Profiler Installation Directory>/bin/yjp.ini.
  • Threads view: added ability to change the default stack trace presentation mode from "Filtered stacks" to "Full stacks" by specifying -Dthreads.default.full_stacks=true in <Profiler Installation Directory>/bin/yjp.ini.
  • Bug fixed: the thread count shown in the Threads graph was bigger than the count in the Stack traces because the profiler agent threads were not counted (and never shown) in the latter

Probes

  • Improved ability to activate and deactivate probes in runtime.

    The change simplifies configuration, because now you don't have to decide which probes to enable on startup, but make the decision later on demand. This also helps to reduce the overhead of the probes when they are not needed.

    Previously, it was also possible to register or unregister probes in runtime by re-instrumenting bytecode of all target classes. The problem of this approach is the JVM class reloading latency: JVM keeps executing an old bytecode definition for already loaded objects even after a profiling agent has supplied a new definition. Runtime probe switching wouldn't work for such objects. In particular, this affected many of the built-in probes. Also, reloading of multiple classes might take a lot of time.

    Now, probe target classes are permanently instrumented with the probe callbacks, which behave depending on the probe activity mode: On, Off, Auto.

    Initial activity mode is specified with startup options, and can be changed in runtime from the profiler UI or using the API.

    Read more...

  • Due to introduction of probe activity modes, the following startup options have been deprecated:

    Deprecated option
    Replacing option
    builtinprobes=all
    None. It's the default behaviour.
    builtinprobes=none
    probe_disable=com.yourkit.probes.builtin.*
    or
    probe_disable=* (use this shorter form if no other probe options are earlier specified in the option list)
    probe=<probe class>
    probe_on=<probe class>
    probe=classloading
    probe_on=com.yourkit.probes.builtin.ClassLoading

    Note: it's the default behavior to turn this probe On, thus this option makes sense only in a combination with other options, e.g.:

    probe_off=*,probe_on=com.yourkit.probes.builtin.ClassLoading
    noprobe=<built-in probe short class name>
    probe_disable=com.yourkit.probes.builtin.<built-in probe short class name>
    noprobe=classloading
    probe_disable=com.yourkit.probes.builtin.ClassLoading
  • UI: columns with event specific data, such as file name or SQL statement, are placed before other columns. This gives access to the most important information without a horizontal scrolling.
  • Improved export of probe tables to CSV, which is one of the possible formats when exporting from UI, and the only possible format when exporting with the command line tool.

    In addition to thread and, for a lasting event, thread_end columns, which present unique thread IDs, new columns thread_name and, for a lasting event, thread_end_name have been added to quickly identify threads by name.

    The stack trace is presented with frame and, for a lasting event, frame_end columns, containing unique ID of event start and end stack traces. Now the stack trace text can be looked up in additionally generated file <export result name>-Stacks.csv.

    To quickly identify the calls without looking up the full stacks by their ID, top_method, top_non_filtered_method, top_method_end, top_non_filtered_method_end columns have been added (the last two columns are for lasting events only). They present the top method on the stack and the top non-filtered method on the stack.

  • New built-in probe com.yourkit.probes.builtin.JNDI monitors JNDI calls
  • New built-in probe com.yourkit.probes.builtin.TestNG monitors TestNG tests
  • Separate built-in probes to monitor file I/O activities have been merged to a single probe class com.yourkit.probes.builtin.Files.

    The results for input streams, output streams and random access files remain presented in separate tables.

  • When CPU tracing is running, stacks of the events happening in the traced methods are also filtered. This makes the CPU profiling call tree and the probe stacks coherent, as well as reduces overhead.
  • New inspection based on built-in probe results: "Socket connection closed in finalizer"
  • Problem solved: built-in probes might not work with some security manager settings
  • Performance of built-in probes has been slightly improved

Triggers

  • New PrintMessage action macros have been added:

    • &{USED_HEAP_BY_POOL}
    • &{USED_NON_HEAP_BY_POOL}
    • &{PROCESS_MEMORY} (Windows, Linux, Mac OS X only; on other platforms it always returns 0)
    • &{CURRENT_THREAD_NAME} (in triggers on method invocation)

IDE Integration

  • Eclipse: TestNG run configurations supported
  • Eclipse: SWTBot run configurations supported
  • Eclipse: added missing "Profile As" popup menu items for Google plugin and Maven
  • (Since build 13048) Eclipse: IBM Rational Application Developer for WebSphere: "Liberty Profile Server" and "WebSphere Application Server v8.5 Application Client" run configurations supported
  • Eclipse: bug fixed: the plugin might not install under certain circumstances
  • IntelliJ IDEA 13 supported
  • NetBeans 7.4 supported
  • NetBeans: Module Suite project type supported
  • NetBeans: Enterprise Application Client project type supported
  • NetBeans: TestNG supported (use popup menu item "Profile with YourKit")
  • NetBeans: improvement: "Profile" action in the toolbar shows the current project name, which makes its behavior consistent with the behavior of "Run" and "Debug"

Java EE Integration

  • Java EE server integration wizard now offers to enable built-in probes by default, because the probes imposing the biggest overhead are in activity mode Auto, which means they'll be active only during CPU profiling. (See changes in Probes for detail on the probe activity modes.)

    Another reason for the change is that the new feature Performance charts, whose results are especially useful for Java EE applications, is also based on corresponding built-in probes.

    Alternatively, the wizard offers the option probe_disable=* which disables the probes to minimize overhead and/or for troubleshooting purposes. This was the default behavior of the previous version.

  • Java EE server integration wizard: the startup options specification is now a separate step in order to reduce UI complexity

User Interface

  • Modernized and refined user interface
  • (Since build 13058) New feature: Dark color theme. By default, the Bright color theme is used. To switch the theme use the main menu items under Settings | Color Theme

    Known issue: the Dark theme is currently unsupported on Mac OS X. We plan to support it in the future.

  • List of locally running applications: attached agents and agents loaded on start are explicitly indicated as "Agent attached" and "Agent loaded on start" respectively
  • Welcome screen: the recent snapshot list has been improved: not only can the listed snapshots be opened or deleted from disk, but also:

    • removed from the recents while keeping the snapshot file on disk;
    • renamed;
    • get the containing directory opened in the system's file manager;
    • get the snapshot path copied to the clipboard.

    Access these new actions via the new "More actions..." button.

  • "Expand Node" action works faster with big trees

Miscellaneous

  • Windows: IDE and Java EE integration wizards no longer rely on 8.3-convention short names, which are possibly unavailable (disabled) on modern systems
  • Export: the command line tool now exports telemetry graphs too; the format is CSV
  • Export: added ability to apply current filters when exporting call trees and method lists with the command line tool by specifying Java system property export.apply.filters
  • Agent: Java 8 support: added ability to profile default methods of interfaces
  • Agent: new startup option _no_verbose_log allows to dramatically reduce the log file size by not logging names of the classes being instrumented.
  • Agent: improvement: profiling overhead slightly reduced in case when object allocation recording is disabled with startup options "disablealloc" or "disableall". As the result, performance in some tests has increased by 5%.
  • Agent: improvement: profiling overhead slightly reduced in case when both exception profiling and CPU tracing are disabled, e.g. with "disableall". As the result, performance in some tests has increased by 2%.
  • API: class com.yourkit.api.Controller: methods getProbeActivityModes() and setProbeActivityModes() have been added to obtain and alter probe activity modes
  • API: deprecated members of com.yourkit.api.Controller have been removed
  • API: deprecated class com.yourkit.api.ProfilingModes has been removed; use corresponding constants in com.yourkit.api.Controller instead
  • Command line tool: added ability to capture HPROF format snapshots
  • FreeBSD: the 64-bit agent bin/freebsd-x86-64/libyjpagent.so has been updated to depend on libkvm.so.6 to run out of the box on the newest FreeBSD version 10. If you use an older FreeBSD version please symlink libkvm.so.<number> to libkvm.so.6.