On Wed, Jan 13, 2010 at 06:22:54PM +0100, Stephane Eranian wrote:
> Ok,
> 
> Something like that should problably do it:
> 
> static void event_sched_out(struct perf_event *event, int cpu)
> {
>         event->state = PERF_EVENT_STATE_INACTIVE;
>         event->oncpu = -1;
> }



You need to also call pmu->disable() if it is a software event,
because a breakpoint needs to be unregistered in hardware level
too.

And disable it in x86 level if it is an x86 event?


 
> hw_perf_group_sched_in()
> {
>        ....
>        n = 1;
>         list_for_each_entry(sub, &leader->sibling_list, group_entry) {
>                 if (sub->state > PERF_EVENT_STATE_OFF) {
>                         ret = event_sched_in(sub, cpu);
>                         if (ret)
>                                 goto undo;



Yeah we indeed really need to check that.

Thanks.


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to