Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1191202

Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative symbol resolver

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative symbol resolver
Date 2015-07-23 20:20 +0200
Message-ID <pPtg6-65U-23@gated-at.bofh.it> (permalink)
References <pPqie-1Qn-9@gated-at.bofh.it> <pPrxF-3z2-17@gated-at.bofh.it> <pPstI-4VP-13@gated-at.bofh.it> <pPtg5-65U-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 23 Jul 2015 14:10:39 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 23 Jul 2015 14:25:54 -0300
> Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> > index cc25f059ab3d..2750e7e7efff 100644
> > --- a/tools/lib/traceevent/event-parse.c
> > +++ b/tools/lib/traceevent/event-parse.c
> > @@ -418,7 +418,7 @@ static int func_map_init(struct pevent *pevent)
> >  }
> >  
> >  static struct func_map *
> > -find_func(struct pevent *pevent, unsigned long long addr)
> > +__find_func(struct pevent *pevent, unsigned long long addr)
> >  {
> >  	struct func_map *func;
> >  	struct func_map key;
> > @@ -434,6 +434,51 @@ find_func(struct pevent *pevent, unsigned long long addr)
> >  	return func;
> >  }
> >  
> > +static struct {
> > +	pevent_function_resolver_t *function;
> > +	void 			   *priv;
> > +} function_resolver;
> > +
> > +/**
> > + * pevent_set_function_resolver - set an alternative function resolver
> > + * @resolver - function to be used
> > + * @priv - resolver function private state.
> > + *
> > + * Some tools may have already a way to resolve kernel functions, allow them
> > + * to keep using it instead of duplicating all the entries inside pevent->funclist.
> > + */
> > +void pevent_set_function_resolver(pevent_function_resolver_t *resolver, void *priv)
> > +{
> > +	function_resolver.function = resolver;
> > +	function_resolver.priv	  = priv;
> 
> What about passing in pevent, and making the allocation here?

In fact, we could remove the global function_resolver, and allocate
that here too.

-- Steve

> 
> -- Steve
> 
> > +}
> > +
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-23 19:30 +0200
  Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Steven Rostedt <rostedt@goodmis.org> - 2015-07-23 20:20 +0200
    Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-23 20:20 +0200
    Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Steven Rostedt <rostedt@goodmis.org> - 2015-07-23 20:20 +0200
      Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-23 23:30 +0200
        Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Steven Rostedt <rostedt@goodmis.org> - 2015-07-23 23:40 +0200
          Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-24 00:00 +0200
            Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-24 00:00 +0200
              Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Steven Rostedt <rostedt@goodmis.org> - 2015-07-24 00:10 +0200
                Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-24 03:40 +0200
                Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative  symbol resolver Steven Rostedt <rostedt@goodmis.org> - 2015-07-24 03:50 +0200

csiph-web