From f2521b6e4c365bd0aac61b2c346e6e9f22607e31 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 3 Jun 2009 19:17:25 +0200 Subject: 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 Cc: Mike Galbraith Cc: Paul Mackerras Cc: Corey Ashford Cc: Marcelo Tosatti Cc: Arnaldo Carvalho de Melo Cc: Thomas Gleixner LKML-Reference: Signed-off-by: Ingo Molnar --- Documentation/perf_counter/builtin-top.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'Documentation/perf_counter/builtin-top.c') 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) printf( "------------------------------------------------------------------------------\n"); - printf( " KernelTop:%8.0f irqs/sec kernel:%4.1f%% [", + printf( " PerfTop:%8.0f irqs/sec kernel:%4.1f%% [", events_per_sec, 100.0 - (100.0*((events_per_sec-kevents_per_sec)/events_per_sec))); @@ -281,7 +281,7 @@ static void print_sym_table(void) static void *display_thread(void *arg) { - printf("KernelTop refresh period: %d seconds\n", delay_secs); + printf("PerfTop refresh period: %d seconds\n", delay_secs); while (!sleep(delay_secs)) print_sym_table(); @@ -564,7 +564,8 @@ static int __cmd_top(void) fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0); if (fd[i][counter] < 0) { int err = errno; - printf("kerneltop error: syscall returned with %d (%s)\n", + + error("syscall returned with %d (%s)\n", fd[i][counter], strerror(err)); if (err == EPERM) printf("Are you root?\n"); @@ -588,11 +589,8 @@ static int __cmd_top(void) mmap_array[i][counter].mask = mmap_pages*page_size - 1; mmap_array[i][counter].base = mmap(NULL, (mmap_pages+1)*page_size, PROT_READ, MAP_SHARED, fd[i][counter], 0); - if (mmap_array[i][counter].base == MAP_FAILED) { - printf("kerneltop error: failed to mmap with %d (%s)\n", - errno, strerror(errno)); - exit(-1); - } + if (mmap_array[i][counter].base == MAP_FAILED) + die("failed to mmap with %d (%s)\n", errno, strerror(errno)); } } -- cgit v1.2.2