From 751b683a9d38e740139c88f5ee06d5b526fceb29 Mon Sep 17 00:00:00 2001 From: "Gary S. Robertson" Date: Tue, 25 Mar 2014 18:05:32 -0500 Subject: Don't offer --numa option when unavailable Signed-off-by: Gary S. Robertson Signed-off-by: Clark Williams --- src/cyclictest/cyclictest.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index c3fa60f..23706c7 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -1034,8 +1034,10 @@ static void display_help(int error) "-T TRACE --tracer=TRACER set tracing function\n" " configured tracers: %s\n" "-u --unbuffered force unbuffered output for live processing\n" +#ifdef NUMA "-U --numa Standard NUMA testing (similar to SMP option)\n" " thread data structures allocated from local node\n" +#endif "-v --verbose output values on stdout for statistics\n" " format: n:c:v n=tasknum c=count v=value in us\n" "-w --wakeup task wakeup tracing (used with -b)\n" @@ -1113,10 +1115,10 @@ static void parse_cpumask(const char *option, const int max_cpus) if (!affinity_mask) display_help(1); - if (verbose) { +// if (verbose) { printf("%s: Using %u cpus.\n", __func__, rt_numa_bitmask_count(affinity_mask)); - } +// } } @@ -1241,9 +1243,11 @@ static void process_options (int argc, char *argv[], int max_cpus) if (smp || numa) break; if (optarg != NULL) { + printf("optarg != NULL!\n"); parse_cpumask(optarg, max_cpus); setaffinity = AFFINITY_SPECIFIED; } else if (optindcpu = -1; break; case AFFINITY_SPECIFIED: par->cpu = cpu_for_thread(i, max_cpus); - if (verbose) + //if (verbose) printf("Thread %d using cpu %d.\n", i, par->cpu); break; -- cgit 1.2.3-korg