Re: [RFC] scripts: Include postprocessing script for memory allocation tracing

From: Michal Hocko
Date: Sun Oct 16 2016 - 03:34:40 EST


On Sat 15-10-16 19:31:22, Janani Ravichandran wrote:
>
> > On Oct 11, 2016, at 10:43 AM, Janani Ravichandran <janani.rvchndrn@xxxxxxxxx> wrote:
> >
> > Alright. Iâll add a starting tracepoint, change the script accordingly and
> > send a v2. Thanks!
> >
> I looked at it again and I think that the context information we need
> can be obtained from the tracepoint trace_mm_page_alloc in
> alloc_pages_nodemask().

trace_mm_page_alloc will tell you details about the allocation, like
gfp mask, order but it doesn't tell you how long the allocation took at
its current form. So either you have to note jiffies at the allocation
start and then add the end-start in the trace point or we really need
another trace point to note the start. The later has an advantage that
we do not add unnecessary load for jiffies when the tracepoint is
disabled.
--
Michal Hocko
SUSE Labs