linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janani Ravichandran <janani.rvchndrn@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Janani Ravichandran <janani.rvchndrn@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	riel@surriel.com, akpm@linux-foundation.org, hannes@compxchg.org,
	vdavydov@virtuozzo.com, mhocko@suse.com, vbabka@suse.cz,
	mgorman@techsingularity.net, kirill.shutemov@linux.intel.com,
	bywxiaobai@163.com
Subject: Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath
Date: Sun, 7 Aug 2016 16:06:18 +0530	[thread overview]
Message-ID: <93BEB5B5-321C-429B-9B87-40F8B499E45D@gmail.com> (raw)
In-Reply-To: <20160805123034.75fae008@gandalf.local.home>


> On Aug 5, 2016, at 10:00 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> 
>> 
> 
> You probably want to clear the trace here, or set function_graph here
> first. Because the function graph starts writing to the buffer
> immediately.
> 

I did that, just didn’t include it here :)
>> 
> 
> When threshold is set, the entry is not recorded, because it is only
> showing the exit and the time it took in that function:
> 
> 0) kswapd0-52 | + 54.141 us | } /* shrink_zone */
> 
> shrink_zone() took 54.141us.
> 
> The reason it doesn't record the entry is because it would fill the
> entire buffer, if the threshold is never hit. One can't predict the
> time in a function when you first enter that function.

Right!
> 
>> 
> 
> You need your own interpreter here. Perhaps a module that either reads
> the tracepoints directly and registers a function graph tracer itself.
> The trace events and function tracers are plugable. You don't need to
> use the tracing system to use them. Just hook into them directly.
> 
> Things like the wakeup latency tracer does this. Look at
> kernel/trace/trace_sched_wakeup.c for an example. It hooks into the
> sched_wakeup and sched_switch tracepoints, and also has a way to use
> function and function_graph tracing.
> 
> 

I will look at that file. Thanks!
> 
>> 
> 
> Great! And note, even if you add extra tracepoints, you can hook
> directly into them too. Again, see the trace_sched_wakeup.c for
> examples.

Alright. Thanks for all the help! :)

Janani.
> 
> -- Steve

  reply	other threads:[~2016-08-07 10:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 14:43 [PATCH 0/2] New tracepoints for slowpath and memory compaction Janani Ravichandran
2016-07-27 14:47 ` [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath Janani Ravichandran
2016-07-27 15:23   ` Steven Rostedt
2016-07-27 17:20     ` Dave Hansen
2016-07-27 17:30       ` Steven Rostedt
2016-07-28 20:11     ` Janani Ravichandran
2016-08-04 15:19       ` Steven Rostedt
2016-08-05 16:03         ` Janani Ravichandran
2016-08-05 16:30           ` Steven Rostedt
2016-08-07 10:36             ` Janani Ravichandran [this message]
2016-07-27 16:33   ` Michal Hocko
2016-07-27 18:16     ` Rik van Riel
2016-07-27 18:28       ` Steven Rostedt
2016-07-27 18:44       ` Michal Hocko
2016-07-27 18:57         ` Rik van Riel
2016-07-27 14:51 ` [PATCH 2/2] mm: compaction.c: Add/Modify direct compaction tracepoints Janani Ravichandran
2016-07-27 15:24   ` Steven Rostedt
2016-08-01 13:25   ` Vlastimil Babka
2016-08-07 12:32     ` Janani Ravichandran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93BEB5B5-321C-429B-9B87-40F8B499E45D@gmail.com \
    --to=janani.rvchndrn@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bywxiaobai@163.com \
    --cc=hannes@compxchg.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=riel@surriel.com \
    --cc=rostedt@goodmis.org \
    --cc=vbabka@suse.cz \
    --cc=vdavydov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).