jvm-profile

分类: 工具与效率 | 上传者: nguyenyounguyenyou | 下载: 0 | 版本: v1.0(最新)

Profile Scala compilation at the JVM level using async-profiler to identify bottlenecks in the compiler, JIT, GC, and macro expansion. Use this skill whenever investigating why compilation is slow at the JVM level, generating flame graphs, analyzing async-profiler output, or understanding where the Scala compiler spends time. Complements the macro-profile skill (macro-level) with JVM-level visibility. Triggers on: "flame graph", "async-profiler", "JVM profile", "compilation bottleneck", "where does the compiler spend time", "JIT warmup", "GC during compilation", "profile the build". --- # JVM Compilation Profiling Profile Scala compilation at the JVM level using async-profiler. This gives visibility into JIT compilation, GC pressure, and Scala compiler internals that the macro-level `macro-profile` skill can't see. ## Prerequisites ```bash brew install async-profiler ``` ## Workflow ### 1. Capture profile data Use `JAVA_TOOL_OPTIONS` (not `JAVA_OPTS`) to profile ALL JVMs including the zinc compilation worker. Use `collapsed` format for the analysis script, and optionally also generate an HTML flame graph for visual inspection. ```bash # Clean compilation cache first rm -rf out/benchmark/sanely # Capture collapsed stacks (for analysis script) JAVA_TOOL_OPTIONS="-agentpath:$(brew --prefix async-profiler)/lib/libasyncProfiler.dylib=start,event=cpu,file=/tmp/profile-collapsed.txt,collapsed" \ ./mill --no-server benchmark.sanely.compile # Capture HTML flame graph (for visual inspection) rm -rf out/benchmark/sanely JAVA_TOOL_OPTIONS="-agentpath:$(brew --prefix async-profiler)/lib/libasyncProfiler.dylib=start,event=cpu,file=/tmp/flamegraph.html" \ ./mill --no-server benchmark.sanely.compile open /tmp/flamegraph.html ```

更新日志: Source: GitHub https://github.com/nguyenyou/circe-sanely-auto

目录结构

当前层级: .claude/skills/jvm-profile/

SKILL.md

登录后下载/点赞/收藏 ❤ 3 | ★ 0
评论 0

请先登录后评论。

还没有评论,快来第一个发言吧。