tree: 4eee6d610e52e2226b3d52f43f7ddbd875b6a2e4 [path history] [tgz]
  1. conf/
  2. contrib/
  3. include/
  4. test/
  5. BUILD.gn
  6. DIR_METADATA
  7. fdmon.bpf.c
  8. fdmon.cc
  9. libmon.cc
  10. lockmon.bpf.c
  11. lockmon.cc
  12. memmon.bpf.c
  13. memmon.cc
  14. memmon_tracing.cc
  15. OWNERS
  16. README.md
bpf-mons/README.md

bpf-mons - Utilities for resources usage tracking

A collection of BPF programs (mon) for in-depth (user-space/kernel-space) applications tracing.

bpf-memmon

Intercepts various memory related functions (e.g. libc malloc(), free(), kernel's handle_mm_fault(), etc.)

bpf-fdmon

Intercepts functions that modify processes file-table (e.g. libc open(), dup(), close(), etc.)

Build and run

  1. Your kernel should be compiled with CONFIG_KPROBES (USE=kprobes)

  2. Build and deploy blazesym-c

emerge-$BOARD dev-rust/blazesym-c
cros deploy $BOARD dev-rust/blazesym-c
  1. Build and deploy BPF mons
emerge-$BOARD dev-util/bpf-mons
cros deploy $BOARD dev-util/bpf-mons

On the DUT (for example):

bpf-memmon -p $(pidof $APP)