From: David Ahern <dsahern@gmail.com>
To: pc@us.ibm.com, LKML <linux-kernel@vger.kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH v2] Allow user probes on versioned symbols
Date: Fri, 31 Mar 2017 08:19:15 -0600 [thread overview]
Message-ID: <f0994cd1-ac91-078b-f5f9-6a3dee79cf17@gmail.com> (raw)
In-Reply-To: <7938e6cb-ed96-5d47-f0ae-02490eaebfe5@us.ibm.com>
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>
prev parent reply other threads:[~2017-03-31 14:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 17:00 Paul Clarke
2017-03-30 23:33 ` Masami Hiramatsu
2017-03-31 14:19 ` David Ahern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f0994cd1-ac91-078b-f5f9-6a3dee79cf17@gmail.com \
--to=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=pc@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®