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 v4 perf, bpf-next 2/7] sync tools/include/uapi/linux/perf_event.h
Date: Tue, 18 Dec 2018 22:02:21 -0800 [thread overview]
Message-ID: <20181219060227.1057679-3-songliubraving@fb.com> (raw)
In-Reply-To: <20181219060227.1057679-1-songliubraving@fb.com>
sync changes for PERF_RECORD_KSYMBOL
Signed-off-by: Song Liu <songliubraving@fb.com>
---
tools/include/uapi/linux/perf_event.h | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index 9de8780ac8d9..6c9e327e87ed 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -372,7 +372,8 @@ struct perf_event_attr {
context_switch : 1, /* context switch data */
write_backward : 1, /* Write ring buffer from end to beginning */
namespaces : 1, /* include namespaces data */
- __reserved_1 : 35;
+ ksymbol : 1, /* include ksymbol events */
+ __reserved_1 : 34;
union {
__u32 wakeup_events; /* wakeup every n events */
@@ -648,11 +649,18 @@ struct perf_event_mmap_page {
* PERF_RECORD_MISC_COMM_EXEC - PERF_RECORD_COMM event
* PERF_RECORD_MISC_FORK_EXEC - PERF_RECORD_FORK event (perf internal)
* PERF_RECORD_MISC_SWITCH_OUT - PERF_RECORD_SWITCH* events
+ * PERF_RECORD_MISC_KSYMBOL_* - PERF_RECORD_KSYMBOL event
*/
#define PERF_RECORD_MISC_MMAP_DATA (1 << 13)
#define PERF_RECORD_MISC_COMM_EXEC (1 << 13)
#define PERF_RECORD_MISC_FORK_EXEC (1 << 13)
#define PERF_RECORD_MISC_SWITCH_OUT (1 << 13)
+
+#define PERF_RECORD_MISC_KSYMBOL_UNREGISTER (1 << 3)
+#define PERF_RECORD_MISC_KSYMBOL_TYPE_MASK (7 << 4)
+#define PERF_RECORD_MISC_KSYMBOL_TYPE_UNKNOWN (0 << 4)
+#define PERF_RECORD_MISC_KSYMBOL_TYPE_BPF (1 << 4)
+
/*
* These PERF_RECORD_MISC_* flags below are safely reused
* for the following events:
@@ -965,6 +973,19 @@ enum perf_event_type {
*/
PERF_RECORD_NAMESPACES = 16,
+ /*
+ * Record ksymbol register/unregister events:
+ *
+ * struct {
+ * struct perf_event_header header;
+ * u64 addr;
+ * u64 len;
+ * char name[];
+ * struct sample_id sample_id;
+ * };
+ */
+ PERF_RECORD_KSYMBOL = 17,
+
PERF_RECORD_MAX, /* non-ABI */
};
--
2.17.1
next prev parent reply other threads:[~2018-12-19 6:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 6:02 [PATCH v4 perf, bpf-next 0/7] reveal invisible bpf programs Song Liu
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 1/7] perf, bpf: Introduce PERF_RECORD_KSYMBOL Song Liu
2018-12-19 6:02 ` Song Liu [this message]
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 3/7] perf, bpf: introduce PERF_RECORD_BPF_EVENT Song Liu
2018-12-19 20:11 ` kbuild test robot
2018-12-19 21:02 ` kbuild test robot
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 4/7] sync tools/include/uapi/linux/perf_event.h Song Liu
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 5/7] perf util: handle PERF_RECORD_BPF_EVENT Song Liu
2018-12-19 6:06 ` Song Liu
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 5/7] perf util: handle PERF_RECORD_KSYMBOL Song Liu
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 6/7] perf util: handle PERF_RECORD_BPF_EVENT Song Liu
2018-12-19 6:02 ` [PATCH v4 perf, bpf-next 7/7] perf tools: synthesize PERF_RECORD_* for loaded BPF programs 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=20181219060227.1057679-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®