]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/bench/numa.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / tools / perf / bench / numa.c
index 8efe904e486bf98b63e24b7904652f10ca5ec7e9..3083fc36282b564d3fc5da05864907c3ac222cf4 100644 (file)
@@ -43,6 +43,7 @@
 /*
  * Debug printf:
  */
+#undef dprintf
 #define dprintf(x...) do { if (g && g->p.show_details >= 1) printf(x); } while (0)
 
 struct thread_data {
@@ -1573,13 +1574,13 @@ static int __bench_numa(const char *name)
                "GB/sec,", "total-speed",       "GB/sec total speed");
 
        if (g->p.show_details >= 2) {
-               char tname[32];
+               char tname[14 + 2 * 10 + 1];
                struct thread_data *td;
                for (p = 0; p < g->p.nr_proc; p++) {
                        for (t = 0; t < g->p.nr_threads; t++) {
-                               memset(tname, 0, 32);
+                               memset(tname, 0, sizeof(tname));
                                td = g->threads + p*g->p.nr_threads + t;
-                               snprintf(tname, 32, "process%d:thread%d", p, t);
+                               snprintf(tname, sizeof(tname), "process%d:thread%d", p, t);
                                print_res(tname, td->speed_gbs,
                                        "GB/sec",       "thread-speed", "GB/sec/thread speed");
                                print_res(tname, td->system_time_ns / NSEC_PER_SEC,