[go: up one dir, main page]

tree: fca12aba97787221369ded00a696050278b12c0a [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. genmon.bpf.c
  10. genmon.cc
  11. libmon.cc
  12. lockmon.bpf.c
  13. lockmon.cc
  14. memmon.bpf.c
  15. memmon.cc
  16. memmon_tracing.cc
  17. OWNERS
  18. psimon.bpf.c
  19. psimon.cc
  20. 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)