lkml.org 
[lkml]   [2016]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] scripts: Include postprocessing script for memory allocation tracing
From
Date

> On Oct 21, 2016, at 3:08 AM, Michal Hocko <mhocko@kernel.org> wrote:
>
> Interesting.
> $ cat /debug/tracing/available_tracers
> function_graph preemptirqsoff preemptoff irqsoff function nop
>
> Do I have to configure anything specially? And if I do why isn't it any
> better to simply add a start tracepoint and make this available also to
> older kernels?

Well, you just need to enable the function_graph tracer in the tracing directory:
echo function_graph > current_tracer,

set funcgraph-proc in trace_options to get process information:
echo funcgraph-proc > trace_options,

set funcgraph-abstime in trace_options to get timestamp,
echo funcgraph-abstime > trace_options

set all the functions we’d like to observe as filters. For e.g.
echo __alloc_pages_nodemask > set_ftrace_filter

and enable the tracepoints we would like to get information from.

I didn’t add a begin tracepoint for this as Steven Rostedt had suggested
using function graph instead of begin/end tracepoints (we already have
a tracepoint in __alloc_pages_nodemask - trace_mm_page_alloc to get
some information about the allocation and we can just use function graph
to see how long __alloc_pages_nodemask() takes).

Janani

> --
> Michal Hocko
> SUSE Labs

\
 
 \ /
  Last update: 2016-10-27 18:02    [W:0.085 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site