All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikanth Karthikesan <knikanth@suse.de>
To: Steven Rostedt <rostedt@goodmis.org>,
	Steven Rostedt <srostedt@redhat.com>
Cc: rusty@rustcorp.com.au, "Ingo Molnar" <mingo@elte.hu>,
	"KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>,
	"Fr馘駻ic Weisbecker" <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: ftrace not working?
Date: Tue, 24 Mar 2009 22:53:35 +0530	[thread overview]
Message-ID: <200903242253.36794.knikanth@suse.de> (raw)
In-Reply-To: <20090323143226.GA18439@elte.hu>

On Monday 23 March 2009 20:02:26 Ingo Molnar wrote:
> * KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> > > On Monday 23 March 2009 14:05:33 Ingo Molnar wrote:
> > > > one thing to note:
> > > > | CPU0: Intel QEMU Virtual CPU version 0.9.1 stepping 03
> > > > | Testing tracer nop: PASSED
> > > >
> > > > so it's a Qemu session, right?
> > >
> > > Yes. qemu-kvm.
> >
> > Ah, sorry. I don't know qemu and kvm at all ;)
>
> In terms of tracing it should just look like some weird old CPU with
> few capabilities and long delays. Nothing in ftrace depends on CPU
> capabilities (that wasnt present in pentia) so this is weird.
> Perhaps some timestamping problem? Virtual machines tend to have
> trouble with the TSC. Or code patching problems? But that does not
> explain the lack of explicit scheduler events.
>
> Or perhaps the fact that qemu sessions tend to boot with barely any
> RAM. Maybe the ringbuffer size is very low?
>

Nope, it is not a qemu problem, but ftrace. Most probably, it shouldn't work on
real hardware as well with my config. i.e., CONFIG_CPUMASK_OFFSTACK = y
and NR_CPUS = 4096 via CONFIG_MAXSMP.

The tracing_buffer_mask was getting freed and the bitmask was all zeros. And
for_each_tracing_cpu() never looped. Here is the patch that fixes the issue
for me. Tested only on qemu-kvm. ;)

Steve, Can you merge this.

Thanks
Nikanth

In tracer_alloc_buffers(), do not free tracing_cpumask and tracing_buffer_mask
on success.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

---

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 17bb88d..98f609d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3887,6 +3887,7 @@ __init static int tracer_alloc_buffers(void)
 
 	register_die_notifier(&trace_die_notifier);
 	ret = 0;
+	goto out;
 
 out_free_cpumask:
 	free_cpumask_var(tracing_cpumask);



  reply	other threads:[~2009-03-24 17:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23  6:38 ftrace not working? Nikanth Karthikesan
2009-03-23  7:15 ` Frederic Weisbecker
2009-03-23  8:41   ` Frederic Weisbecker
2009-03-23  8:44     ` Nikanth Karthikesan
2009-03-23 11:25       ` Frederic Weisbecker
2009-03-23 11:33         ` Nikanth Karthikesan
2009-03-23  8:08 ` KOSAKI Motohiro
2009-03-23  8:27   ` Nikanth Karthikesan
2009-03-23  8:35     ` Ingo Molnar
2009-03-23  8:38       ` Nikanth Karthikesan
2009-03-23 11:01         ` KOSAKI Motohiro
2009-03-23 14:32           ` Ingo Molnar
2009-03-24 17:23             ` Nikanth Karthikesan [this message]
2009-03-24 20:13               ` Frederic Weisbecker
2009-03-25  2:21                 ` Steven Rostedt
2009-03-25  4:06                   ` Nikanth Karthikesan
2009-03-25  4:19                     ` Steven Rostedt
2009-03-25  1:08               ` Rusty Russell
2009-03-25  3:21               ` KOSAKI Motohiro
2009-03-25  7:27                 ` Ingo Molnar

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=200903242253.36794.knikanth@suse.de \
    --to=knikanth@suse.de \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=srostedt@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.