From: tip-bot for Liming Wang <liming.wang@windriver.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
mingo@redhat.com, peterz@infradead.org, fweisbec@gmail.com,
tglx@linutronix.de, liming.wang@windriver.com,
mhiramat@redhat.com, mingo@elte.hu
Subject: [tip:perf/core] perf tools: Unify event type description
Date: Wed, 30 Dec 2009 12:22:51 GMT [thread overview]
Message-ID: <tip-41bdcb23dab22bf27361c5f2d89fe895d8904915@git.kernel.org> (raw)
In-Reply-To: <1262075829-16257-1-git-send-email-liming.wang@windriver.com>
Commit-ID: 41bdcb23dab22bf27361c5f2d89fe895d8904915
Gitweb: http://git.kernel.org/tip/41bdcb23dab22bf27361c5f2d89fe895d8904915
Author: Liming Wang <liming.wang@windriver.com>
AuthorDate: Tue, 29 Dec 2009 16:37:07 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 30 Dec 2009 11:58:53 +0100
perf tools: Unify event type description
make event type description to a unified array and
the array index consistent to perf_type_id.
Signed-off-by: Liming Wang <liming.wang@windriver.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1262075829-16257-1-git-send-email-liming.wang@windriver.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/parse-events.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index e5bc0fb..dc585a8 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -835,11 +835,12 @@ int parse_filter(const struct option *opt __used, const char *str,
}
static const char * const event_type_descriptors[] = {
- "",
"Hardware event",
"Software event",
"Tracepoint event",
"Hardware cache event",
+ "Raw hardware event descriptor",
+ "Hardware breakpoint",
};
/*
@@ -872,7 +873,7 @@ static void print_tracepoint_events(void)
snprintf(evt_path, MAXPATHLEN, "%s:%s",
sys_dirent.d_name, evt_dirent.d_name);
printf(" %-42s [%s]\n", evt_path,
- event_type_descriptors[PERF_TYPE_TRACEPOINT+1]);
+ event_type_descriptors[PERF_TYPE_TRACEPOINT]);
}
closedir(evt_dir);
}
@@ -892,9 +893,7 @@ void print_events(void)
printf("List of pre-defined events (to be used in -e):\n");
for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
- type = syms->type + 1;
- if (type >= ARRAY_SIZE(event_type_descriptors))
- type = 0;
+ type = syms->type;
if (type != prev_type)
printf("\n");
@@ -919,17 +918,19 @@ void print_events(void)
for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
printf(" %-42s [%s]\n",
event_cache_name(type, op, i),
- event_type_descriptors[4]);
+ event_type_descriptors[PERF_TYPE_HW_CACHE]);
}
}
}
printf("\n");
- printf(" %-42s [raw hardware event descriptor]\n",
- "rNNN");
+ printf(" %-42s [%s]\n",
+ "rNNN", event_type_descriptors[PERF_TYPE_RAW]);
printf("\n");
- printf(" %-42s [hardware breakpoint]\n", "mem:<addr>[:access]");
+ printf(" %-42s [%s]\n",
+ "mem:<addr>[:access]",
+ event_type_descriptors[PERF_TYPE_BREAKPOINT]);
printf("\n");
print_tracepoint_events();
prev parent reply other threads:[~2009-12-30 12:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-29 8:37 [PATCH 1/3] perf tools: unify event type description Liming Wang
2009-12-29 8:37 ` [PATCH 2/3] perf tools: remove pid option from stat Liming Wang
2009-12-29 8:37 ` [PATCH 3/3] perf probe: change CONFIG_KPROBE_TRACER to CONFIG_KPROBE_EVENT Liming Wang
2009-12-30 2:32 ` Masami Hiramatsu
2009-12-30 12:23 ` [tip:perf/core] perf probe: Change " tip-bot for Liming Wang
2009-12-29 12:04 ` [PATCH 2/3] perf tools: remove pid option from stat Peter Zijlstra
2009-12-30 9:23 ` Ingo Molnar
2009-12-30 9:29 ` Wang Liming
2009-12-31 8:05 ` [PATCH 1/1] perf tools: fix pid option for stat Liming Wang
2010-01-13 10:31 ` [tip:perf/core] perf tools: Fix --pid " tip-bot for Liming Wang
2009-12-30 12:22 ` tip-bot for Liming Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-41bdcb23dab22bf27361c5f2d89fe895d8904915@git.kernel.org \
--to=liming.wang@windriver.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox