diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-22 12:09:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-08-29 08:08:25 +0100 |
commit | 9c8e60f7718b29051268541d2cfec58e51d8e7b8 (patch) | |
tree | 20201672f6ea8571ec2bd206ee10ac4545345441 /perf/cairo-perf-trace.c | |
parent | d07ed5d990634dc09d0d1b6ce45aa8ad1994b75a (diff) |
[perf] Remove cpuset warning for cairo-perf-trace
These traces run for much longer than the original synthetic benchmarks
and seek to replicate 'real-world' applications, so the warning that the
xserver and cairo-perf are not bound to any cpu is false.
Diffstat (limited to 'perf/cairo-perf-trace.c')
-rw-r--r-- | perf/cairo-perf-trace.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/perf/cairo-perf-trace.c b/perf/cairo-perf-trace.c index c6f75267..99caa0a7 100644 --- a/perf/cairo-perf-trace.c +++ b/perf/cairo-perf-trace.c @@ -55,10 +55,6 @@ #include <fontconfig/fontconfig.h> #endif -#ifdef HAVE_SCHED_H -#include <sched.h> -#endif - #define CAIRO_PERF_ITERATIONS_DEFAULT 15 #define CAIRO_PERF_LOW_STD_DEV 0.05 #define CAIRO_PERF_MIN_STD_DEV_COUNT 3 @@ -544,37 +540,6 @@ parse_options (cairo_perf_t *perf, int argc, char *argv[]) } } -static int -check_cpu_affinity (void) -{ -#ifdef HAVE_SCHED_GETAFFINITY - cpu_set_t affinity; - int i, cpu_count; - - if (sched_getaffinity (0, sizeof (affinity), &affinity)) { - perror ("sched_getaffinity"); - return -1; - } - - for (i = 0, cpu_count = 0; i < CPU_SETSIZE; ++i) { - if (CPU_ISSET (i, &affinity)) - ++cpu_count; - } - - if (cpu_count > 1) { - fputs ("WARNING: cairo-perf has not been bound to a single CPU.\n", - stderr); - return -1; - } - - return 0; -#else - fputs ("WARNING: Cannot check CPU affinity for this platform.\n", - stderr); - return -1; -#endif -} - static void cairo_perf_fini (cairo_perf_t *perf) { @@ -705,18 +670,6 @@ main (int argc, char *argv[]) parse_options (&perf, argc, argv); - if (! perf.list_only && check_cpu_affinity ()) { - fputs ("NOTICE: cairo-perf and the X server should be bound to CPUs (either the same\n" - "or separate) on SMP systems. Not doing so causes random results when the X\n" - "server is moved to or from cairo-perf's CPU during the benchmarks:\n" - "\n" - " $ sudo taskset -cp 0 $(pidof X)\n" - " $ taskset -cp 1 $$\n" - "\n" - "See taskset(1) for information about changing CPU affinity.\n\n", - stderr); - } - signal (SIGINT, interrupt); if (getenv ("CAIRO_TRACE_DIR") != NULL) |