CppCon 2019 has ended
Back To Schedule
Wednesday, September 18 • 16:45 - 17:45
How to Write a Heap Memory Profiler

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Have you ever wondered how profilers work? Did you ever run into a situation where you wanted to write your own custom profiler, but didn't know how to go about it? Then this talk is for you.

We will build a proof-of-concept heap profiler on Linux that implements the most important aspects of a custom tracing profiler: Intercepting function calls, runtime injection, call stack unwinding and debug symbol resolution. All of these concepts are generic and don't only apply to a heap profiler, we will just use that as a motivating example.

The talk will also touch on some of the lessons learned creating a productionized heap profiler called heaptrack: What data format should you use? How can you compress the data? What needs to be taken into account to support profiling on embedded platforms?

Combined, this talk will teach you about some of the layers behind the scenes of a standardized C++ application. Sadly, these layers tend to be platform dependent. For that reason, this talk concentrates on Linux, but the core principles apply to other platforms too.

avatar for Milian Wolff

Milian Wolff

Senior Software Engineer, KDAB
Milian Wolff is a Senior Software Engineer at KDAB, Milian leads the R&D in tooling and profiling in which he has a special interest. Milian created Massif-Visualizer, heaptrack and hotspot, all of which are now used regularly to improve the performance of C++ and Qt applications... Read More →

Wednesday September 18, 2019 16:45 - 17:45 MDT
Aurora C
  • Data Structures/Allocation