Re: [PATCH] perf tools: Add file-handle feature test

From: Arnaldo Carvalho de Melo
Date: Thu Apr 02 2020 - 11:46:56 EST


Em Thu, Apr 02, 2020 at 12:37:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Apr 02, 2020 at 10:52:49AM +0900, Namhyung Kim escreveu:
> > The file handle (FHANDLE) support is configurable so some systems might
> > not have it. So add a config feature item to check it on build time
> > and reject cgroup tracking based on that.
>
> Ok, I'll break this patch in two, add the feature test first, then fold
> the usage of HAVE_FILE_HANDLE with the patch that uses it, so that we
> keep the codebase bisectable,
>
> Thanks!

Also had to do this here and in the other similar places:

diff --git a/tools/perf/util/synthetic-events.c b/tools/perf/util/synthetic-events.c
index f96e84956d84..a661b122d9d8 100644
--- a/tools/perf/util/synthetic-events.c
+++ b/tools/perf/util/synthetic-events.c
@@ -528,9 +528,9 @@ int perf_event__synthesize_cgroups(struct perf_tool *tool,
return 0;
}
#else
-int perf_event__synthesize_cgroups(struct perf_tool *tool,
- perf_event__handler_t process,
- struct machine *machine)
+int perf_event__synthesize_cgroups(struct perf_tool *tool __maybe_unused,
+ perf_event__handler_t process __maybe_unused,
+ struct machine *machine __maybe_unused)
{
return -1;
}