Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
3568fb65 MJ |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM 9p | |
4 | ||
5 | #if !defined(LTTNG_TRACE_9P_H) || defined(TRACE_HEADER_MULTI_READ) | |
6 | #define LTTNG_TRACE_9P_H | |
7 | ||
8 | #include <probes/lttng-tracepoint-event.h> | |
2d042821 | 9 | #include <lttng-kernel-version.h> |
3568fb65 | 10 | |
2d042821 | 11 | #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(4,14,0)) |
3568fb65 MJ |
12 | LTTNG_TRACEPOINT_EVENT(9p_client_req, |
13 | ||
14 | TP_PROTO(struct p9_client *clnt, int8_t type, int tag), | |
15 | ||
16 | TP_ARGS(clnt, type, tag), | |
17 | ||
18 | TP_FIELDS( | |
19 | ctf_integer_hex(void *, clnt, clnt) | |
20 | ctf_integer(u8, type, type) | |
21 | ctf_integer(u32, tag, tag) | |
22 | ) | |
23 | ) | |
24 | ||
25 | LTTNG_TRACEPOINT_EVENT(9p_client_res, | |
26 | ||
27 | TP_PROTO(struct p9_client *clnt, int8_t type, int tag, int err), | |
28 | ||
29 | TP_ARGS(clnt, type, tag, err), | |
30 | ||
31 | TP_FIELDS( | |
32 | ctf_integer_hex(void *, clnt, clnt) | |
33 | ctf_integer(u8, type, type) | |
34 | ctf_integer(u32, tag, tag) | |
35 | ctf_integer(u32, err, err) | |
36 | ) | |
37 | ) | |
38 | ||
39 | LTTNG_TRACEPOINT_EVENT(9p_protocol_dump, | |
40 | ||
41 | TP_PROTO(struct p9_client *clnt, struct p9_fcall *pdu), | |
42 | ||
43 | TP_ARGS(clnt, pdu), | |
44 | ||
45 | TP_FIELDS( | |
46 | ctf_integer_hex(void *, clnt, clnt) | |
47 | ctf_integer(u8, type, pdu->id) | |
48 | ctf_integer(u16, tag, pdu->tag) | |
49 | ctf_array(unsigned char, line, pdu->sdata, P9_PROTO_DUMP_SZ) | |
50 | ) | |
51 | ) | |
52 | #endif | |
53 | ||
54 | #endif /* LTTNG_TRACE_9P_H */ | |
55 | ||
56 | /* This part must be outside protection */ | |
57 | #include <probes/define_trace.h> |