From: Arnaldo Carvalho de Melo Date: Fri, 18 May 2012 16:13:33 +0000 (-0300) Subject: Merge remote-tracking branch 'tip/perf/urgent' into perf/core X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=16ee6576e25b83806d26eb771138249fcfb5eddc;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Merge remote-tracking branch 'tip/perf/urgent' into perf/core Merge reason: We are going to queue up a dependent patch: "perf tools: Move parse event automated tests to separated object" That depends on: commit e7c72d8 perf tools: Add 'G' and 'H' modifiers to event parsing Conflicts: tools/perf/builtin-stat.c Conflicted with the recent 'perf_target' patches when checking the result of perf_evsel open routines to see if a retry is needed to cope with older kernels where the exclude guest/host perf_event_attr bits were not used. Signed-off-by: Arnaldo Carvalho de Melo --- 16ee6576e25b83806d26eb771138249fcfb5eddc diff --cc tools/perf/builtin-stat.c index 0f4b51ae4be,1e5e9b270f5..62ae30d34fa --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@@ -292,10 -295,19 +294,19 @@@ static int create_perf_stat_counter(str 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; }