[PATCH v6 tip 8/8] samples: bpf: kmem_alloc/free tracker

2015-03-10 Thread Alexei Starovoitov
One bpf program attaches to kmem_cache_alloc_node() and remembers all allocated objects in the map. Another program attaches to kmem_cache_free() and deletes corresponding object from the map. User space walks the map every second and prints any objects which are older than 1 second. Usage: $

[PATCH v6 tip 8/8] samples: bpf: kmem_alloc/free tracker

2015-03-10 Thread Alexei Starovoitov
One bpf program attaches to kmem_cache_alloc_node() and remembers all allocated objects in the map. Another program attaches to kmem_cache_free() and deletes corresponding object from the map. User space walks the map every second and prints any objects which are older than 1 second. Usage: $