C++Now 2016 has ended
Please visit the C++Now website.
Back To Schedule
Tuesday, May 10 • 11:00am - 12:30pm
Typegrind - Type preserving heap profiler for C++

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

Memory profilers are essential tools to understand the dynamic behavior of complex modern programs. They help to reveal memory handling details: the wheres, the whens and the whats of memory allocations. Most heap profilers provide sufficient information about which part of the source code is responsible for the memory allocations by showing us the relevant call stacks. The sequence of allocations inform us about their order. Heap profilers for languages with strong reflection capabilities can also show type information on the allocated objects. However, in C++ we have no reflection, allocators used for standard containers erase type information, and complex syntax of special new and delete operators make preprocessor hacks impossible. In this lecture we will report on a type preserving heap profiler for C++ based on the LLVM/Clang tooling library. On top of the usual heap profiler features our allocation entries, including those of template constructs, contain exact type information about the allocated objects. We can extract information on individual memory operations as well as supply aggregated overview. E.g. user can tell how much memory was used of std::vector objects in every point of the run, when, where and how they were allocated and freed. Having such a type information in hand programmers can identify critical classes responsible for memory usage more easily and can perform optimizations based on evidence rather than speculations. The tool is publicly available at: https://github.com/typegrind

avatar for Zsolt Parragi

Zsolt Parragi

I am a PhD student at Eötvös University Budapest working on C++ related static analysis tasks. I am also a developer of NNG Ltd, a leading company in car navigation solutions.
avatar for Zoltán Porkoláb

Zoltán Porkoláb

Ericsson & Eötvös Loránd University
Dr. Zoltán Porkoláb is an Associate Professor of Faculty of informatics at Eötvös Loránd University (ELTE), Budapest, Hungary. At the same time, he holds Principal C++ Developer position at Ericsson Hungary Ltd.

Tuesday May 10, 2016 11:00am - 12:30pm MDT
Booz Allen Hamilton