[tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop

From: tip-bot for Adrian Hunter
Date: Tue Nov 12 2013 - 16:57:47 EST


Commit-ID: 3fe2130523b2e098085eb4d38cd5b737a97cbee6
Gitweb: http://git.kernel.org/tip/3fe2130523b2e098085eb4d38cd5b737a97cbee6
Author: Adrian Hunter <adrian.hunter@xxxxxxxxx>
AuthorDate: Tue, 12 Nov 2013 11:45:21 -0300
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Tue, 12 Nov 2013 13:00:37 -0300

perf tests: Compensate lower sample freq with longer test loop

Doesn't work for me:

./perf test -v 19
19: Test software clock events have valid period values :
--- start ---
mmap size 528384B
mmap size 528384B
All (0) samples have period value of 1!
---- end ----
Test software clock events have valid period values: FAILED!

Compensate the lower freq introduced in 67c1e4a53b17 with a longer loop,

Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/5281D3B8.2030104@xxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/tests/sw-clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index 93a7139..6664a7c 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 1000000
+#define NR_LOOPS 10000000

/*
* This test will open software clock events (cpu-clock, task-clock)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/