One file java script for visualizing JDK flight recorder execution logs as flamegraphs without any dependencies except Java and a browser.

Related tags

Profilers JavaFlames
Overview

Flamegraph from JFR logs

Simple one file Java script to generate flamegraphs from Java flight recordings without installing Perl and the Brendan Gregg scripts.

It also comes with a separate script to start profiling a java process using FlightRecorder and then call the flamegraph script.

Usage

With a fairly recent Java version installed simply run: java JavaFlames.java <path to jfr recording file>

This launches an http server serving the index.html file and endpoint for the folded format extracted from the JFR logs. The script then opens up a browser showing the results.

Alternatively if you don't have an existing JFR recording you can also start the Profile.java script to start profiling a java process generating the JFR file and then triggering flamegraph generation.

java Profile.java <pid> [<duration in seconds>]

The default profiling duration unless specified is 30 seconds.

Credits

Brendan Gregg for introducing the concept of flamegraphs and https://github.com/spiermar/d3-flame-graph for the javascript/html implementation.

You might also like...

Kotlin-decompiled - (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java again for better readability

Kotlin: Decompiled (Almost) every single language construct of the Kotlin programming language compiled to JVM bytecode and then decompiled to Java ag

Dec 14, 2022

Simple JVM Profiler Using StatsD and Other Metrics Backends

statsd-jvm-profiler statsd-jvm-profiler is a JVM agent profiler that sends profiling data to StatsD. Inspired by riemann-jvm-profiler, it was primaril

Oct 30, 2022

Small set of tools for JVM troublshooting, monitoring and profiling.

Swiss Java Knife (SJK) SJK is a command line tool for JVM diagnostic, troubleshooting and profiling. SJK exploits standard diagnostic interfaces of JV

Jan 3, 2023

Best-of-breed OpenTracing utilities, instrumentations and extensions

OpenTracing Toolbox OpenTracing Toolbox is a collection of libraries that build on top of OpenTracing and provide extensions and plugins to existing i

Oct 15, 2022

A short and practical intro into project loom

A short and practical intro into project loom

project-loom Project loom is all about making concurrency easier (for developers) on the JVM. It is in experimental phase. Download the early access b

Dec 15, 2021

Simple Anti-Dump to slow down and annoy attackers.

Anti-Dump A simple Anti-Dump to slow down and annoy attackers. Usage Copy the class into your mod or loader. Rename any instances of dummy/class/path

Dec 25, 2022

An OpenJDK release maintained and supported by SAP

SapMachine This project contains a downstream version of the OpenJDK project. It is used to build and maintain a SAP supported version of OpenJDK for

Jan 3, 2023

Dynamic loading and compiling project based on JVM

camphor 基于jvm的弹性加载及编译中间件(Elastic loading and compiling middleware based on JVM) camphor_0.0.1 项目简介 该项目定位为弹性中间件,能够使系统在不重启的情况下完成增量代码文件的动态编译和加载 模块介绍 camp

Jan 22, 2022

JavaOTTF - Official OTTF parser and composer for JVM languages

JavaOTTF - Official OTTF parser and composer for JVM languages

JavaOTTF Official OTTF parser and composer for JVM languages. Documentation Please refer to the Wiki Section. Installation Maven Add repository into p

Nov 21, 2022
Comments
  • Contribute stack collapser back to Flamegraph repository

    Contribute stack collapser back to Flamegraph repository

    I've had a look at this repository and found it very useful, but decided I wanted the SVG instead of the HTML rendering and found that it was rather easy to adapt your code to create a Java stackcollapser from which ./flamegraph.pl in https://github.com/brendangregg/FlameGraph could be fed directly.

    Would you be ok with me extracting this functionality and contributing it back to the FlameGraph repository? I think a single file Java program as you did it, fits the mindset rather well.

    opened by ravn 0
Owner
Billy Sjöberg
Billy Sjöberg
Get Method Sampling from Java Flight Recorder Dump and convert to FlameGraph compatible format.

Note: Travis has removed the support for Oracle JDK 8. Therefore the build status is removed temporarily. Converting JFR Method Profiling Samples to F

M. Isuru Tharanga Chrishantha Perera 248 Dec 16, 2022
Tool for creating reports from Java Flight Recorder dumps

jfr-report-tool Tool for creating reports from Java Flight Recorder dumps. Influenced by https://github.com/chrishantha/jfr-flame-graph . Kudos to @ch

Lari Hotari 50 Oct 28, 2022
Simple, Scalable. Trace-Recorder is a trace recorder.

Trace-Recorder It's Scalable. Simple, Scalable, High-Powered. Trace-Recorder is a trace recorder, mainly in order to better record the source code flo

WangCai 40 Dec 24, 2022
A driver to allow deep interaction with the JVM without any restrictions

ToolFactory JVM Driver A driver to allow deep interaction with the JVM without any restrictions. To include ToolFactory JVM Driver in your projects si

ToolFactory 34 Oct 8, 2022
JDK 17 development

Welcome to the JDK! For build instructions please see the online documentation, or either of these files: doc/building.html (html version) doc/buildin

OpenJDK 135 Dec 8, 2022
JDK main-line development

Welcome to the JDK! For build instructions please see the online documentation, or either of these files: doc/building.html (html version) doc/buildin

OpenJDK 14.8k Dec 29, 2022
Fork of tagtraum industries' GCViewer. Tagtraum stopped development in 2008, I aim to improve support for Sun's / Oracle's java 1.6+ garbage collector logs (including G1 collector)

GCViewer 1.36 GCViewer is a little tool that visualizes verbose GC output generated by Sun / Oracle, IBM, HP and BEA Java Virtual Machines. It is free

null 4.1k Jan 4, 2023
Utilities for HDR Histogram logs manipulation

HdrLogProcessing Utilities for HDR Histogram logs manipulation. This repo currently includes utilities for summarizing and unioning of logs. Requires

Nitsan Wakart 29 May 25, 2022
Sampling CPU and HEAP profiler for Java featuring AsyncGetCallTrace + perf_events

async-profiler This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specifi

null 5.8k Jan 3, 2023
Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.

JITWatch Log analyser and visualiser for the HotSpot JIT compiler. Video introduction to JITWatch video Slides from my LJC lightning talk on JITWatch

AdoptOpenJDK 2.8k Jan 3, 2023