Re: [PATCH 1/4] ksym_tracer: Fix to make the tracer work

From: Frederic Weisbecker
Date: Sat Jan 09 2010 - 22:11:10 EST


On Thu, Dec 31, 2009 at 01:54:35PM +0800, Li Zefan wrote:
> K.Prasad wrote:
> > Frederic must have used for_each_possible_cpu() to account for CPUs that
> > are offline at the time of registration, but may eventually turn online.
> > Since register_wide_hw_breakpoint() interface is designed to deliver
> > system-wide breakpoints, the debug registers of a new online CPU will
> > should have the breakpoints populated to comprehensively notify all
> > memory accesses over target address.
> >
> > I'd rather wait to hear from Frederic to know why
> > perf_event_create_kernel_counter() returns an error when run for an
> > offline cpu and how it can be solved.
> >
>
> See the comment in find_get_context() in kernel/perf_event.c:
>
> /*
> * We could be clever and allow to attach a event to an
> * offline CPU and activate it when the CPU comes up, but
> * that's for later.
> */
> if (!cpu_online(cpu))
> return ERR_PTR(-ENODEV);
>
> So I think we can use for_each_possible_cpu() in the future, but not now.
>


Ah, right I indeed missed that.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/