>> > Do you mean this: >> > >> > hw_perf_group_sched_in_begin(&x86_pmu); >> > >> > for_each_event(event, group) { >> > event->enable(); //do the collection here >> > } >> > >> > >> > if (hw_perf_group_sched_in_end(&x86_pmu)) { >> > rollback... >> > } >> > >> > That requires to know in advance if we have hardware pmu >> > in the list though (can be a flag in the group). >>
I don't think this model can work without scheduling for each event. Imagine the situation where you have more events than you have counters. At each tick you: - disable all events - rotate the list - collect events from the list - schedule events - activate Collection is the accumulation of events until you have as many as you have counters given you defer scheduling until the end (see loop above). But that does not mean you can schedule what you have accumulated. And then what do you do, i.e., rollback to what? With incremental, you can skip a group that is conflicting with the groups already accumulated. What hw_perf_group_sched_in() gives you is simply a way to do incremental on a whole event group at once. Given the perf_event model, I believe you have no other way but to do incremental scheduling of events. That is the only way you guarantee you maximize the use of the PMU. Regardless of that, the scheduling model has a bias towards smaller and less constrained event groups. ------------------------------------------------------------------------------ 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