From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Krister Johansen <kjlx@templeofstupid.com>,
lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH] perf tools: Restore proper cwd on return from mnt ns
Date: Tue, 20 Nov 2018 18:42:13 +0100 [thread overview]
Message-ID: <20181120174213.GA18656@krava> (raw)
In-Reply-To: <20181120155604.GA6248@kernel.org>
On Tue, Nov 20, 2018 at 12:56:04PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Nov 20, 2018 at 11:56:18AM +0100, Jiri Olsa escreveu:
> > On Mon, Nov 19, 2018 at 08:10:06AM -0800, Arnaldo Carvalho de Melo wrote:
> > > Em Thu, Nov 01, 2018 at 06:00:01PM +0100, Jiri Olsa escreveu:
> > > > Adding the current working directory to be part of the cookie
> > > > and restoring it in the nsinfo__mountns_exit call.
> > >
> > > > diff --git a/tools/perf/util/namespaces.c b/tools/perf/util/namespaces.c
> > > > index cf8bd123cf73..fb0458b7e6aa 100644
> > > > --- a/tools/perf/util/namespaces.c
> > > > +++ b/tools/perf/util/namespaces.c
> > >
> > > > @@ -199,9 +201,13 @@ void nsinfo__mountns_enter(struct nsinfo *nsi,
> > > > if (snprintf(curpath, PATH_MAX, "/proc/self/ns/mnt") >= PATH_MAX)
> > > > return;
> > >
> > > > + oldcwd = get_current_dir_name();
> > >
> > > Breaks the build with bionic (Android), where get_current_dir_name() is
> > > not available:
> > >
> > > /tmp/build/perf/libperf.a(libperf-in.o):hist.c:function nsinfo__mountns_enter: error: undefined reference to 'get_current_dir_name'
> > > collect2: error: ld returned 1 exit status
> > > Makefile.perf:534: recipe for target '/tmp/build/perf/perf' failed
> > > make[2]: *** [/tmp/build/perf/perf] Error 1
> > > Makefile.perf:206: recipe for target 'sub-make' failed
> > > make[1]: *** [sub-make] Error 2
> > > Makefile:69: recipe for target 'all' failed
> > > make: *** [all] Error 2
> > > make: Leaving directory '/git/linux/tools/perf'
> > > [root@seventh ~]#
> > >
> > > The container builds are ongoing, its possoble that this becomes an
> > > issue in uCLibc, wasn't on musl libc (Alpine Linux).
> >
> > will check, thanks
>
> I fixed this already, by adding a test for that get_current_dir_name()
> function and a simple implementation based on strdup(getcwd(bf)), take a
> look at my perf/urgent branch
ok, I saw it.. but it seems little too much for a single function to me
jirka
next prev parent reply other threads:[~2018-11-20 17:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-01 17:00 Jiri Olsa
2018-11-16 13:03 ` Jiri Olsa
2018-11-16 18:31 ` Arnaldo Carvalho de Melo
2018-11-16 18:42 ` Arnaldo Carvalho de Melo
2018-11-17 9:00 ` Jiri Olsa
2018-11-19 16:10 ` Arnaldo Carvalho de Melo
2018-11-20 10:56 ` Jiri Olsa
2018-11-20 11:23 ` [PATCHv2] " Jiri Olsa
2018-11-20 15:56 ` [PATCH] " Arnaldo Carvalho de Melo
2018-11-20 17:42 ` Jiri Olsa [this message]
2018-11-21 15:02 ` [tip:perf/urgent] perf tools: Restore proper cwd on return from mnt namespace tip-bot for Jiri Olsa
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=20181120174213.GA18656@krava \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kjlx@templeofstupid.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--subject='Re: [PATCH] perf tools: Restore proper cwd on return from mnt ns' \
/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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.