[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-f2521b6e4c365bd0aac61b2c346e6e9f22607e31@git.kernel.org>
Date: Wed, 3 Jun 2009 18:24:35 GMT
From: tip-bot for Ingo Molnar <mingo@...e.hu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, acme@...hat.com, paulus@...ba.org,
hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl,
efault@....de, mtosatti@...hat.com, tglx@...utronix.de,
cjashfor@...ux.vnet.ibm.com, mingo@...e.hu
Subject: [tip:perfcounters/core] perf_counter tools: Clean up old kerneltop references
Commit-ID: f2521b6e4c365bd0aac61b2c346e6e9f22607e31
Gitweb: http://git.kernel.org/tip/f2521b6e4c365bd0aac61b2c346e6e9f22607e31
Author: Ingo Molnar <mingo@...e.hu>
AuthorDate: Wed, 3 Jun 2009 19:17:25 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 3 Jun 2009 19:17:25 +0200
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@...llo.nl>
Cc: Mike Galbraith <efault@....de>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
Documentation/perf_counter/builtin-record.c | 6 +++---
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 cea5b8d..fa62525 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)
if (fd[nr_cpu][counter] < 0) {
int err = errno;
- printf("kerneltop error: syscall returned with %d (%s)\n",
+
+ error("syscall returned with %d (%s)\n",
fd[nr_cpu][counter], strerror(err));
if (err == EPERM)
printf("Are you root?\n");
@@ -382,8 +383,7 @@ static void open_counters(int cpu, pid_t pid)
mmap_array[nr_cpu][counter].base = mmap(NULL, (mmap_pages+1)*page_size,
PROT_READ, MAP_SHARED, fd[nr_cpu][counter], 0);
if (mmap_array[nr_cpu][counter].base == MAP_FAILED) {
- printf("kerneltop error: failed to mmap with %d (%s)\n",
- errno, strerror(errno));
+ error("failed to mmap with %d (%s)\n", errno, strerror(errno));
exit(-1);
}
}
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index a639352..16a6184 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));
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists