Profiling with IntelliJ IDEA 11

Friday, December 09, 2011 | Posted by

As always, we try to provide an IntelliJ IDEA plugin immediately when a new major version of IDEA is released.

Most of the time, a release of IDEA does not coincide with a JProfiler release, so we release the plugin separately in the plugin manager. To install the JProfiler plugin in IDEA (both community and ultimate editions), click on "Browse repositories" in the plugin manager and look for "JProfiler".

The plugin will be bundled in the upcoming JProfiler 7.1 release.

Update (2012-01-16): By mistake, the plugin version (different from the JProfiler version) decreased from 10.3 to 10.2, so many update problems were caused by this. Now the plugin version has been increased to 11.0 and the update should work if you had 10.2 or 10.3 installed previously.

Java profiling comes to Linux ARM

Friday, October 14, 2011 | Posted by

Up to now, there was no good solution for profiling Java code on embedded systems. With the 7.0.1 release of JProfiler, we have introduced support for the Linux ARM platform. The native agent libraries in the bin/linux-arm directory work with the official Java SE for embedded from Oracle.

On the embedded device, you just add the VM parameter -agentpath:[path to libjprofilerti.dll] to the profiled JVM. In the JProfiler GUI on your development machine, you create a session of type "Attach to profiled JVM" to start profiling.


Sampling vs. Instrumentation

Saturday, October 08, 2011 | Posted by

Fabian Lange from codecentric has written an excellent article on the differences between sampling and instrumentation.

Sampling and instrumentation are the two modes how methods are measured for CPU profiling. Both have advantages and disadvantages and it depends on the use case which is better for you.

This decision is already prominently featured in JProfiler when you start a new session for the first time, as shown in this screen cast.

Using the "Run interceptor script" trigger action

Wednesday, September 07, 2011 | Posted by

In the screen cast below I show how to use the "Run interceptor script" trigger action in a method trigger to print out some internal state of the application for debugging purposes. This is done without recompiling or restarting the application.

Creating a custom probe

Tuesday, September 06, 2011 | Posted by

In this screen cast I show how to create a simple custom probe that measures how often the paint method of the "Animated Bezier Curve" demo is called together with clip bounds information. The example custom probe features events, telemetries and hot spots view.

Inspections in the heap walker

Sunday, September 04, 2011 | Posted by

In this screencast, I show what inspections are available in in JProfiler's heap walker and what they are capable of. Also featured is the powerful custom grouping inspection that lets you group object sets with a code snippet that is directly entered in the JProfiler GUI.

Heap walker graph: Finding paths between selected instances

Friday, September 02, 2011 | Posted by

In this screencast, I discuss the graph view of the heap walker (new in JProfiler 7.0) and how to search for reference paths between two selected objects. Also, I show how to resolve transitive references in the biggest objects view with the help of the graph view.

Filtering in the reference view of the heap walker

Thursday, September 01, 2011 | Posted by

In the screencast below, I show the powerful filtering capabilities in the outgoing reference view of the heap walker that allow you to find objects based on primitive field values, outgoing references or code snippets.

Analyzing long-running AWT events with JProfiler

Wednesday, August 31, 2011 | Posted by

In the screencast below, I show how exceptional method recording and request tracking are combined for analyzing long-running AWT events in JProfiler.

In this screencast, I explain what request tracking is and how to use it taking the example of executors in the java.util.concurrent package.

Probes overview

Tuesday, August 30, 2011 | Posted by

In the screen cast below, I give a short overview of the capabilities of probes and the built-in probes that are included in JProfiler 7.0.

CPU profiling: Sampling and instrumentation

Monday, August 29, 2011 | Posted by

In this screencast, I explain the two modes of CPU profiling, sampling and instrumentation and how they are activated in the JProfiler GUI. Choosing and understanding these modes is important for getting good results.

Methods statistics and exceptional method runs

Saturday, February 12, 2011 | Posted by

In the screencast below, I explain how to analyze exceptionally slow invocations of frequently invoked methods. By using the method statistics and exceptional method run features in JProfiler, the slowest invocations are shown separately in the call tree.


The test class that is profiled in this screen cast is given below:

import java.util.Random;

public class MethodStatisticsTest {

    private static Random random = new Random(0);

    public static void main(String[] args) {
        while (true) {
            doCriticalTask();
        }
    }

    private static void doCriticalTask() {
        if (random.nextInt(1000) % 999 == 0) {
            implOne();
        } else {
            implTwo();
        }
    }

    private static void implOne() {
        for (int i = 0; i < 100000; i++) {
            Math.sqrt(i);
        }
    }

    private static void implTwo() {
        for (int i = 0; i < 1000; i++) {
            Math.sqrt(i);
        }
    }
}