Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1415152
| From | Andi Kleen <andi@firstfloor.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] perf test: Ignore .scale and other special files |
| Date | 2016-06-06 16:40 +0200 |
| Message-ID | <rH3R9-68Z-71@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Andi Kleen <ak@linux.intel.com> perf test tries to parse all entries in /sys/devices/cpu/events/. Ignore the special entries like '.scale', which cannot be directly parsed as an event. This patch assumes all files containing a '.' are special and can be ignored. Signed-off-by: Andi Kleen <ak@linux.intel.com> --- tools/perf/tests/parse-events.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/tests/parse-events.c b/tools/perf/tests/parse-events.c index 7865f68dc0d8..b2a2c74136a5 100644 --- a/tools/perf/tests/parse-events.c +++ b/tools/perf/tests/parse-events.c @@ -1783,8 +1783,8 @@ static int test_pmu_events(void) struct evlist_test e; char name[MAX_NAME]; - if (!strcmp(ent->d_name, ".") || - !strcmp(ent->d_name, "..")) + /* Names containing . are special and cannot be used directly */ + if (strchr(ent->d_name, '.')) continue; snprintf(name, MAX_NAME, "cpu/event=%s/u", ent->d_name); -- 2.5.5
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] perf test: Ignore .scale and other special files Andi Kleen <andi@firstfloor.org> - 2016-06-06 16:40 +0200
Re: [PATCH] perf test: Ignore .scale and other special files Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-06 17:00 +0200
Re: [PATCH] perf test: Ignore .scale and other special files Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-06 17:20 +0200
Re: [PATCH] perf test: Ignore .scale and other special files Andi Kleen <ak@linux.intel.com> - 2016-06-06 18:40 +0200
Re: [PATCH] perf test: Ignore .scale and other special files Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-06 22:00 +0200
Re: [PATCH] perf test: Ignore .scale and other special files Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-06-06 17:00 +0200
[tip:perf/core] perf test: Ignore .scale and other special files tip-bot for Andi Kleen <tipbot@zytor.com> - 2016-06-08 10:40 +0200
csiph-web