Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1697428
| From | tip-bot for Jiri Olsa <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf evsel: Add verbose output for sys_perf_event_open fallback |
| Date | 2017-07-26 19:30 +0200 |
| Message-ID | <u7yig-3eE-55@gated-at.bofh.it> (permalink) |
| References | <u5F4u-4Ir-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 2b04e0f88291c0dc7e12459bd3c3661d42209b4e
Gitweb: http://git.kernel.org/tip/2b04e0f88291c0dc7e12459bd3c3661d42209b4e
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Fri, 21 Jul 2017 14:12:09 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 25 Jul 2017 11:23:53 -0300
perf evsel: Add verbose output for sys_perf_event_open fallback
Adding info about what is being switched off in the sys_perf_event_open
fallback.
New output (notice the 'switching off' lines):
$ perf stat -e '{cycles,instructions}' -vvv ls
Using CPUID GenuineIntel-6-3D
intel_pt default config: tsc
------------------------------------------------------------
perf_event_attr:
size 112
sample_type IDENTIFIER
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 3591 cpu -1 group_fd -1 flags 0x8
sys_perf_event_open failed, error -22
switching off cloexec flag
------------------------------------------------------------
perf_event_attr:
size 112
sample_type IDENTIFIER
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
disabled 1
inherit 1
enable_on_exec 1
exclude_guest 1
------------------------------------------------------------
sys_perf_event_open: pid 3591 cpu -1 group_fd -1 flags 0
sys_perf_event_open failed, error -22
switching off exclude_guest, exclude_host
------------------------------------------------------------
perf_event_attr:
size 112
sample_type IDENTIFIER
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
disabled 1
inherit 1
enable_on_exec 1
------------------------------------------------------------
sys_perf_event_open: pid 3591 cpu -1 group_fd -1 flags 0
sys_perf_event_open failed, error -22
switching off sample_id_all
------------------------------------------------------------
perf_event_attr:
size 112
sample_type IDENTIFIER
read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING|ID|GROUP
disabled 1
inherit 1
enable_on_exec 1
...
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170721121212.21414-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/evsel.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 6dd069a..450b5fa 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1671,31 +1671,39 @@ try_fallback:
*/
if (!perf_missing_features.write_backward && evsel->attr.write_backward) {
perf_missing_features.write_backward = true;
+ pr_debug2("switching off write_backward\n");
goto out_close;
} else if (!perf_missing_features.clockid_wrong && evsel->attr.use_clockid) {
perf_missing_features.clockid_wrong = true;
+ pr_debug2("switching off clockid\n");
goto fallback_missing_features;
} else if (!perf_missing_features.clockid && evsel->attr.use_clockid) {
perf_missing_features.clockid = true;
+ pr_debug2("switching off use_clockid\n");
goto fallback_missing_features;
} else if (!perf_missing_features.cloexec && (flags & PERF_FLAG_FD_CLOEXEC)) {
perf_missing_features.cloexec = true;
+ pr_debug2("switching off cloexec flag\n");
goto fallback_missing_features;
} else if (!perf_missing_features.mmap2 && evsel->attr.mmap2) {
perf_missing_features.mmap2 = true;
+ pr_debug2("switching off mmap2\n");
goto fallback_missing_features;
} else if (!perf_missing_features.exclude_guest &&
(evsel->attr.exclude_guest || evsel->attr.exclude_host)) {
perf_missing_features.exclude_guest = true;
+ pr_debug2("switching off exclude_guest, exclude_host\n");
goto fallback_missing_features;
} else if (!perf_missing_features.sample_id_all) {
perf_missing_features.sample_id_all = true;
+ pr_debug2("switching off sample_id_all\n");
goto retry_sample_id;
} else if (!perf_missing_features.lbr_flags &&
(evsel->attr.branch_sample_type &
(PERF_SAMPLE_BRANCH_NO_CYCLES |
PERF_SAMPLE_BRANCH_NO_FLAGS))) {
perf_missing_features.lbr_flags = true;
+ pr_debug2("switching off branch sample type no (cycles/flags)\n");
goto fallback_missing_features;
}
out_close:
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] perf stat: Enable group read of counters Jiri Olsa <jolsa@kernel.org> - 2017-07-21 14:20 +0200
[PATCH 1/4] perf tools: Add verbose output for sys_perf_event_open fallback Jiri Olsa <jolsa@kernel.org> - 2017-07-21 14:20 +0200
[tip:perf/core] perf evsel: Add verbose output for sys_perf_event_open fallback tip-bot for Jiri Olsa <tipbot@zytor.com> - 2017-07-26 19:30 +0200
[PATCH 3/4] perf tools: Add perf_evsel__read_counter function Jiri Olsa <jolsa@kernel.org> - 2017-07-21 14:20 +0200
Re: [PATCH 3/4] perf tools: Add perf_evsel__read_counter function Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-26 03:50 +0200
Re: [PATCH 3/4] perf tools: Add perf_evsel__read_counter function Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-26 03:50 +0200
Re: [PATCH 3/4] perf tools: Add perf_evsel__read_counter function Jiri Olsa <jolsa@redhat.com> - 2017-07-26 09:40 +0200
[PATCH 2/4] perf tools: Add perf_evsel__read_size function Jiri Olsa <jolsa@kernel.org> - 2017-07-21 14:20 +0200
Re: [PATCH 0/4] perf stat: Enable group read of counters Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-07-21 19:10 +0200
csiph-web