テーマ: profiling
-
本番環境での継続的プロファイリング: 常時稼働のサンプリングプロファイルが何に答えるか
継続的プロファイリングはCPUやメモリのプロファイルを時系列で体系的に取得し、ラベル付きの系列として保存する。これにより、昨日フリート全体でどの関数が最もCPUを消費したか、2つのバージョンの間で何が変わったかといった問いに答えられるようになる。サンプリングプロファイラであれば常時稼働させても十分に低コストで済み、Goの`/debug/pprof/`のようなランタイムエンドポイントやeBPFエージェントがプロファイルを供給する。
-
フレームグラフの読み方:幅はサンプル数、x 軸は時間ではない
フレームグラフは採取したコールスタックを積み重ね、フレームの幅でサンプルの割合、高さでスタックの深さを示す。x 軸は時系列ではなくアルファベット順である。上端の広い平坦部は CPU 上のホットスポット、多数の細い子を持つ幅広いフレームは呼び出し頻度を減らすべき呼び出し元として読む。CPU フレームグラフは待ち時間を示せない。
-
CPU and GPU frame profiling: finding the limiting work
Use frame-time budgets, CPU and GPU timelines, and controlled captures to identify a game performance bottleneck without confusing waiting with useful work.
-
Unity SRP Batcher: optimise CPU preparation without confusing it with instancing
Understand the SRP Batcher’s CPU-side purpose, inspect material and shader compatibility, and measure it separately from GPU instancing.
-
CPU profiling with perf: perf top, perf record -g, perf report, and perf_event_paranoid
perf top gives an immediate live profile; perf record -g saves a call-graph profile to disk for perf report to read later. The kernel's perf_event_paranoid setting controls what an unprivileged user can do, and symbol resolution needs matching debug information for every frame in the stack.
機械可読: JSON