linux_dsm_epyc7002/tools/perf/bench
Davidlohr Bueso 60758d6668 perf bench futex: Sanitize numeric parameters
This gets rid of oddities such as:

  perf bench futex hash -t -4
  perf: calloc: Cannot allocate memory

Runtime (and many more) are equally busted, i.e. run for bogus amounts of
time. Just use the abs, instead of, for example errorring out.

Committer note:

After the patch:

  $ perf bench futex hash -t -4
  # Running 'futex/hash' benchmark:
  Run summary [PID 10178]: 4 threads, each operating on 1024 [private] futexes for 10 secs.

  [thread  0] futexes: 0x34f9fa0 ... 0x34faf9c [ 4702208 ops/sec ]
  [thread  1] futexes: 0x34fb140 ... 0x34fc13c [ 4707020 ops/sec ]
  [thread  2] futexes: 0x34fc2e0 ... 0x34fd2dc [ 4711526 ops/sec ]
  [thread  3] futexes: 0x34fd480 ... 0x34fe47c [ 4709683 ops/sec ]

  Averaged 4707609 operations/sec (+- 0.04%), total secs = 10
  $

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lkml.kernel.org/r/1477342613-9938-3-git-send-email-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-10-25 09:50:53 -03:00
..
bench.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
Build perf bench: Rename 'mem-memcpy.c' => 'mem-functions.c' 2015-10-19 15:39:39 -03:00
futex-hash.c perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
futex-lock-pi.c perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
futex-requeue.c perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
futex-wake-parallel.c perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
futex-wake.c perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
futex.h perf bench futex: Sanitize numeric parameters 2016-10-25 09:50:53 -03:00
mem-functions.c perf bench mem: Move boilerplate memory allocation to the infrastructure 2016-10-24 11:07:43 -03:00
mem-memcpy-arch.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
mem-memcpy-x86-64-asm-def.h perf/bench: Fix mem* routines usage after alternatives change 2015-03-03 18:01:10 +01:00
mem-memcpy-x86-64-asm.S perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2016-07-12 15:20:32 -03:00
mem-memset-arch.h perf tools: Remove needless 'extern' from function prototypes 2016-03-23 15:06:35 -03:00
mem-memset-x86-64-asm-def.h perf/bench: Fix mem* routines usage after alternatives change 2015-03-03 18:01:10 +01:00
mem-memset-x86-64-asm.S perf bench: Copy kernel files needed to build mem{cpy,set} x86_64 benchmarks 2016-07-12 15:20:32 -03:00
numa.c perf bench numa: Use NSEC_PER_U?SEC 2016-08-23 15:37:33 -03:00
sched-messaging.c perf bench sched-messaging: Use USEC_PER_MSEC 2016-08-23 15:37:33 -03:00
sched-pipe.c perf bench sched-pipe: Use linux/time64.h, USEC_PER_SEC 2016-08-23 15:37:33 -03:00