Questions tagged [jfr]

JRockit/Java/JDK Flight Recorder (JFR), a performance monitoring and profiling tool

176 questions
4
votes
1 answer

Why does JMC (JDK Mission Control) not show any virtual thread events?

I have a small SpringBoot app with 1 RestController with following method: @GetMapping("/current-thread") String currentThread() throws InterruptedException { var msg = new Msg(); Thread.startVirtualThread(() -> { …
Java User
  • 43
  • 4
4
votes
1 answer

Measure execution time java

I need to measure how many seconds takes to execute a particular method via JFR. It is possible to do that? I tried async-profiler but I don't this feature.
Matrix12
  • 446
  • 8
  • 19
4
votes
1 answer

Java Flight Recorder - Live Objects Tab is empty

I am running JDK 1.8_291 and JDK Mission Control 8.0.0. I am trying to activate Live Objects tab in Flight Recording, Live Objects tab is always empty I have followed older threads discussing the same problem like: Java Flight Recorder - no Live…
Tarek Hany
  • 41
  • 2
4
votes
1 answer

Dump part of Java Flight Record

Suppose I have configured a continuous flight record for my JVM using the following flags java -XX:StartFlightRecording=disk=false,dumponexit=true -XX:FlightRecorderOptions=memorysize=200m -jar .... As far as I understand, this configuration stores…
Dragas
  • 1,140
  • 13
  • 29
4
votes
1 answer

Massive locks in JVM on arrays allocations on java.lang.ref.Reference$Lock

We profiling our application with Java Flight Recorder and found massive locks on java.lang.ref.Reference$Lock object. I investigate some places in stacktraces and findout that in all cases - there is array allocation example of code ( position 3…
cgi
  • 190
  • 1
  • 8
4
votes
1 answer

Where are built-in JFR (Java Flight Recorder) events documented?

Working with JDK 11, if you look at the summary of the JRF recording, you can see that there are 140 different events. Some of them may have not occurred, which is clearly visible in the output: $ jfr summary /c/dev/jfrec/ddos.jfr Version: 2.0 …
malloc4k
  • 1,742
  • 3
  • 22
  • 22
4
votes
1 answer

Java Flight Recorder - how to extract the values of a custom event field?

Java Flight Recorder is now a part of OpenJDK 11 and offers the usage of custom events. After a successful recording, I want to reuse the information within the events (especially my own custom events), but somehow I am unable to read the field…
Matécsa Andrea
  • 532
  • 1
  • 6
  • 15
4
votes
1 answer

Generate Flame Graph from JFR dump with IntelliJ IDEA

IDEA generates those neat flame graphs when using "Run with Java Flight Recorder". While I know of external tools capable of this, is it possible to generate those flame graphs from existing jfr dumps with IDEA?
Nick Russler
  • 4,608
  • 6
  • 51
  • 88
4
votes
2 answers

How to chase a JFR event over multiple threads

I'm struggling to model asynchronous servlet request processing with custom JFR events. The challenge I'm facing is that in asynchronous processing a request may be #dispatch()ed several times. This means the whole request processing chain may be…
Philippe Marschall
  • 4,452
  • 1
  • 34
  • 52
4
votes
1 answer

Java Mission Control 7.1 shows too few method profiling samples

A similar question was asked here. I'm profiling an Open JDK 11.0.2 application using JMC 7.1.0 which I've built according to the instructions. The application is utilizing about 3 cores, there is no excessive gc and only a small portion of the time…
Amir Hadadi
  • 421
  • 4
  • 13
4
votes
2 answers

How to enable heap metrics for jfr via command line

I'm trying to run Java Flight Recorder using the jcmd binary located /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/jcmd (Mac OS X). Is there a command line option to enable heap metrics that corresponds to Heap Statistics…
Elvir Crncevic
  • 525
  • 3
  • 17
4
votes
1 answer

Java Flight Recorder File Format Not Supported

I am trying to profile the run of my Java code using Java Flight Recorder (JFR). To do this, I am using the terminal command: java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=duration=500s,filename=myrecording.jfr -jar…
Chynna
  • 55
  • 8
4
votes
1 answer

Getting expensive java methods in terms of wall clock time by profiling using JMC

I am having a java application which makes a lot of external http calls. To identify the hot methods I have used System.currentTimeMillis() in all methods and I observed that the methods who are actually making the external HTTP calls are the hot…
tuk
  • 5,941
  • 14
  • 79
  • 162
3
votes
1 answer

How can I programmatically check if JFR is recording?

Java Flight Recorder provides simple APIs to detect if it's available (FlightRecorder.isAvailable()) or initialized (FlightRecorder.isInitialized()). But there's no obvious API to detect if it's actually recording. Maybe I could check…
stiemannkj1
  • 4,418
  • 3
  • 25
  • 45
3
votes
1 answer

How to print jfr when OOME occurs and JVM exits?

I am using Java17 in the container environment. I set -XX:+ExitOnOutOfMemoryError because I want the JVM to exit when an OutOfMemoryError occurs. And I also set dumponexit=true to output the JFR on JVM exit. But when the JVM exits with an…
YutaSaito
  • 387
  • 6
1
2
3
11 12