All of lore.kernel.org
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: Song Liu <songliubraving@fb.com>, <peterz@infradead.org>,
	<acme@kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>,
	<kernel-team@fb.com>
Subject: [PATCH v11 perf, bpf-next 4/9] sync tools/include/uapi/linux/perf_event.h
Date: Thu, 17 Jan 2019 08:15:16 -0800	[thread overview]
Message-ID: <20190117161521.1341602-5-songliubraving@fb.com> (raw)
In-Reply-To: <20190117161521.1341602-1-songliubraving@fb.com>

sync for PERF_RECORD_BPF_EVENT

Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
 tools/include/uapi/linux/perf_event.h | 29 ++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index 68c4da0227c5..8bd78a34e396 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -373,7 +373,8 @@ struct perf_event_attr {
 				write_backward :  1, /* Write ring buffer from end to beginning */
 				namespaces     :  1, /* include namespaces data */
 				ksymbol        :  1, /* include ksymbol events */
-				__reserved_1   : 34;
+				bpf_event      :  1, /* include bpf events */
+				__reserved_1   : 33;
 
 	union {
 		__u32		wakeup_events;	  /* wakeup every n events */
@@ -981,6 +982,25 @@ enum perf_event_type {
 	 */
 	PERF_RECORD_KSYMBOL			= 17,
 
+	/*
+	 * Record bpf events:
+	 *  enum perf_bpf_event_type {
+	 *	PERF_BPF_EVENT_UNKNOWN		= 0,
+	 *	PERF_BPF_EVENT_PROG_LOAD	= 1,
+	 *	PERF_BPF_EVENT_PROG_UNLOAD	= 2,
+	 *  };
+	 *
+	 * struct {
+	 *	struct perf_event_header	header;
+	 *	u16				type;
+	 *	u16				flags;
+	 *	u32				id;
+	 *	u8				tag[BPF_TAG_SIZE];
+	 *	struct sample_id		sample_id;
+	 * };
+	 */
+	PERF_RECORD_BPF_EVENT			= 18,
+
 	PERF_RECORD_MAX,			/* non-ABI */
 };
 
@@ -992,6 +1012,13 @@ enum perf_record_ksymbol_type {
 
 #define PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER	(1 << 0)
 
+enum perf_bpf_event_type {
+	PERF_BPF_EVENT_UNKNOWN		= 0,
+	PERF_BPF_EVENT_PROG_LOAD	= 1,
+	PERF_BPF_EVENT_PROG_UNLOAD	= 2,
+	PERF_BPF_EVENT_MAX,		/* non-ABI */
+};
+
 #define PERF_MAX_STACK_DEPTH		127
 #define PERF_MAX_CONTEXTS_PER_STACK	  8
 
-- 
2.17.1


  parent reply	other threads:[~2019-01-17 16:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 16:15 [PATCH v11 perf, bpf-next 0/9] reveal invisible bpf programs Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 1/9] perf, bpf: Introduce PERF_RECORD_KSYMBOL Song Liu
2019-01-22 10:18   ` [tip:perf/core] " tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 2/9] sync tools/include/uapi/linux/perf_event.h Song Liu
2019-01-22 10:18   ` [tip:perf/core] tools headers uapi: Sync tools/include/uapi/linux/perf_event.h tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 3/9] perf, bpf: introduce PERF_RECORD_BPF_EVENT Song Liu
2019-01-22 10:19   ` [tip:perf/core] perf, bpf: Introduce PERF_RECORD_BPF_EVENT tip-bot for Song Liu
2019-01-17 16:15 ` Song Liu [this message]
2019-01-22 10:20   ` [tip:perf/core] tools headers uapi: Sync tools/include/uapi/linux/perf_event.h tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 5/9] perf util: handle PERF_RECORD_KSYMBOL Song Liu
2019-01-18 14:45   ` Arnaldo Carvalho de Melo
2019-01-22 10:20   ` [tip:perf/core] perf tools: Handle PERF_RECORD_KSYMBOL tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 6/9] perf util: handle PERF_RECORD_BPF_EVENT Song Liu
2019-01-18 14:46   ` Arnaldo Carvalho de Melo
2019-01-22 10:21   ` [tip:perf/core] perf tools: Handle PERF_RECORD_BPF_EVENT tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 7/9] perf tools: synthesize PERF_RECORD_* for loaded BPF programs Song Liu
2019-01-18 14:46   ` Arnaldo Carvalho de Melo
2019-01-22 14:13     ` Arnaldo Carvalho de Melo
2019-01-22 14:31       ` Arnaldo Carvalho de Melo
2019-01-22 14:48         ` Arnaldo Carvalho de Melo
2019-01-22 14:51         ` Jiri Olsa
2019-01-22 14:58           ` Arnaldo Carvalho de Melo
2019-01-22 15:21             ` Jiri Olsa
2019-01-22 18:38               ` Song Liu
2019-01-22 19:15                 ` Jiri Olsa
2019-01-22 19:24                   ` Song Liu
2019-01-22 19:44                     ` Jiri Olsa
2019-01-24  9:49                     ` Arnaldo Carvalho de Melo
2019-01-22 10:22   ` [tip:perf/core] perf tools: Synthesize " tip-bot for Song Liu
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 8/9] perf top: Synthesize BPF events for pre-existing " Song Liu
2019-01-22 10:22   ` [tip:perf/core] " tip-bot for Arnaldo Carvalho de Melo
2019-01-17 16:15 ` [PATCH v11 perf, bpf-next 9/9] bpf: add module name [bpf] to ksymbols for bpf programs Song Liu
2019-01-22 10:23   ` [tip:perf/core] bpf: Add " tip-bot for Song Liu

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=20190117161521.1341602-5-songliubraving@fb.com \
    --to=songliubraving@fb.com \
    --cc=acme@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.