Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614057
| From | David Ahern <dsahern@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] Allow user probes on versioned symbols |
| Date | 2017-03-31 16:20 +0200 |
| Message-ID | <tr5zc-5Hc-7@gated-at.bofh.it> (permalink) |
| References | <tqLK9-16I-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@gmail.com>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] Allow user probes on versioned symbols Paul Clarke <pc@us.ibm.com> - 2017-03-30 19:10 +0200 Re: [PATCH v2] Allow user probes on versioned symbols Masami Hiramatsu <mhiramat@kernel.org> - 2017-03-31 01:40 +0200 Re: [PATCH v2] Allow user probes on versioned symbols David Ahern <dsahern@gmail.com> - 2017-03-31 16:20 +0200
csiph-web