Detects optimization barriers during Truffle compilation. Identifies virtual calls, non-constant stores, unresolved type checks, and TruffleBoundary issues that prevent peak performance. Reports exact source locations with stack traces. Use as essential step for eliminating compilation warnings. ONLY works with traditional Truffle DSL nodes (NOT Bytecode DSL). (project)
Detects optimization barriers during Truffle compilation, identifying virtual calls, type instabilities, and boundary issues that prevent peak performance.
/plugin marketplace add antonykamp/cc-truffle-performance-plugin/plugin install antonykamp-cc-truffle-performance-plugin@antonykamp/cc-truffle-performance-pluginThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Detects optimization barriers during Truffle compilation. Essential for finding virtual calls, type instabilities, and boundary issues that prevent peak performance.
Use EARLY in performance investigation - often reveals root causes quickly.
# Basic warning detection
<launcher> --experimental-options \
--compiler.TracePerformanceWarnings=all <program>
# Combined with compilation trace (RECOMMENDED)
<launcher> --experimental-options \
--compiler.TracePerformanceWarnings=all \
--engine.TraceCompilation \
<program> 2>&1 | tee warnings.log
Before running:
<launcher> --experimental-options --compiler.TracePerformanceWarnings=all -c 'print 1;' → Verify no false warningsAfter running:
tool-outputs/perf-warnings-[benchmark].txtGate: All boxes checked? → Proceed to analysis
| Option | Description |
|---|---|
--compiler.TracePerformanceWarnings=all | All warning types |
--compiler.TracePerformanceWarnings=call | Call-related only |
--compiler.TracePerformanceWarnings=instanceof | Type checks only |
--compiler.TracePerformanceWarnings=store | Store operations only |
[engine] Performance warning: observed virtual call at
com.example.CallNode.call(CallNode.java:42)
Reason: CallTarget is not constant
Fix: Add @Cached for CallTarget lookup.
[engine] Performance warning: observed type check at
com.example.TypeNode.execute(TypeNode.java:55)
Reason: Type is not constant
Fix: Add type-specific specializations.
[engine] Performance warning: observed store at
com.example.StoreNode.execute(StoreNode.java:33)
Reason: Store is not frame or final field
Fix: Use frame slots or final fields.
| Warning Type | Severity | Impact |
|---|---|---|
| Virtual call | Critical | Blocks inlining, 10-100x slower |
| Type check | High | Prevents specialization |
| Store | Medium | May escape optimization |
| Finding | Next Skill |
|---|---|
| Many virtual calls | analyzing-compiler-graphs for details |
| Type instability | detecting-deoptimizations |
| Still confused | fetching-truffle-documentation |
// ❌ BAD
CallTarget target = lookupFunction(name);
target.call(args);
// ✅ GOOD
@Specialization(guards = "func == cachedFunc")
Object cached(@Cached("func") Function cachedFunc,
@Cached("cachedFunc.getCallTarget()") CallTarget target) {
return target.call(args);
}
// ❌ BAD
if (value instanceof Integer) { ... }
// ✅ GOOD
@Specialization
int doInt(int value) { ... }
profiling-with-cpu-sampler - Identify hot functions firsttracing-compilation-events - See compilation statusanalyzing-compiler-graphs - Deep IR analysisfetching-truffle-documentation - API reference<launcher> --help:compiler:internal | grep -i trace
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.