lkml.org 
[lkml]   [2019]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-02-27 14:22    [W:0.176 / U:6.216 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site