Skip to content
~/projects/openprofiler

OpenProfiler

Open-source JVM profiler. CPU, allocations, heap dumps, locks and live attach, from a native Rust agent to a flame graph in your browser.

ver v0.1.0 lang Rust lic Apache-2.0 / MPL-2.0 macOSLinuxWindows
quickstart — zsh
brew install matusso/tap/openprofiler
openprofiler list
openprofiler attach <pid> --duration 10s
openprofiler daemon --web heap.hprof
open http://127.0.0.1:7878/?token=…

OpenProfiler finds where your Java application spends CPU time, what it allocates, what holds on to memory and where threads wait on each other. It works on running JVMs (local, remote, in Docker or Kubernetes) and on saved files: .jfr recordings, .hprof heap dumps and its own .opsnap snapshots.

Under the hood: a native JVMTI agent, analysis engines, a daemon and a CLI, all in Rust. The UI is React, served in a browser or as a Tauri desktop app.

CPUCall tree, hot spots with back traces, flame graph and call graph. Async sampling via AsyncGetCallTrace on Linux.
MemoryAllocation call tree and hot spots, live versus collected objects, GC and heap telemetry.
Heap dumpsOut-of-core HPROF analysis with dominator tree and retained sizes identical to Eclipse MAT. A 10 GB dump opens in ~25 s.
Threads and locksThread history, dumps, monitor and java.util.concurrent contention with lock owners, virtual threads.
CI regression gateCompare two snapshots and fail the build with --fail-if "cpu.total > +10%".
MCP + IDEAn MCP server for AI agents, plus IntelliJ IDEA and VS Code plugins that paint CPU heat into the editor.

Install

Works on macOS and Linux (amd64, arm64):

brew install matusso/tap/openprofiler
brew upgrade openprofiler        # later, to get the newest release

Downloads

release v0.1.0 · verify with SHA256SUMS · all releases →

Usage

Analyse a file

openprofiler open recording.jfr                       # summary
openprofiler hotspots recording.jfr --kind alloc      # top allocation sites
openprofiler analyze heap.hprof                       # build the heap index, print insights
openprofiler daemon --web heap.hprof                  # explore it in the UI

Profile a running JVM

openprofiler list                                     # local JVMs
openprofiler attach <pid> --duration 10s              # live hot spots in the terminal
openprofiler record --pid <pid> --duration 60s -o app.opsnap
openprofiler record --pid <pid> --heap -o app.opsnap  # ... with a heap dump at the end
openprofiler dump <pid> -o heap.hprof                 # heap dump only

Or start the JVM with the agent:

java -agentpath:/path/to/libopenprofiler_agent.so=port=0 -jar app.jar

Compare, export and gate in CI

openprofiler compare base.opsnap head.opsnap --fail-if "cpu.total > +10%"   # exit 1 on regression
openprofiler export app.opsnap --view flame --format svg -o flame.svg      # csv|json|html|svg|collapsed

Let an AI agent profile for you

openprofiler mcp        # MCP server on stdio

Tools include list_jvms, attach, hotspots, heap_dump, insights, compare and thread_dump.

OpenProfiler is in early development. The offline analyser, the live agent and most of remote attach work today; bytecode instrumentation and probes have not started yet.