linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [PATCH 6/9] perf record: Support synthesizing cgroup events
Date: Thu, 2 Apr 2020 08:22:58 +0900	[thread overview]
Message-ID: <CAM9d7cgtEXGZL+GZeLy1RmoU=jB4BfLApbsV9F=iDx6cqMh_5A@mail.gmail.com> (raw)
In-Reply-To: <20200330164312.GD4576@kernel.org>

Hi Arnaldo,

On Tue, Mar 31, 2020 at 1:43 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Em Mon, Mar 30, 2020 at 01:30:58PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Wed, Mar 25, 2020 at 09:45:33PM +0900, Namhyung Kim escreveu:
> > > Synthesize cgroup events by iterating cgroup filesystem directories.
> > > The cgroup event only saves the portion of cgroup path after the mount
> > > point and the cgroup id (which actually is a file handle).
> >
> > Breaks the build on alpine linux (musl libc):
> >
> >   CC       /tmp/build/perf/util/srccode.o
> >   CC       /tmp/build/perf/util/synthetic-events.o
> > util/synthetic-events.c: In function 'perf_event__synthesize_cgroup':
> > util/synthetic-events.c:427:22: error: field 'fh' has incomplete type
> >    struct file_handle fh;
> >                       ^
> > util/synthetic-events.c:441:6: error: implicit declaration of function 'name_to_handle_at' [-Werror=implicit-function-declaration]
> >   if (name_to_handle_at(AT_FDCWD, path, &handle.fh, &mount_id, 0) < 0) {
> >       ^
> > util/synthetic-events.c:441:2: error: nested extern declaration of 'name_to_handle_at' [-Werror=nested-externs]
> >   if (name_to_handle_at(AT_FDCWD, path, &handle.fh, &mount_id, 0) < 0) {
> >   ^
> >   CC       /tmp/build/perf/util/data.o
> > cc1: all warnings being treated as errors
> > mv: can't rename '/tmp/build/perf/util/.synthetic-events.o.tmp': No such file or directory
> >
> >
> > I'm trying to fix
>
> musl libc up to 1.2.21 (IIRC) lacks name_to_handle_at and its structs,
> then from the one that is in alpine linux 3.10 the error changes to:
>
>   CC       /tmp/build/perf/util/cloexec.o
> util/synthetic-events.c:427:22: error: field 'fh' with variable sized type 'struct file_handle' not at the end of a struct or class is a GNU
>       extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
>                 struct file_handle fh;
>                                    ^
> 1 error generated.
> mv: can't rename '/tmp/build/perf/util/.synthetic-events.o.tmp': No such file or directory
> make[4]: *** [/git/linux/tools/build/Makefile.build:97: /tmp/build/perf/util/synthetic-events.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [/git/linux/tools/build/Makefile.build:139: util] Error 2
> make[2]: *** [Makefile.perf:617: /tmp/build/perf/perf-in.o] Error 2
> make[1]: *** [Makefile.perf:225: sub-make] Error 2
> make: *** [Makefile:70: all] Error 2
> make: Leaving directory '/git/linux/tools/perf'
> + exit 1
> [root@quaco ~]#
>
> So probably we'll need a feature test to catch this and do some
> workaround or disable the feature on such systems, providing some
> warning.
>
> I left the container build tests running to see if some other system has
> problems with this, perhaps the ones with uCLibc or some older glibc,
> we'll see.
>
> So far all the alpine versions failed with the above problems and ALT
> Linux p8 and p9 built without problems.

Hmm.. right, the CONFIG_FHANDLE can be turned off or old systems
lack support.  I'll send a patch for the feature test soon.

Thanks
Namhyung

  parent reply	other threads:[~2020-04-01 23:23 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 12:45 [PATCHSET 0/9] perf: Improve cgroup profiling (v6) Namhyung Kim
2020-03-25 12:45 ` [PATCH 1/9] perf/core: Add PERF_RECORD_CGROUP event Namhyung Kim
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 2/9] perf/core: Add PERF_SAMPLE_CGROUP feature Namhyung Kim
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 3/9] perf tools: Basic support for CGROUP event Namhyung Kim
2020-03-27 14:06   ` Arnaldo Carvalho de Melo
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 4/9] perf tools: Maintain cgroup hierarchy Namhyung Kim
2020-04-03 12:36   ` Arnaldo Carvalho de Melo
2020-04-04  1:29     ` Namhyung Kim
2020-04-04  8:41     ` [tip: perf/urgent] perf python: Include rwsem.c in the pythong biding tip-bot2 for Arnaldo Carvalho de Melo
2020-04-04  8:41   ` [tip: perf/urgent] perf cgroup: Maintain cgroup hierarchy tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 5/9] perf report: Add 'cgroup' sort key Namhyung Kim
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 6/9] perf record: Support synthesizing cgroup events Namhyung Kim
2020-03-30 16:30   ` Arnaldo Carvalho de Melo
2020-03-30 16:43     ` Arnaldo Carvalho de Melo
2020-03-31 16:04       ` Arnaldo Carvalho de Melo
2020-04-01 23:22       ` Namhyung Kim [this message]
2020-04-02  1:52         ` [PATCH] perf tools: Add file-handle feature test Namhyung Kim
2020-04-02 15:37           ` Arnaldo Carvalho de Melo
2020-04-02 15:46             ` Arnaldo Carvalho de Melo
2020-04-02 18:37             ` Arnaldo Carvalho de Melo
2020-04-04  8:41           ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-04-04  8:41   ` [tip: perf/urgent] perf record: Support synthesizing cgroup events tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 7/9] perf record: Add --all-cgroups option Namhyung Kim
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 8/9] perf top: " Namhyung Kim
2020-03-27 16:35   ` Arnaldo Carvalho de Melo
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 12:45 ` [PATCH 9/9] perf script: Add --show-cgroup-events option Namhyung Kim
2020-03-27 16:39   ` Arnaldo Carvalho de Melo
2020-04-04  8:41   ` [tip: perf/urgent] " tip-bot2 for Namhyung Kim
2020-03-25 13:05 ` [PATCHSET 0/9] perf: Improve cgroup profiling (v6) Arnaldo Carvalho de Melo
2020-03-25 13:19   ` Namhyung Kim
  -- strict thread matches above, loose matches on Subject: below --
2020-01-07 13:34 [PATCHSET 0/9] perf: Improve cgroup profiling (v4) Namhyung Kim
2020-01-07 13:34 ` [PATCH 6/9] perf record: Support synthesizing cgroup events Namhyung Kim
2020-01-08 22:08   ` Jiri Olsa
2020-01-09  5:19     ` Namhyung Kim
2020-01-08 22:18   ` Jiri Olsa
2020-01-09  7:50     ` Namhyung Kim
2020-01-08 22:21   ` Jiri Olsa
2020-01-09  7:51     ` Namhyung Kim
2019-12-23  6:07 [PATCHSET 0/9] perf: Improve cgroup profiling (v3) Namhyung Kim
2019-12-23  6:07 ` [PATCH 6/9] perf record: Support synthesizing cgroup events Namhyung Kim
2019-12-20  4:32 [PATCHSET 0/9] perf: Improve cgroup profiling (v2) Namhyung Kim
2019-12-20  4:32 ` [PATCH 6/9] perf record: Support synthesizing cgroup events Namhyung Kim
2019-08-28  7:31 [PATCHSET 0/9] perf: Improve cgroup profiling (v1) Namhyung Kim
2019-08-28  7:31 ` [PATCH 6/9] perf record: Support synthesizing cgroup events Namhyung Kim

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='CAM9d7cgtEXGZL+GZeLy1RmoU=jB4BfLApbsV9F=iDx6cqMh_5A@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).