Skip to main content
Uber logo

Schedule rides in advance

Reserve a rideReserve a ride

Schedule rides in advance

Reserve a rideReserve a ride
Engineering

Pyflame: Uber Engineering’s Ptracing Profiler for Python

September 27, 2016 / Global
Featured image for Pyflame: Uber Engineering’s Ptracing Profiler for Python
ParameterValue
requestPTRACE_PEEKDATA
pidThe traced process ID
addrThe memory address to read
dataUnused (NULL by convention)
Each Python interpreter tracks one or more thread state objects, and each thread state has a pointer to a linked list of frames representing the call stack for that thread. The _PyThreadState_Current symbol points to the active thread.
The line number table is an array with interleaved bytecode and line number increments. The line number for a given bytecode address is computed by keeping a running sum of both bytecode increments and line number increments, and stopping at the desired address.

Posted by Evan Klitzke

Category: