What I meant was that here we should ensure that a group does not>> >Please also check the number of counters.+ /*
> >>>+ * We must NOT create groups containing mixed PMUs, although
> >>>+ * software events are acceptable
> >>>+ */
> >>>+ if (event->group_leader->pmu != event->pmu &&
> >>>+ !is_software_event(event->group_leader))
> >>>+ return -EINVAL;
> >>>+
> >>>+ list_for_each_entry(sibling, &event->group_leader->sibling_list,
> >>>+ group_entry)
> >>>+ if (sibling->pmu != event->pmu && !is_software_event(sibling))
> >>>+ return -EINVAL;
>Sorry, I could not follow this comment correctly. Could you please explain ?
>I check the available counters and update used mask in pmu_add -->
>get_event_index
contain more events than can fit into counters.
For example, if the HW had two counters, we should reject any group with
more than two events. Such groups can never be scheduled, and make no
sense.
Thanks,
Mark.