Skip to main content
JVM Runtime Telemetry + Model Context Protocol

JFR Performance Lab

Evidence-driven JVM performance investigation with JFR, JMC and AI. Stop asking LLMs to guess why production JVMs are slow—give them measured runtime facts.

Why JFR, JMC and MCP Work Together

Bridging low-overhead JVM diagnostic profiling with AI reasoning models using structured runtime facts.

Runtime Telemetry

Java Flight Recorder (JFR)

Built into OpenJDK with sub-1% production overhead. Records exact hardware thread samples, lock contention timelines, memory allocation churn, and GC pauses directly inside the JVM kernel.

  • Continuous ring-buffer in-memory capture
  • Zero external agent or bytecode instrumentation
  • Deterministic, nanosecond-precision event timestamps
Visual Workbench

JDK Mission Control (JMC)

The authoritative desktop interface for inspecting JVM flight recordings. Provides call trees, method flame graphs, lock duration scatter plots, and memory consumption timelines for human verification.

  • Visual verification of hotspot methods
  • Thread timeline and blocking dependencies
  • Independent ground-truth cross-check
AI Reasoning Layer

JFR Performance MCP

Exposes 11 specialized diagnostic tools over the Model Context Protocol (MCP). Extracts verified measurements from .jfr files and presents them to AI assistants with calibrated confidence.

  • Strict separation of facts vs. hypotheses
  • Directory-confined safe read-only execution
  • Direct integration with Google Antigravity & IDEs

The Evidence-Driven Workflow

A systematic 4-step path from symptom reproduction to validated code correction.

1
⚙️

Trigger Workload

Launch a controlled scenario from jfr-performance-demo-app with bounded duration, deterministic concurrency, and safety guards.

2
📊

Capture JFR Recording

Stream execution samples, lock events, and GC pauses directly to a .jfr artifact via automated runner script or jcmd.

3
🤖

Analyze via MCP

Ask your AI assistant to triage the recording. The MCP server computes hotspot methods, evaluates contention, and reports structured findings.

4
✅

Validate the Fix

Apply the optimized code pattern, capture a comparison recording, and quantitatively prove latency and throughput gains.

Quick-Start Preview

Run a complete investigation cycle in three shell commands.

bash — terminal
# 1. Run controlled CPU Hotspot scenario (15s duration, 8 threads)
cd jfr-performance-demo-app && ./scripts/run-demo.sh cpu-hotspot 15 8

# 2. Start MCP server in standalone diagnostic mode to verify recording
cd ../jfr-performance-mcp && ./scripts/run.sh --analyze ../jfr-performance-demo-app/recordings/cpu-hotspot-faulty.jfr

# 3. Connect Antigravity IDE and prompt your AI assistant
> "Analyze recordings/cpu-hotspot-faulty.jfr. Identify dominant CPU methods, distinguish sample percentage from continuous CPU time, and recommend source code improvements."