[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f0994cd1-ac91-078b-f5f9-6a3dee79cf17@gmail.com>
Date: Fri, 31 Mar 2017 08:19:15 -0600
From: David Ahern <dsahern@...il.com>
To: pc@...ibm.com, LKML <linux-kernel@...r.kernel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>,
linux-perf-users <linux-perf-users@...r.kernel.org>
Subject: Re: [PATCH v2] Allow user probes on versioned symbols
On 3/30/17 11:00 AM, Paul Clarke wrote:
> diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
> index 4f9a71c..90342ee 100644
> --- a/tools/perf/util/map.c
> +++ b/tools/perf/util/map.c
> @@ -330,6 +330,27 @@ int __weak arch__compare_symbol_names(const char
> *namea, const char *nameb)
> return strcmp(namea, nameb);
> }
>
> +int map__compare_symbol_names(const char *namea, const char *nameb)
> +{
> + int rc;
> + const char *namea_versioning, *nameb_versioning;
> +
> + namea_versioning = strstr(namea,"@@");
> + if (namea_versioning)
> + namea = strndup(namea,namea_versioning-namea);
> +
> + nameb_versioning = strstr(nameb,"@@");
> + if (nameb_versioning)
> + nameb = strndup(nameb,nameb_versioning-nameb);
> +
> + rc = arch__compare_symbol_names(namea, nameb);
> +
> + if (namea_versioning) free((void *)namea);
> + if (nameb_versioning) free((void *)nameb);
free() should be on the next line. Otherwise LGTM
Reviewed-by: David Ahern <dsahern@...il.com>
Powered by blists - more mailing lists