Messages in this thread |  | | Date | Thu, 23 Jul 2015 12:21:30 -0400 | | From | Steven Rostedt <> | | Subject | Re: [RFC PATCH] tools lib traceevent: Allow setting an alternative symbol resolver |
| |
On Thu, 23 Jul 2015 12:04:33 -0300 Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > +static struct func_map * > +find_func(struct pevent *pevent, unsigned long long addr) > +{ > + static struct func_map map;
I know there's other cases of static variables in functions, but I plan on cleaning that up in the future.
Can you make that map belong to the pevent itself? In case there's two pevent's going parallel, I don't want one to overwrite the other. The pevent code is not re-entrant, but I would like to make it so for different pevents.
-- Steve
> + > + if (!function_resolver.function) > + return __find_func(pevent, addr); > + > + map.mod = NULL; > + map.addr = addr; > + map.func = function_resolver.function(function_resolver.priv, &map.addr, &map.mod); > + if (map.func == NULL) > + return NULL; > + > + return ↦ > +} > +
|  |