[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191019174241.GB12782@krava>
Date: Sat, 19 Oct 2019 19:42:41 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Jiri Olsa <jolsa@...nel.org>, lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Michael Petlan <mpetlan@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
Stephane Eranian <eranian@...gle.com>,
Jin Yao <yao.jin@...ux.intel.com>,
Alexey Budankov <alexey.budankov@...ux.intel.com>
Subject: Re: [PATCH 07/10] libperf: Add tests_mmap_cpus test
On Fri, Oct 18, 2019 at 03:16:31PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Oct 18, 2019 at 03:14:29PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Oct 17, 2019 at 12:59:15PM +0200, Jiri Olsa escreveu:
> > > Adding mmaping tests that generates prctl call on
> > > every cpu validates it gets all the related events
> > > in ring buffer.
> >
> > So _here_ we need _GNU_SOURCE, for this specific test:
>
> Added, to this test:
>
> [acme@...co perf]$ git diff
> diff --git a/tools/perf/lib/tests/test-evlist.c b/tools/perf/lib/tests/test-evlist.c
> index d8c52ebfa53a..741bc1bb4524 100644
> --- a/tools/perf/lib/tests/test-evlist.c
> +++ b/tools/perf/lib/tests/test-evlist.c
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> -#include <stdio.h>
> +#define _GNU_SOURCE // needed for sched.h to get sched_[gs]etaffinity and CPU_(ZERO,SET)
> #include <sched.h>
> +#include <stdio.h>
> #include <stdarg.h>
> #include <unistd.h>
> #include <stdlib.h>
> [acme@...co perf]$
>
> We can go the big hammer way if this is more generally needed, but first
> lets try to use it only when needed, ok?
ok, thanks
FYI so it's quite easy now to separate the lib and move it under
tools/lib/perf.. I'll post it together with docs/tutorial update
jirka
Powered by blists - more mailing lists