~/talk

Debugging and profiling techniques

Talkat EuroPython 2011 · 2011-06-20..06-26· [testing, developer-experience]
slides:none on file

Shows how to locate CPython leaks with concrete commands: use gc.get_referrers and sys.getrefcount to find hidden references, force collection with gc.collect, inspect gc.garbage for uncollectable objects, and expect surprising results like the collector freeing four objects (instances plus their __dict__ entries) for a two-object cycle. Covers weakref callbacks and finalize as __del__ workarounds, profiling with cProfile and timeit plus pstats/runsnake, C-level tools (valgrind/oprofile), and Windows pitfalls around MSVCR CRT versions, Dependency Walker and build flags (/MD /Zi).

AI-written summary · about

  1. 0:00Debugging and profiling intro
  2. 1:27Memory and resource leaks
  3. 17:02Reference counting basics
  4. 25:53Debugging reference cycles
  5. 35:33Leak detection tools
  6. 43:05Profiling with timeit and cProfile
  7. 1:00:11Advanced profiling techniques
  8. 1:06:16Debugging C++ extensions on Windows
  9. 1:21:34Q&A
~/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.