From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung.kim@lge.com>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 14/17] perf header: Set tracepoint event name only if not set
Date: Wed, 5 Sep 2012 20:08:54 -0300 [thread overview]
Message-ID: <1346886537-11621-15-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1346886537-11621-1-git-send-email-acme@infradead.org>
From: Namhyung Kim <namhyung.kim@lge.com>
The event name can be set already by processing a event_desc data.
So check it before setting to prevent possible leak.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1346821373-31621-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
| 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--git a/tools/perf/util/header.c b/tools/perf/util/header.c
index a124b93..05c9310 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -2314,7 +2314,7 @@ static int perf_evlist__set_tracepoint_names(struct perf_evlist *evlist,
struct perf_evsel *pos;
list_for_each_entry(pos, &evlist->entries, node) {
- if (pos->attr.type == PERF_TYPE_TRACEPOINT &&
+ if (pos->attr.type == PERF_TYPE_TRACEPOINT && !pos->name &&
perf_evsel__set_tracepoint_name(pos, pevent))
return -1;
}
--
1.7.1
next prev parent reply other threads:[~2012-09-05 23:09 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 23:08 [GIT PULL 00/17] perf/core improvements and fixes Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 01/17] tools lib traceevent: Modify header to work in C++ programs Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 02/17] perf session: flush_sample_queue needs to handle errors from handlers Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 03/17] perf tool: handle errors in synthesized event functions Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 04/17] perf lock: Remove use of die and handle errors Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 05/17] perf stat: Remove use of die/exit " Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 06/17] perf help: Remove use of die " Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 07/17] perf script: Remove use of die/exit Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 08/17] perf record: " Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 09/17] perf tools: Fix x86 builds with ARCH specified on the command line Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 10/17] perf tools: Fix intlist node removal Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 11/17] perf tools: Remove the node from rblist in strlist__remove Arnaldo Carvalho de Melo
2012-09-05 23:32 ` David Ahern
2012-09-05 23:08 ` [PATCH 12/17] perf tools: remove unneeded include of network header files Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 13/17] perf header: Use evlist->nr_entries on write_event_desc() Arnaldo Carvalho de Melo
2012-09-05 23:08 ` Arnaldo Carvalho de Melo [this message]
2012-09-06 0:01 ` [PATCH 14/17] perf header: Set tracepoint event name only if not set David Ahern
2012-09-06 1:30 ` Namhyung Kim
2012-09-05 23:08 ` [PATCH 15/17] perf header: Swap pmu mapping numbers if needed Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 16/17] perf tools: Replace mempcpy with memcpy Arnaldo Carvalho de Melo
2012-09-05 23:08 ` [PATCH 17/17] perf tools: Allow user to indicate path to objdump in command line Arnaldo Carvalho de Melo
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=1346886537-11621-15-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).