Knocking On A Process’s Door: Introspecting Live Python Processes
summary
Live Python processes get inspected not by vague examples but by concrete tools and demos: cProfile plus flame graphs via snakeviz to show 168s total with 139s in get_some_data and 38% of time in a sleep call; a Bloomberg memory tool and objgraph to spot 45 leaked listings held in an LRU cache; external inspection with PiSpy to dump threads; and a remote-exec demo that patches update_life so increases become +2, proving hot patching works (with the usual risks).
AI-written summary · about
chapters (13)
- 0:00Live Python introspection
- 1:51Why introspect a process
- 2:35Program self-measurement
- 5:24Profiling Django endpoints
- 8:53Tracking memory with objsize
- 11:01Debugging Python leaks
- 14:31Generalizing memory tools
- 17:40Forcing program explanation
- 19:08Inspecting with Pispy
- 20:30Changing running code
- 22:15Patching live card game
- 25:23Accessible Python tools
- 26:48Key takeaways
related talks
31mTracing, Profiling & Debugging in Production (eBPF)
01h 31mDebugging and profiling techniques
33mInto the flamegraph: From the primitives through advanced concepts
24mEngage the Hyper-Python
46mProduction Is on Fire? No Stress, I Have strace (and Friends)
21mFrom PyPerf to py-spy - Everything You Need to Know About Python Profilers
56mPython Profiling State of the World
29mPeering into the black box: tips for visualizing your program's behavior
