Debian Codegraph @

testsuite/systemtap.examples/apps/gmalloc_watch.stp

raw
1 #! /usr/bin/env stap
2 // From https://blog.verbum.org/2011/03/19/analyzing-memory-use-with-systemtap/
3 // gmalloc_watch.stp: Print calls to g_malloc
4 // Usage: stap ./gmalloc-watch.stp
5
6 probe glib.mem_alloc {
7 printf ("g_malloc: pid=%d n_bytes=%d\n", pid(), n_bytes);
8 }