* [tip:perf/core] perf test: Use "dummy" events in the PERF_RECORD_ test
@ 2016-01-09 16:33 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-01-09 16:33 UTC (permalink / raw)
To: linux-tip-commits
Cc: jolsa, acme, adrian.hunter, tglx, dsahern, namhyung, mingo,
linux-kernel, hpa, wangnan0
Commit-ID: 69ef8f475586974d3921c4799bfa75b8fef877a8
Gitweb: http://git.kernel.org/tip/69ef8f475586974d3921c4799bfa75b8fef877a8
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Thu, 7 Jan 2016 13:17:00 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 7 Jan 2016 13:17:00 -0300
perf test: Use "dummy" events in the PERF_RECORD_ test
As we're test just the !PERF_RECORD_SAMPLE records.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-qp8radcz3il4q9wbnseh337d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/perf-record.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/perf-record.c b/tools/perf/tests/perf-record.c
index 9d5f0b5..8dc0bab 100644
--- a/tools/perf/tests/perf-record.c
+++ b/tools/perf/tests/perf-record.c
@@ -45,7 +45,7 @@ int test__PERF_RECORD(int subtest __maybe_unused)
};
cpu_set_t cpu_mask;
size_t cpu_mask_size = sizeof(cpu_mask);
- struct perf_evlist *evlist = perf_evlist__new_default();
+ struct perf_evlist *evlist = perf_evlist__new_dummy();
struct perf_evsel *evsel;
struct perf_sample sample;
const char *cmd = "sleep";
@@ -61,6 +61,9 @@ int test__PERF_RECORD(int subtest __maybe_unused)
int total_events = 0, nr_events[PERF_RECORD_MAX] = { 0, };
char sbuf[STRERR_BUFSIZE];
+ if (evlist == NULL) /* Fallback for kernels lacking PERF_COUNT_SW_DUMMY */
+ evlist = perf_evlist__new_default();
+
if (evlist == NULL || argv == NULL) {
pr_debug("Not enough memory to create evlist\n");
goto out;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-09 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-09 16:33 [tip:perf/core] perf test: Use "dummy" events in the PERF_RECORD_ test tip-bot for Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.