From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754402Ab3EPCN6 (ORCPT ); Wed, 15 May 2013 22:13:58 -0400 Received: from LGEMRELSE7Q.lge.com ([156.147.1.151]:55156 "EHLO LGEMRELSE7Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875Ab3EPCNz (ORCPT ); Wed, 15 May 2013 22:13:55 -0400 X-AuditID: 9c930197-b7b76ae000003523-42-519440e1e18a From: Namhyung Kim To: Jiri Olsa Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Steven Rostedt , Frederic Weisbecker , David Ahern , Stephane Eranian Subject: Re: [PATCH 02/15] perf util: Use evsel->name to get tracepoint_paths References: <1368526439-31966-1-git-send-email-namhyung@kernel.org> <1368526439-31966-3-git-send-email-namhyung@kernel.org> <20130515145910.GA2194@krava.brq.redhat.com> Date: Thu, 16 May 2013 11:13:53 +0900 In-Reply-To: <20130515145910.GA2194@krava.brq.redhat.com> (Jiri Olsa's message of "Wed, 15 May 2013 16:59:10 +0200") Message-ID: <87obcb4qou.fsf@sejong.aot.lge.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On Wed, 15 May 2013 16:59:10 +0200, Jiri Olsa wrote: > On Tue, May 14, 2013 at 07:13:46PM +0900, Namhyung Kim wrote: >> diff --git a/tools/perf/util/trace-event-info.c b/tools/perf/util/trace-event-info.c >> index ab18bf12d54a..bfcaeac7ef9d 100644 >> --- a/tools/perf/util/trace-event-info.c >> +++ b/tools/perf/util/trace-event-info.c >> @@ -414,12 +414,23 @@ get_tracepoints_path(struct list_head *pattrs) >> if (pos->attr.type != PERF_TYPE_TRACEPOINT) >> continue; >> ++nr_tracepoints; >> + >> + if (pos->name) { >> + ppath->next = tracepoint_name_to_path(pos->name); > > yep, looks like big time saver ;) > >> + if (!ppath->next) >> + goto error; > > hum, the tracepoint_name_to_path fails also because of the > malformed tracepoint name.. then the error message is > misleading.. but not quite sure this could happen AFAIK it's called on the record path so every event is generated by perf_evsel__newtp() and has a proper name. But there's a way to specify events using numeric form.. :( So yes, I think it's better to consider such a exceptional case. Thanks, Namhyung