Doom GPU Flame Graphs

2025年4月30日

AI 摘要 AI 生成,可能有误

The AI Flame Graphs project is now open source with Intel Battlemage GPU support, enabling full-stack GPU flame graphs that, when paired with FlameScope heat maps, allow visual correlation of CPU and GPU performance at millisecond resolution. The authors demonstrate this by profiling GZDoom on Linux using the iaprof profiler, revealing causes of GPU stalls such as shader compilation, wall rendering, postprocessing, and stenciling in a custom-built demanding Doom map. While powerful, the tooling currently requires substantial setup (custom Linux kernels, eustall interfaces, and frame-pointer-compiled libraries), though the team expects this to get easier over time.

AI Flame Graphs are now open source and include Intel Battlemage GPU support, which means it can also generate full-stack GPU flame graphs for providing new insights into gaming performance, especially when coupled with FlameScope (an older open source project of mine). Here's an example of GZDoom, and I'll start with flame scopes for both CPU and GPU utilization, with details annotated:

(Here are the raw CPU and GPU versions.) FlameScope shows a subsecond-offset heatmap of profile samples, where each column is one second (in this example, made up of 50 x 20ms blocks) and the color depth represents the number of samples, revealing variance and perturbation that you can select to generate a flame graph just for that time range. Update: the row size can be ajusted (it is limited by the sample rate captured in the profile), e.g., you could generate 60 rows to match 60fps games.

Putting these CPU and GPU flame scopes side by side has enabled your eyes to do pattern matching to solve what would otherwise be a time-consuming task of performance correlation. The gaps in the GPU flame scope on the right – where the GPU was not doing much work – match the heavier periods of CPU work on the left.

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Brendan Gregg

Why I joined OpenAI

AI 摘要A veteran datacenter performance engineer explains that he joined OpenAI to tackle the staggering costs and environmental impact of AI datacenters, with an initial focus on ChatGPT performance. A turning point came when his hairstylist Mia enthusiastically described how she uses ChatGPT 'twenty-four seven,' revealing to him how the technology had become an everyday essential for ordinary people. After 26 interviews with various AI companies, he chose OpenAI for its talented engineers—including former Netflix colleagues—and now works remotely from Sydney as a Member of Technical Staff.

Leaving Intel

AI 摘要The author announces their resignation from Intel after 3.5 years to take a new opportunity, highlighting their contributions including AI flame graphs, GPU performance tools, eBPF leadership, and a company-wide cloud strategy with 33 recommendations developed across six organizations. Despite overlapping with Intel's toughest three years and an initial hiring freeze, they fondly recall meeting figures like Linus Torvalds and Pat Gelsinger. They hope their strategy and work will live on at Intel and continue making the company stronger in their absence.

On "AI Brendans" or "Virtual Brendans"

AI 摘要In this personal blog post, Brendan Gregg discusses the emergence of AI performance engineering agents — 'AI Brendans' that interpret flame graphs and eBPF metrics, and 'Virtual Brendans' trained on his extensive publications to mimic him. He argues that such virtual versions capture only a fraction of his expertise (~15%), quickly go out of date, face difficult pricing models (since customers can copy tuning changes fleet-wide or keep changes secret), and raise legal/ethical concerns about training on copyrighted works. He concludes that AI agents are genuinely needed as performance engineering grows harder and AI datacenters raise the stakes, wishing success to projects that 'claim a lot and do a lot' rather than quick-buck products.

Intel is listening, don't waste your shot

AI 摘要The author, who was hired by Intel as a Fellow largely because of the impactful feedback he gave as a customer in vendor meetings, argues that customers can accomplish a great deal by providing firm, constructive, and brutally honest technical criticism, especially to Intel under its new CEO Lip-Bu Tan. He offers practical advice: prepare before meetings, ensure feedback is documented in minutes without being watered down, avoid intellectual property transfer agreements, decline freeloading questions, request staff or project bans when time is wasted, and escalate concerns to the executive leadership team or CEO with a documented timeline. He acknowledges that giving brutal feedback requires significant effort and courage, but insists it is the only way to genuinely help both the vendor and your own company.

Third Stage Engineering

AI 摘要The author compares achieving real-world hardware performance to a three-stage rocket: hardware, software, and tuning are all required to reach the highest, most competitive performance. He argues that hardware evaluations considering hardware alone are misleading, and that accurate comparisons require selecting the best software for each hardware option and then tuning it. Tuning—what he calls third-stage engineering—consists of roughly four parts: people, training, tools, and tuning capabilities.