perf bench sched: Add --threaded option
authorIngo Molnar <mingo@kernel.org>
Mon, 23 Sep 2013 08:17:35 +0000 (10:17 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 11 Oct 2013 15:17:25 +0000 (12:17 -0300)
commita9faa0cab619fad380c2669825aa84212943d528
tree2e38db399c27a0d972b1e61ce5393cb61462cd0a
parentb52bc23414124b0d37fd9933b5a894d9b4a9720d
perf bench sched: Add --threaded option

Allow the measurement of thread versus process context switch
performance.

The default stays at 'process' based measurement, like lmbench's lat_ctx
benchmark.

Sample output:

 comet:~/tip/tools/perf> taskset 1 ./perf bench sched pipe
 # Running sched/pipe benchmark...
 # Executed 1000000 pipe operations between two processes

     Total time: 4.138 [sec]

       4.138729 usecs/op
         241620 ops/sec
 comet:~/tip/tools/perf> taskset 1 ./perf bench sched pipe --threaded
 # Running sched/pipe benchmark...
 # Executed 1000000 pipe operations between two threads

     Total time: 3.667 [sec]

       3.667667 usecs/op
         272652 ops/sec

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Link: http://lkml.kernel.org/r/20130917114256.GA31159@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/sched-pipe.c