3 ms·
This is pretty interesting. I'm not sure if many commenters have abstracted this approach the way I would have, but it is sure is a handy trick to couple virtua
by fdr 3y ago
This is pretty interesting. I'm not sure if many commenters have abstracted this approach the way I would have, but it is sure is a handy trick to couple virtual memory related system calls (brk, mmap) to stack dumps and aggregation thereof, and it would not have been so easy to do in, say, 2009.
- saurik 3y agoI was definitely doing this kind of thing back in 2009 but I swear also in 2003 by just wrapping the few standard library memory allocation functions and adding a backtrace loop to store information about the caller. I am not sure where the difficulty is in implementing it?
- fdr 2y agoThis requires no wrapping, you can instrument with perf using the syscall rather than indirecting a library. You might say "same difference," but it is less invasive, and can be enabled or disabled on the fly.