[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190227132147.GH18893@krava>
Date: Wed, 27 Feb 2019 14:21:47 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Song Liu <songliubraving@...com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
ast@...nel.org, daniel@...earbox.net, kernel-team@...com,
peterz@...radead.org, acme@...hat.com, jolsa@...nel.org,
namhyung@...nel.org
Subject: Re: [PATCH v4 perf,bpf 12/15] perf, bpf: enable annotation of bpf
program
On Mon, Feb 25, 2019 at 04:20:16PM -0800, Song Liu wrote:
SNIP
> diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
> index 093352e93d50..0bc9ec69f38a 100644
> --- a/tools/perf/util/util.c
> +++ b/tools/perf/util/util.c
> @@ -506,3 +506,13 @@ const char *perf_tip(const char *dirpath)
>
> return tip;
> }
> +
> +void get_exec_path(char *tpath, size_t size)
> +{
> + const char *path = "/proc/self/exe";
> + ssize_t len;
> +
> + len = readlink(path, tpath, size - 1);
> + assert(len > 0);
> + tpath[len] = 0;
> +}
we have now helper for that, please rebase this on top of
arnaldo's perf/core:
94816add0005 perf tools: Add perf_exe() helper to find perf binary
jirka
Powered by blists - more mailing lists