Return-Path: Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 341961A0271 for ; Wed, 10 Dec 2014 21:03:44 +1100 (AEDT) Message-ID: <1418205823.9279.8.camel@ellerman.id.au> Subject: Re: [RFC PATCH 5/8] perf probe powerpc: Allow matching against dot symbols From: Michael Ellerman To: "Naveen N. Rao" Date: Wed, 10 Dec 2014 21:03:43 +1100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, acme@kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2014-12-09 at 23:04 +0530, Naveen N. Rao wrote: > Allow perf probe to work on powerpc ABIv1 without the need to specify the > leading dot '.' for functions. 'perf probe do_fork' works with this patch. > > Signed-off-by: Naveen N. Rao > --- > tools/perf/util/probe-event.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c > index d465f7c..174c22e 100644 > --- a/tools/perf/util/probe-event.c > +++ b/tools/perf/util/probe-event.c > @@ -2221,6 +2221,15 @@ static int probe_function_filter(struct map *map __maybe_unused, > num_matched_functions++; > return 0; > } > +#ifdef __powerpc64__ > + /* Allow matching against the dot variant */ > + if (sym->name[0] == '.' && looking_function_name[0] != '.' && > + (sym->binding == STB_GLOBAL || sym->binding == STB_LOCAL) && > + strcmp(looking_function_name, sym->name+1) == 0) { > + num_matched_functions++; > + return 0; > + } > +#endif As for the previous patch, I think this should be in an arch helper. cheers