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