~/talk

Self-Awareness in C++ Code

Talkat NDC TechTown 2018 · 2018-09-27..09-30· [web-performance]
slides:none on file

Built a production memory profiler that instruments allocations inside the Bloomberg Terminal by intercepting heap calls via IAT patching, calling kernel heap APIs and using CaptureStackBackTrace to produce unique call‑stack hashes, per‑pointer maps and a tree histogram UI. Uses thread_local guards to avoid reentrancy, tags allocations with pool/context info and stacks counting allocators (PMR style) to separate pool‑held vs in‑use memory. Finds concrete bugs (example: a logger pool holding huge strings that turns a 500 MB component into 800 MB), runs inside the app with low overhead and produces actionable hotspots.

AI-written summary · about

  1. 0:00Intro
  2. 3:45Tech At Bloomberg
  3. 5:36The Bloomberg Terminal
  4. 7:48We care about performance
  5. 9:21Memory Leaks? In 2018??
  6. 10:33Memory Usage: A Case Study
  7. 11:51Usual Strategies
  8. 13:33Building a memory profiler
  9. 14:20Where is malloc?
  10. 15:02Strategy #1: Intercepting malloc using the allocator shim
  11. 17:36Strategy #2: Intercepting malloc using Import Address Table redirection
  12. 21:11Capturing the traceback: helper func
  13. 21:57Step 3: Build a callstack / size histogram
  14. 22:52Data structures
  15. 24:36Gotcha #1: recursive malloc
  16. 24:56Gotcha #1 fix: recursion protection
  17. 25:12RAll recursion protection
  18. 25:48Gotcha #2 fix: Thread-local storage
  19. 26:12Instrumentation walkthrough: 2
  20. 27:10Instrumentation walkthrough: example
  21. 27:37Tree representation
  22. 27:57Building the tree
  23. 28:12Hierarchical analysis
  24. 29:03Graphical analysis
  25. 29:42Example 2: Simple leak
  26. 30:28Remember our Case Study
  27. 30:55Case Study: normal run (no errors)
  28. 31:09Case Study: with some errors
  29. 31:43Case Study: The logging?
  30. 34:46Combining callstacks and instance data
  31. 35:19Allocation context
  32. 38:44Mixed-mode systems
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.