Messages in this thread | | | Subject | Re: [PATCH 4/4] tracing, page-allocator: Add a postprocessing script for page-allocator-related ftrace events | From | Peter Zijlstra <> | Date | Wed, 05 Aug 2009 15:04:54 +0200 |
| |
On Tue, 2009-08-04 at 22:35 +0200, Ingo Molnar wrote:
> Did you never want to see whether firefox is leaking [any sort of] > memory, and if yes, on what callsites? Try something like on an > already running firefox context: > > perf stat -e kmem:mm_page_alloc \ > -e kmem:mm_pagevec_free \ > -e kmem:mm_page_free_direct \ > -p $(pidof firefox-bin) sleep 10 > > .... and "perf record" for the specific callsites.
If these tracepoints were to use something like (not yet in mainline)
TP_perf_assign( __perf_data(obj); ),
Where obj was the thing being allocated/freed, you could, when using PERF_SAMPLE_ADDR even match up alloc/frees, combined with PERF_SAMPLE_CALLCHAIN you could then figure out where the unmatched entries came from.
Might be useful, dunno.
| |