forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcfunction.bt
More file actions
19 lines (15 loc) · 703 Bytes
/
cfunction.bt
File metadata and controls
19 lines (15 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
@seq = 0;
usdt:@TARGET@:python:function__entry /str(args->arg1) == "start"/ { @trace[tid] = 1; }
usdt:@TARGET@:python:cfunction__entry /@trace[tid]/ {
@seq += 1;
const char *module = args->arg3 ? str(args->arg3) : "";
printf("%d\tcfunction-entry:%s:%s:%d:%s\n", (int)@seq,
str(args->arg0), str(args->arg1), args->arg2, module);
}
usdt:@TARGET@:python:cfunction__return /@trace[tid]/ {
@seq += 1;
const char *module = args->arg3 ? str(args->arg3) : "";
printf("%d\tcfunction-return:%s:%s:%d:%s\n", (int)@seq,
str(args->arg0), str(args->arg1), args->arg2, module);
}
usdt:@TARGET@:python:function__return /str(args->arg1) == "start"/ { @trace[tid] = 0; }