mirror of
https://github.com/python/cpython
synced 2026-10-23 07:34:49 +03:00
Generate SystemTap probe definitions targeting libpython for shared builds and use centralized USDT probe object discovery for readelf and BPFTrace.
27 lines
498 B
Text
27 lines
498 B
Text
global tracing
|
|
|
|
probe @PYTHON_SYSTEMTAP_PROBE@("function__entry")
|
|
{
|
|
funcname = user_string($arg2);
|
|
|
|
if (funcname == "start") {
|
|
tracing = 1;
|
|
}
|
|
}
|
|
|
|
probe @PYTHON_SYSTEMTAP_PROBE@("gc__start"),
|
|
@PYTHON_SYSTEMTAP_PROBE@("gc__done")
|
|
{
|
|
if (tracing) {
|
|
printf("%d\t%s:%ld\n", gettimeofday_us(), $$name, $arg1);
|
|
}
|
|
}
|
|
|
|
probe @PYTHON_SYSTEMTAP_PROBE@("function__return")
|
|
{
|
|
funcname = user_string($arg2);
|
|
|
|
if (funcname == "start") {
|
|
tracing = 0;
|
|
}
|
|
}
|