Re: [PATCH 4/4] tracing, page-allocator: Add a postprocessingscript for page-allocator-related ftrace events

From: Peter Zijlstra
Date: Wed Aug 05 2009 - 09:05:29 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/