attr->inherit = !no_inherit;
- if (perf_target__has_cpu(&target))
- return perf_evsel__open_per_cpu(evsel, evsel_list->cpus,
- group, group_fd);
+ retry:
+ if (exclude_guest_missing)
+ evsel->attr.exclude_guest = evsel->attr.exclude_host = 0;
+
- if (system_wide) {
++ if (perf_target__has_cpu(&target)) {
+ ret = perf_evsel__open_per_cpu(evsel, evsel_list->cpus,
- group, group_fd);
++ group, group_fd);
+ if (ret)
+ goto check_ret;
+ return 0;
+ }
+
- if (!target_pid && !target_tid && (!group || evsel == first)) {
+ if (!perf_target__has_task(&target) && (!group || evsel == first)) {
attr->disabled = 1;
attr->enable_on_exec = 1;
}