From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754205AbbGWWHf (ORCPT ); Thu, 23 Jul 2015 18:07:35 -0400 Received: from smtprelay0177.hostedemail.com ([216.40.44.177]:35727 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753777AbbGWWHc (ORCPT ); Thu, 23 Jul 2015 18:07:32 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:334:355:368:369:379:541:599:800:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3167:3354:3622:3865:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:5007:6119:6120:6261:7514:7875:9025:10004:10400:10450:10455:10848:10967:11026:11232:11257:11658:11914:12043:12438:12517:12519:12555:12663:12740:13255:14096:14097:14106:19904:19999:21080:21094,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: wing07_248581cbe5b00 X-Filterd-Recvd-Size: 3982 Date: Thu, 23 Jul 2015 18:07:30 -0400 From: Steven Rostedt To: Arnaldo Carvalho de Melo Cc: David Ahern , Adrian Hunter , Borislav Petkov , Frederic Weisbecker , Jiri Olsa , Namhyung Kim , Stephane Eranian , Ingo Molnar , Linux Kernel Mailing List Subject: Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative symbol resolver Message-ID: <20150723180730.6eecdce8@gandalf.local.home> In-Reply-To: <20150723215836.GG3154@kernel.org> References: <20150723150433.GA3154@kernel.org> <20150723122130.716df9fe@gandalf.local.home> <20150723172554.GC3154@kernel.org> <20150723141039.1bd48bf2@gandalf.local.home> <20150723141133.4065321e@gandalf.local.home> <20150723212536.GE3154@kernel.org> <20150723173524.057a5969@gandalf.local.home> <20150723215246.GF3154@kernel.org> <20150723215836.GG3154@kernel.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Jul 2015 18:58:36 -0300 Arnaldo Carvalho de Melo wrote: > Em Thu, Jul 23, 2015 at 06:52:46PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Thu, Jul 23, 2015 at 05:35:24PM -0400, Steven Rostedt escreveu: > > > On Thu, 23 Jul 2015 18:25:36 -0300 > > > Arnaldo Carvalho de Melo wrote: > > > > + if (resolver == NULL) { > > > > + errno = ENOMEM; > > > > > > Why set errno, wont a failed malloc set it for us? > > > > Humm, I thought about that, I've read malloc's man page and it doesn't > > mention that... in the return section, but later, in NOTES, it says > > UNIX98 requires that and glibc does it, so I'm ditching this... > > > > Also I wonder if we should add a way to clear the resolver. That is, > > > you want to use the default resolver? > > > > I am adding a reset_function_resolver(pevent); > > > > > Not really a necessity, as I don't see any current programs using it, > > > but it would complete the interface. > > One more try: Third time's a charm, or was this the forth? Reviewed-by: Steven Rostedt -- Steve > > commit 212a2417baaa89168cbe3112fe7c8efaddee28b8 > Author: Arnaldo Carvalho de Melo > Date: Wed Jul 22 12:36:55 2015 -0300 > > tools lib traceevent: Allow setting an alternative symbol resolver > > The perf tools have a symbol resolver that includes solving kernel > symbols using either kallsyms or ELF symtabs, and it also is using > libtraceevent to format the trace events fields, including via > subsystem specific plugins, like the "timer" one. > > To solve fields like "timer:hrtimer_start"'s "function", libtraceevent > needs a way to map from its value to a function name and addr. > > This patch provides a way for tools that already have symbol resolving > facilities to ask libtraceevent to use it when needing to resolve > kernel symbols. > > Acked-by: David Ahern > Cc: Adrian Hunter > Cc: Borislav Petkov > Cc: Frederic Weisbecker > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Stephane Eranian > Cc: Steven Rostedt > Link: http://lkml.kernel.org/n/tip-fdx1fazols17w5py26ia3bwh@git.kernel.org > Signed-off-by: Arnaldo Carvalho de Melo >