[PATCH] D48879: [XRay][test-suite] Benchmarks for profiling mode implementation

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 06:55:44 PDT 2018


dberris planned changes to this revision.
dberris added a comment.

Some initial numbers for context:

  $ ./MicroBenchmarks/XRay/ProfilingMode/deep-call-bench
  Run on (48 X 3500 MHz CPU s)
  2018-07-03 23:48:19
  ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
  --------------------------------------------------------------------------------
  Benchmark                                         Time           CPU Iterations
  --------------------------------------------------------------------------------
  BM_XRayProfilingDeepCallStack/threads:1        1038 ns       1038 ns     609434
  BM_XRayProfilingDeepCallStack/threads:2         742 ns       1485 ns     473966
  BM_XRayProfilingDeepCallStack/threads:4         562 ns       2247 ns     243984
  BM_XRayProfilingDeepCallStack/threads:8        8798 ns      70379 ns       8000
  BM_XRayProfilingDeepCallStack/threads:16      15860 ns     253766 ns       4144
  BM_XRayProfilingDeepCallStack/threads:32       7404 ns     176888 ns       6080

And for the shallow calls:

  $ ./MicroBenchmarks/XRay/ProfilingMode/shallow-call-bench
  Run on (48 X 3500 MHz CPU s)
  2018-07-03 23:49:30
  ***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
  -------------------------------------------------------------------------------
  Benchmark                                        Time           CPU Iterations
  -------------------------------------------------------------------------------
  BM_XRayProfilingShallowStack/threads:1         143 ns        143 ns    4190065
  BM_XRayProfilingShallowStack/threads:2         174 ns        348 ns    2429826
  BM_XRayProfilingShallowStack/threads:4         142 ns        567 ns    1107872
  BM_XRayProfilingShallowStack/threads:8         413 ns       3307 ns     172928
  BM_XRayProfilingShallowStack/threads:16        557 ns       8907 ns      66992
  BM_XRayProfilingShallowStack/threads:32        935 ns      29903 ns      63200

This is with the bug fixes in https://reviews.llvm.org/D48653. There's a bit more work to do to reduce the costs on the cases for deep, tightly-run call stacks.

We're missing a "wide" call stack version, and my intent is to use some recursive functions to see how we might be able to change those.


Repository:
  rT test-suite

https://reviews.llvm.org/D48879





More information about the llvm-commits mailing list