All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Changbin Du <changbin.du@gmail.com>
Cc: mingo@redhat.com, corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/tracing: Show stacktrace for wakeup tracers
Date: Wed, 16 Jan 2019 16:05:06 -0500	[thread overview]
Message-ID: <20190116160506.0d56e027@gandalf.local.home> (raw)
In-Reply-To: <20190116160249.7554-1-changbin.du@gmail.com>

On Thu, 17 Jan 2019 00:02:49 +0800
Changbin Du <changbin.du@gmail.com> wrote:

> This align the behavior of wakeup tracers with irqsoff latency tracer
> that we record stacktrace at the beginning and end of waking up. The
> stacktrace shows us what is happening in the kernel.
> 
> Signed-off-by: Changbin Du <changbin.du@gmail.com>

I've applied your patch, but it may be a while before you see it in
linux-next. I'll be traveling for a bit and wont be able to do the full
tests which I do before pushing to my linux-next branch.

You may see them soon in my ftrace/core branch on kernel.org.

-- Steve

> ---
>  kernel/trace/trace_sched_wakeup.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
> index da5b6e012840..f4fe7d1781e9 100644
> --- a/kernel/trace/trace_sched_wakeup.c
> +++ b/kernel/trace/trace_sched_wakeup.c
> @@ -475,6 +475,7 @@ probe_wakeup_sched_switch(void *ignore, bool preempt,
>  
>  	__trace_function(wakeup_trace, CALLER_ADDR0, CALLER_ADDR1, flags, pc);
>  	tracing_sched_switch_trace(wakeup_trace, prev, next, flags, pc);
> +	__trace_stack(wakeup_trace, flags, 0, pc);
>  
>  	T0 = data->preempt_timestamp;
>  	T1 = ftrace_now(cpu);
> @@ -586,6 +587,7 @@ probe_wakeup(void *ignore, struct task_struct *p)
>  	data = per_cpu_ptr(wakeup_trace->trace_buffer.data, wakeup_cpu);
>  	data->preempt_timestamp = ftrace_now(cpu);
>  	tracing_sched_wakeup_trace(wakeup_trace, p, current, flags, pc);
> +	__trace_stack(wakeup_trace, flags, 0, pc);
>  
>  	/*
>  	 * We must be careful in using CALLER_ADDR2. But since wake_up


      reply	other threads:[~2019-01-16 21:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-16 16:02 [PATCH v2] sched/tracing: Show stacktrace for wakeup tracers Changbin Du
2019-01-16 21:05 ` Steven Rostedt [this message]

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=20190116160506.0d56e027@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=changbin.du@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.