Module Import alias Import alias Import alias Import alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMod Str Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Call AttributeLoad NameLoad attr Num attr Num Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str With Call AttributeLoad NameLoad attr Str NameStore body Pass Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Call AttributeLoad NameLoad attr Num attr Num Expr Call AttributeLoad NameLoad attr keyword Str keyword Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A bcc N/A ctypes N/A os N/A unittest TestUprobes N/A N/A unittest TestCase N/A test_simple_library N/A N/A self N/A N/A N/A text 
#include <uapi/linux/ptrace.h>
BPF_TABLE("array", int, u64, stats, 1);
static void incr(int idx) {
    u64 *ptr = stats.lookup(&idx);
    if (ptr)
        ++(*ptr);
}
int count(struct pt_regs *ctx) {
    u32 pid = bpf_get_current_pid_tgid();
    if (pid == PID)
        incr(0);
    return 0;
} N/A text N/A N/A text replace PID N/A %d N/A N/A os getpid N/A b N/A N/A bcc BPF text text N/A N/A N/A b attach_uprobe name c sym malloc_stats fn_name count N/A N/A N/A b attach_uretprobe name c sym malloc_stats fn_name count N/A libc N/A N/A ctypes CDLL libc.so.6 N/A N/A N/A libc malloc_stats restype None N/A N/A N/A libc malloc_stats argtypes N/A N/A N/A N/A libc malloc_stats N/A N/A N/A self assertEqual N/A N/A N/A b N/A stats N/A N/A N/A ctypes c_int 0 value 2 N/A N/A N/A b detach_uretprobe name c sym malloc_stats N/A N/A N/A b detach_uprobe name c sym malloc_stats N/A test_simple_binary N/A N/A self N/A N/A N/A text 
#include <uapi/linux/ptrace.h>
BPF_TABLE("array", int, u64, stats, 1);
static void incr(int idx) {
    u64 *ptr = stats.lookup(&idx);
    if (ptr)
        ++(*ptr);
}
int count(struct pt_regs *ctx) {
    u32 pid = bpf_get_current_pid_tgid();
    incr(0);
    return 0;
} N/A b N/A N/A bcc BPF text text N/A N/A N/A b attach_uprobe name /usr/bin/python sym main fn_name count N/A N/A N/A b attach_uretprobe name /usr/bin/python sym main fn_name count N/A N/A N/A os popen /usr/bin/python -V f N/A N/A N/A N/A N/A self assertGreater N/A N/A N/A b N/A stats N/A N/A N/A ctypes c_int 0 value 0 N/A N/A N/A b detach_uretprobe name /usr/bin/python sym main N/A N/A N/A b detach_uprobe name /usr/bin/python sym main N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main