Module Import alias ImportFrom alias Import alias identifier ClassDef bases AttributeLoad NameLoad attr body Assign NameStore ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr decorator_list Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Assert CompareGtE NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad attr Print BinOpMod Str TupleLoad NameLoad BinOpDiv Call NameLoad AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Global identifier AugAssignAdd NameStore Num decorator_list Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad FunctionDef arguments args defaults body Global identifier Global identifier Print BinOpMod Str TupleLoad NameLoad AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Call AttributeLoad NameLoad attr Num attr decorator_list AttributeLoad NameLoad attr Print Str Print Str While Num body Expr Call AttributeLoad NameLoad attr
N/A N/A atexit bcc BPF N/A ctypes ct Data N/A N/A ct Structure N/A N/A _fields_ N/A N/A ts N/A ct c_ulonglong N/A magic N/A ct c_ulonglong N/A N/A counter 0 cb N/A N/A cpu data size N/A N/A N/A N/A size N/A N/A ct sizeof Data N/A event N/A N/A N/A ct cast data N/A N/A ct POINTER Data contents N/A N/A [%0d] %f: %x N/A cpu N/A N/A float N/A event ts 1000000 N/A event magic N/A counter N/A counter 1 N/A N/A prog 
BPF_PERF_OUTPUT(events);
BPF_TABLE("array", int, u64, counters, 10);
int kprobe__sys_clone(void *ctx) {
  struct {
    u64 ts;
    u64 magic;
  } data = {bpf_ktime_get_ns(), 0x12345678};
  int rc;
  if ((rc = events.perf_submit(ctx, &data, sizeof(data))) < 0)
    bpf_trace_printk("perf_output failed: %d\n", rc);
  int zero = 0;
  u64 *val = counters.lookup(&zero);
  if (val) lock_xadd(val, 1);
  return 0;
}
 N/A b N/A BPF text prog N/A N/A N/A N/A b N/A events open_perf_buffer cb print_counter N/A N/A N/A N/A N/A counter N/A b N/A N/A counter = %d vs %d N/A counter N/A N/A N/A b N/A counters N/A N/A N/A ct c_int 0 value N/A N/A atexit register N/A Tracing sys_write, try `dd if=/dev/zero of=/dev/null` N/A Tracing... Hit Ctrl-C to end. N/A 1 N/A N/A N/A N/A b kprobe_poll