~/talk

Let's Intercept OpenGL Function Calls...for Logging!

Talkat CppCon 2018 · 2018-09-23..09-28· [c-and-cpp, creative-coding]
slides:none on file

A working OpenGL logger is built that records 100% of API calls by interposing or injecting code and writing compact traces; strategies include simple printf/macros, a LLVM function-pass for source rewriting, compile-time interposition or LD_PRELOAD, and dynamic tools like Intel Pin or ptrace attach. Data is written as integers via a hashmap, buffered with ring buffers to avoid stalls. Demo logs per-frame call counts, exposes redundant glEnable calls and high glDrawArrays frequency, and trades accuracy for runtime overhead.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 1:50Goals for the OpenGL Logger
  3. 2:52What is OpenGL and why log
  4. 5:32Strategies for dynamic analysis
  5. 8:04Logging 100% of OpenGL calls
  6. 9:12First try with printf logging
  7. 11:04LLVM function-level instrumentation
  8. 15:49Storing logged data efficiently
  9. 20:08Logging without source code
  10. 20:53Dynamic binary instrumentation with Pin
  11. 24:40Ptrace for lightweight logging
  12. 26:30Additional instrumentation tools
  13. 27:14Homework and next steps
  14. 28:37Results and closing
~/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.