Messages in this thread | | | Date | Tue, 24 Mar 2009 21:13:58 +0100 | From | Frederic Weisbecker <> | Subject | Re: ftrace not working? |
| |
On Tue, Mar 24, 2009 at 10:53:35PM +0530, Nikanth Karthikesan wrote: > 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;
Ah I see. I've sent a fix for that already, it's on latest -tip http://git.kernel.org/?p=linux/kernel/git/tip/linux-2.6-tip.git;a=commit;h=2fc1dfbe17e7705c55b7a99da995fa565e26f151
> out_free_cpumask: > free_cpumask_var(tracing_cpumask); > >
| |