linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@kernel.org>,
	Milian Wolff <milian.wolff@kdab.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Wang Nan <wangnan0@huawei.com>
Subject: [PATCH 01/11] perf trace: Add seccomp beautifier related defines for older systems
Date: Thu, 14 Apr 2016 09:32:17 -0300	[thread overview]
Message-ID: <1460637147-10555-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1460637147-10555-1-git-send-email-acme@kernel.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Were the detached tarball (make perf-tar-src-pkg) build was failing because
those definitions aren't available in the system headers.

On RHEL7, for instance:

  builtin-trace.c: In function ‘syscall_arg__scnprintf_seccomp_op’:
  builtin-trace.c:1069:7: error: ‘SECCOMP_SET_MODE_STRICT’ undeclared (first use in this function)
    P_SECCOMP_SET_MODE_OP(STRICT);
         ^
  builtin-trace.c:1069:7: note: each undeclared identifier is reported only once for each function it appears in
  builtin-trace.c:1070:7: error: ‘SECCOMP_SET_MODE_FILTER’ undeclared (first use in this function)
    P_SECCOMP_SET_MODE_OP(FILTER);
         ^
  builtin-trace.c: In function ‘syscall_arg__scnprintf_seccomp_flags’:
  builtin-trace.c:1091:14: error: ‘SECCOMP_FILTER_FLAG_TSYNC’ undeclared (first use in this function)
    P_FLAG(TSYNC);
                ^

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-4f8dzzwd7g6l5dzz693u7kul@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-trace.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index d49c131bb5de..246866c63e5e 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -1059,6 +1059,13 @@ static const char *tioctls[] = {
 static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401);
 #endif /* defined(__i386__) || defined(__x86_64__) */
 
+#ifndef SECCOMP_SET_MODE_STRICT
+#define SECCOMP_SET_MODE_STRICT 0
+#endif
+#ifndef SECCOMP_SET_MODE_FILTER
+#define SECCOMP_SET_MODE_FILTER 1
+#endif
+
 static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct syscall_arg *arg)
 {
 	int op = arg->val;
@@ -1077,6 +1084,10 @@ static size_t syscall_arg__scnprintf_seccomp_op(char *bf, size_t size, struct sy
 
 #define SCA_SECCOMP_OP  syscall_arg__scnprintf_seccomp_op
 
+#ifndef SECCOMP_FILTER_FLAG_TSYNC
+#define SECCOMP_FILTER_FLAG_TSYNC 1
+#endif
+
 static size_t syscall_arg__scnprintf_seccomp_flags(char *bf, size_t size,
 						   struct syscall_arg *arg)
 {
-- 
2.5.5

  reply	other threads:[~2016-04-14 12:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14 12:32 [GIT PULL 00/11] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-04-14 12:32 ` Arnaldo Carvalho de Melo [this message]
2016-04-14 12:32 ` [PATCH 02/11] perf trace: Add getrandom beautifier related defines for older systems Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 03/11] perf trace: Move mmap beautifiers to trace/beauty/ directory Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 04/11] perf trace: Move eventfd " Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 05/11] perf ordered_events: Introduce reinit() Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 06/11] perf session: Make ordered_events reusable Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 07/11] perf data: Add perf_data_file__switch() helper Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 08/11] perf record: Turns auxtrace_snapshot_enable into 3 states Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 09/11] perf record: Add '--timestamp-filename' option to append timestamp to output file name Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 10/11] perf config: Introduce perf_config_set class Arnaldo Carvalho de Melo
2016-04-14 12:32 ` [PATCH 11/11] perf config: Make show_config() use perf_config_set Arnaldo Carvalho de Melo
2016-04-14 13:32 ` [GIT PULL 00/11] perf/core improvements and fixes Ingo Molnar

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=1460637147-10555-2-git-send-email-acme@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=milian.wolff@kdab.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /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).