{
struct evsel *evsel, *warned_leader = NULL;
- if (evlist__has_hybrid(evlist))
- evlist__warn_hybrid_group(evlist);
-
evlist__for_each_entry(evlist, evsel) {
struct evsel *leader = evsel__leader(evsel);
return 0;
}
-static bool group_hybrid_conflict(struct evsel *leader)
-{
- struct evsel *pos, *prev = NULL;
-
- for_each_group_evsel(pos, leader) {
- if (!evsel__is_hybrid(pos))
- continue;
-
- if (prev && strcmp(prev->pmu_name, pos->pmu_name))
- return true;
-
- prev = pos;
- }
-
- return false;
-}
-
-void evlist__warn_hybrid_group(struct evlist *evlist)
-{
- struct evsel *evsel;
-
- evlist__for_each_entry(evlist, evsel) {
- if (evsel__is_group_leader(evsel) &&
- evsel->core.nr_members > 1 &&
- group_hybrid_conflict(evsel)) {
- pr_warning("WARNING: events in group from "
- "different hybrid PMUs!\n");
- return;
- }
- }
-}
-
bool evlist__has_hybrid(struct evlist *evlist)
{
struct evsel *evsel;
#include <unistd.h>
int evlist__add_default_hybrid(struct evlist *evlist, bool precise);
-void evlist__warn_hybrid_group(struct evlist *evlist);
bool evlist__has_hybrid(struct evlist *evlist);
#endif /* __PERF_EVLIST_HYBRID_H */