diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-06-03 13:17:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-03 13:17:25 -0400 |
commit | f2521b6e4c365bd0aac61b2c346e6e9f22607e31 (patch) | |
tree | 3a379ca31eecc40cb11a60fa65e6edf92b1736fa | |
parent | a96bbc16418bc691317f265d6bf98ba941ca9c1a (diff) |
perf_counter tools: Clean up old kerneltop references
kerneltop has been replaced with perf top - so fix up a few
remaining references to it in display text and error messages.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | Documentation/perf_counter/builtin-record.c | 6 | ||||
-rw-r--r-- | Documentation/perf_counter/builtin-top.c | 14 |
2 files changed, 9 insertions, 11 deletions
diff --git a/Documentation/perf_counter/builtin-record.c b/Documentation/perf_counter/builtin-record.c index cea5b8d3c633..fa625258315e 100644 --- a/Documentation/perf_counter/builtin-record.c +++ b/Documentation/perf_counter/builtin-record.c | |||
@@ -357,7 +357,8 @@ static void open_counters(int cpu, pid_t pid) | |||
357 | 357 | ||
358 | if (fd[nr_cpu][counter] < 0) { | 358 | if (fd[nr_cpu][counter] < 0) { |
359 | int err = errno; | 359 | int err = errno; |
360 | printf("kerneltop error: syscall returned with %d (%s)\n", | 360 | |
361 | error("syscall returned with %d (%s)\n", | ||
361 | fd[nr_cpu][counter], strerror(err)); | 362 | fd[nr_cpu][counter], strerror(err)); |
362 | if (err == EPERM) | 363 | if (err == EPERM) |
363 | printf("Are you root?\n"); | 364 | printf("Are you root?\n"); |
@@ -382,8 +383,7 @@ static void open_counters(int cpu, pid_t pid) | |||
382 | mmap_array[nr_cpu][counter].base = mmap(NULL, (mmap_pages+1)*page_size, | 383 | mmap_array[nr_cpu][counter].base = mmap(NULL, (mmap_pages+1)*page_size, |
383 | PROT_READ, MAP_SHARED, fd[nr_cpu][counter], 0); | 384 | PROT_READ, MAP_SHARED, fd[nr_cpu][counter], 0); |
384 | if (mmap_array[nr_cpu][counter].base == MAP_FAILED) { | 385 | if (mmap_array[nr_cpu][counter].base == MAP_FAILED) { |
385 | printf("kerneltop error: failed to mmap with %d (%s)\n", | 386 | error("failed to mmap with %d (%s)\n", errno, strerror(errno)); |
386 | errno, strerror(errno)); | ||
387 | exit(-1); | 387 | exit(-1); |
388 | } | 388 | } |
389 | } | 389 | } |
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c index a63935276cac..16a618446d3f 100644 --- a/Documentation/perf_counter/builtin-top.c +++ b/Documentation/perf_counter/builtin-top.c | |||
@@ -208,7 +208,7 @@ static void print_sym_table(void) | |||
208 | 208 | ||
209 | printf( | 209 | printf( |
210 | "------------------------------------------------------------------------------\n"); | 210 | "------------------------------------------------------------------------------\n"); |
211 | printf( " KernelTop:%8.0f irqs/sec kernel:%4.1f%% [", | 211 | printf( " PerfTop:%8.0f irqs/sec kernel:%4.1f%% [", |
212 | events_per_sec, | 212 | events_per_sec, |
213 | 100.0 - (100.0*((events_per_sec-kevents_per_sec)/events_per_sec))); | 213 | 100.0 - (100.0*((events_per_sec-kevents_per_sec)/events_per_sec))); |
214 | 214 | ||
@@ -281,7 +281,7 @@ static void print_sym_table(void) | |||
281 | 281 | ||
282 | static void *display_thread(void *arg) | 282 | static void *display_thread(void *arg) |
283 | { | 283 | { |
284 | printf("KernelTop refresh period: %d seconds\n", delay_secs); | 284 | printf("PerfTop refresh period: %d seconds\n", delay_secs); |
285 | 285 | ||
286 | while (!sleep(delay_secs)) | 286 | while (!sleep(delay_secs)) |
287 | print_sym_table(); | 287 | print_sym_table(); |
@@ -564,7 +564,8 @@ static int __cmd_top(void) | |||
564 | fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0); | 564 | fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0); |
565 | if (fd[i][counter] < 0) { | 565 | if (fd[i][counter] < 0) { |
566 | int err = errno; | 566 | int err = errno; |
567 | printf("kerneltop error: syscall returned with %d (%s)\n", | 567 | |
568 | error("syscall returned with %d (%s)\n", | ||
568 | fd[i][counter], strerror(err)); | 569 | fd[i][counter], strerror(err)); |
569 | if (err == EPERM) | 570 | if (err == EPERM) |
570 | printf("Are you root?\n"); | 571 | printf("Are you root?\n"); |
@@ -588,11 +589,8 @@ static int __cmd_top(void) | |||
588 | mmap_array[i][counter].mask = mmap_pages*page_size - 1; | 589 | mmap_array[i][counter].mask = mmap_pages*page_size - 1; |
589 | mmap_array[i][counter].base = mmap(NULL, (mmap_pages+1)*page_size, | 590 | mmap_array[i][counter].base = mmap(NULL, (mmap_pages+1)*page_size, |
590 | PROT_READ, MAP_SHARED, fd[i][counter], 0); | 591 | PROT_READ, MAP_SHARED, fd[i][counter], 0); |
591 | if (mmap_array[i][counter].base == MAP_FAILED) { | 592 | if (mmap_array[i][counter].base == MAP_FAILED) |
592 | printf("kerneltop error: failed to mmap with %d (%s)\n", | 593 | die("failed to mmap with %d (%s)\n", errno, strerror(errno)); |
593 | errno, strerror(errno)); | ||
594 | exit(-1); | ||
595 | } | ||
596 | } | 594 | } |
597 | } | 595 | } |
598 | 596 | ||