[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150723122130.716df9fe@gandalf.local.home>
Date: Thu, 23 Jul 2015 12:21:30 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: David Ahern <dsahern@...il.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Borislav Petkov <bp@...e.de>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
Ingo Molnar <mingo@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
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@...nel.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 ↦
> +}
> +
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists