Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451431

Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath
Date 2016-07-27 19:40 +0200
Message-ID <rZAYi-2pt-17@gated-at.bofh.it> (permalink)
References <rZyjM-F9-5@gated-at.bofh.it> <rZyjM-F9-11@gated-at.bofh.it> <rZyWu-19P-29@gated-at.bofh.it> <rZAOB-2kF-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 27 Jul 2016 10:20:28 -0700
Dave Hansen <dave.hansen@intel.com> wrote:

> On 07/27/2016 08:23 AM, Steven Rostedt wrote:
> >> > +
> >> > +	trace_mm_slowpath_end(page);
> >> > +  
> > I'm thinking you only need one tracepoint, and use function_graph
> > tracer for the length of the function call.
> > 
> >  # cd /sys/kernel/debug/tracing
> >  # echo __alloc_pages_nodemask > set_ftrace_filter
> >  # echo function_graph > current_tracer
> >  # echo 1 > events/kmem/trace_mm_slowpath/enable  
> 
> I hesitate to endorse using the function_graph tracer for this kind of
> stuff.  Tracepoints offer some level of stability in naming, and the
> compiler won't ever make them go away.   While __alloc_pages_nodemask is
> probably more stable than most things, there's no guarantee that it will
> be there.

Well, then you are also advocating in a userspace ABI interface that
will have to be maintained forever. Just be warned.

> 
> BTW, what's the overhead of the function graph tracer if the filter is
> set up to be really restrictive like above?  Is the overhead really just
> limited to that one function?

Yes, if DYNAMIC_FTRACE is defined. Which it should be, because static
ftrace has a huge overhead without enabling the tracer.

It will enable only that function to be traced. I've recommend before
that if one wants to have a good idea of how long a function lasts,
they should filter to a single function. Anything else will include
overhead of the tracer itself.

-- Steve

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] New tracepoints for slowpath and memory compaction Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-07-27 16:50 +0200
  [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-07-27 16:50 +0200
    Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Steven Rostedt <rostedt@goodmis.org> - 2016-07-27 17:30 +0200
      Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Dave Hansen <dave.hansen@intel.com> - 2016-07-27 19:30 +0200
        Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Steven Rostedt <rostedt@goodmis.org> - 2016-07-27 19:40 +0200
      Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-07-28 22:20 +0200
        Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Steven Rostedt <rostedt@goodmis.org> - 2016-08-04 17:30 +0200
          Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-08-05 18:20 +0200
            Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Steven Rostedt <rostedt@goodmis.org> - 2016-08-05 18:40 +0200
              Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-08-07 12:40 +0200
    Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Michal Hocko <mhocko@kernel.org> - 2016-07-27 18:40 +0200
      Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Rik van Riel <riel@surriel.com> - 2016-07-27 20:20 +0200
        Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Steven Rostedt <rostedt@goodmis.org> - 2016-07-27 20:30 +0200
        Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Michal Hocko <mhocko@kernel.org> - 2016-07-27 20:50 +0200
          Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Rik van Riel <riel@surriel.com> - 2016-07-27 21:00 +0200
  [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction  tracepoints Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-07-27 17:00 +0200
    Re: [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction  tracepoints Steven Rostedt <rostedt@goodmis.org> - 2016-07-27 17:30 +0200
    Re: [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction  tracepoints Vlastimil Babka <vbabka@suse.cz> - 2016-08-01 15:30 +0200
      Re: [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction tracepoints Janani Ravichandran <janani.rvchndrn@gmail.com> - 2016-08-07 14:40 +0200

csiph-web