主题: profiling
-
生产环境中的持续性能剖析:常开的采样剖析能回答什么问题
持续性能剖析(continuous profiling)会系统性地随时间采集 CPU 和内存剖析数据,并以带标签的序列形式存储,这样团队就能查询昨天整个集群中哪个函数消耗的 CPU 最多、或两个版本之间发生了什么变化之类的问题;采样式剖析器的开销足够低,可以一直保持开启,而 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