perf tests: Add missing headers so far obtained indirectly [Linux 5.1]

perf tests: Add missing headers so far obtained indirectly [Linux 5.1]

This Linux kernel change "perf tests: Add missing headers so far obtained indirectly" is included in the Linux 5.1 release. This change is authored by Arnaldo Carvalho de Melo <acme [at] redhat.com> on Sun Jan 27 14:08:22 2019 +0100. The commit for this change in Linux stable tree is 2f2ae23 (patch).

perf tests: Add missing headers so far obtained indirectly

We're going to remove symbol.h from some places and this breaks
some of the perf tests, fix it by adding the required includes.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-wpa4b6x0btpnh2kjxzl9no4w@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 tools/perf/tests/sample-parsing.c | 2 ++
 tools/perf/tests/sdt.c            | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tools/perf/tests/sample-parsing.c b/tools/perf/tests/sample-parsing.c
index 0e2d00d..236ce0d 100644
--- a/tools/perf/tests/sample-parsing.c
+++ b/tools/perf/tests/sample-parsing.c
@@ -1,9 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <stdbool.h>
 #include <inttypes.h>
+#include <linux/bitops.h>
 #include <linux/kernel.h>
 #include <linux/types.h>

+#include "branch.h"
 #include "util.h"
 #include "event.h"
 #include "evsel.h"
diff --git a/tools/perf/tests/sdt.c b/tools/perf/tests/sdt.c
index 5059452..8bfaa63 100644
--- a/tools/perf/tests/sdt.c
+++ b/tools/perf/tests/sdt.c
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <sys/epoll.h>
 #include <util/evlist.h>
+#include <util/symbol.h>
 #include <linux/filter.h>
 #include "tests.h"
 #include "debug.h"

Leave a Reply

Your email address will not be published. Required fields are marked *