diff options
Diffstat (limited to 'tools/perf/tests/sw-clock.c')
-rw-r--r-- | tools/perf/tests/sw-clock.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c index 6664a7c..6e2b44e 100644 --- a/tools/perf/tests/sw-clock.c +++ b/tools/perf/tests/sw-clock.c @@ -9,7 +9,7 @@ #include "util/cpumap.h" #include "util/thread_map.h" -#define NR_LOOPS 10000000 +#define NR_LOOPS 1000000 /* * This test will open software clock events (cpu-clock, task-clock) @@ -34,7 +34,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) .freq = 1, }; - attr.sample_freq = 500; + attr.sample_freq = 10000; evlist = perf_evlist__new(); if (evlist == NULL) { @@ -42,7 +42,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) return -1; } - evsel = perf_evsel__new(&attr); + evsel = perf_evsel__new(&attr, 0); if (evsel == NULL) { pr_debug("perf_evsel__new\n"); goto out_free_evlist; @@ -57,14 +57,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) goto out_delete_maps; } - if (perf_evlist__open(evlist)) { - const char *knob = "/proc/sys/kernel/perf_event_max_sample_rate"; - - err = -errno; - pr_debug("Couldn't open evlist: %s\nHint: check %s, using %" PRIu64 " in this test.\n", - strerror(errno), knob, (u64)attr.sample_freq); - goto out_delete_maps; - } + perf_evlist__open(evlist); err = perf_evlist__mmap(evlist, 128, true); if (err < 0) { |