detecting-deoptimizations

Trace VM deoptimization events from compiled code to interpreter.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/antonykamp/cc-truffle-performance-plugin --skill detecting-deoptimizations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: detecting-deoptimizations
Source: https://github.com/antonykamp/cc-truffle-performance-plugin/tree/main/skills/detecting-deoptimizations
Command: npx skills add https://github.com/antonykamp/cc-truffle-performance-plugin --skill detecting-deoptimizations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Traces deoptimization events where execution falls back from compiled code to interpreter. This enables you to identify the most severe performance problems and understand why compilation backs off to interpretation.

Core Features & Use Cases

  • Deoptimization pattern detection: identify loops where the VM repeatedly deoptimizes, causing slowdowns.
  • Stability diagnostics: surface unstable type assumptions and shape changes that trigger recompilation.
  • Use Case: diagnose performance regressions after compilation by locating where the VM switches to interpretation and why.

Quick Start

Run a deoptimization trace with the launcher options to begin collecting transfer events.

Frequently Asked Questions about detecting-deoptimizations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace deoptimization events when my GraalVM application falls back to the interpreter?

To trace deoptimization events, apply instrumentation options like --engine.TraceTransferToInterpreter and --engine.TraceCompilation to capture VM transitions from compiled code to the interpreter and identify performance regressions.

Why does my Truffle language implementation repeatedly deoptimize during steady-state execution?

Repeated deoptimization during steady-state execution is caused by unstable type assumptions and shape changes that trigger recompilation loops, which you can detect by tracing transfers from compiled code to the interpreter.

What is a deoptimization loop and how does it impact performance in Truffle-based languages?

A deoptimization loop is a pattern where the VM repeatedly transitions from compiled code to the interpreter, causing severe slowdowns by preventing stable compiled code execution during both warmup and steady-state phases.

Can I diagnose unstable type assumptions across Truffle-based language benchmarks?

Yes, you can diagnose unstable type assumptions across Truffle-based language benchmarks by tracing compilation and deoptimization behavior to surface shape changes that trigger recompilation and performance regressions.

Do I need specific engine flags to detect deoptimization transfers from compiled code?

Yes, you need instrumentation options such as --engine.TraceTransferToInterpreter and --engine.TraceCompilation to provide a full picture of compilation behavior and detect transfers from compiled code to the interpreter.