lkml.org 
[lkml]   [2016]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 37/59] perf tests: No need to set attr.sample_freq for tracking !PERF_RECORD_SAMPLE
Date
From: Arnaldo Carvalho de Melo <acme@redhat.com>

We were asking for a 4kHz sample_freq, making the test fail needlessly
when the system reduced /proc/sys/kernel/perf_event_max_sample_rate
below that.

Before:

# perf test -vv dummy
23: Test using a dummy software event to keep tracking :
--- start ---
test child forked, pid 32421
------------------------------------------------------------
perf_event_attr:
type 1
size 112
config 0x9
{ sample_period, sample_freq } 4000
sample_type IP|TID|ID|PERIOD
<SNIP>
sys_perf_event_open failed, error -22
Unable to open dummy and cycles event
test child finished with -2
---- end ----
Test using a dummy software event to keep tracking: Skip
#
[root@zoo ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
1000

After:

[root@zoo ~]# perf test dummy
23: Test using a dummy software event to keep tracking : Ok

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-487iquegrs2379e5n0pi0tcp@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/tests/keep-tracking.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/tools/perf/tests/keep-tracking.c b/tools/perf/tests/keep-tracking.c
index a337a6da1f39..615813278334 100644
--- a/tools/perf/tests/keep-tracking.c
+++ b/tools/perf/tests/keep-tracking.c
@@ -55,7 +55,6 @@ int test__keep_tracking(int subtest __maybe_unused)
.mmap_pages = UINT_MAX,
.user_freq = UINT_MAX,
.user_interval = ULLONG_MAX,
- .freq = 4000,
.target = {
.uses_mmap = true,
},
--
2.1.0
\
 
 \ /
  Last update: 2016-01-08 20:01    [W:0.761 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site