X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2F9p.h;fp=instrumentation%2Fevents%2Flttng-module%2F9p.h;h=ab58bac8ee53e974a58855dd2a447ad456f59421;hb=3568fb657b9736aaf765b24ce4cc25eaeaadae1c;hp=0000000000000000000000000000000000000000;hpb=fde8b34a4661d3e97db4a9a13018cdc2fd898a6e;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/9p.h b/instrumentation/events/lttng-module/9p.h new file mode 100644 index 00000000..ab58bac8 --- /dev/null +++ b/instrumentation/events/lttng-module/9p.h @@ -0,0 +1,57 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM 9p + +#if !defined(LTTNG_TRACE_9P_H) || defined(TRACE_HEADER_MULTI_READ) +#define LTTNG_TRACE_9P_H + +#include +#include + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) +LTTNG_TRACEPOINT_EVENT(9p_client_req, + + TP_PROTO(struct p9_client *clnt, int8_t type, int tag), + + TP_ARGS(clnt, type, tag), + + TP_FIELDS( + ctf_integer_hex(void *, clnt, clnt) + ctf_integer(u8, type, type) + ctf_integer(u32, tag, tag) + ) +) + +LTTNG_TRACEPOINT_EVENT(9p_client_res, + + TP_PROTO(struct p9_client *clnt, int8_t type, int tag, int err), + + TP_ARGS(clnt, type, tag, err), + + TP_FIELDS( + ctf_integer_hex(void *, clnt, clnt) + ctf_integer(u8, type, type) + ctf_integer(u32, tag, tag) + ctf_integer(u32, err, err) + ) +) + +LTTNG_TRACEPOINT_EVENT(9p_protocol_dump, + + TP_PROTO(struct p9_client *clnt, struct p9_fcall *pdu), + + TP_ARGS(clnt, pdu), + + TP_FIELDS( + ctf_integer_hex(void *, clnt, clnt) + ctf_integer(u8, type, pdu->id) + ctf_integer(u16, tag, pdu->tag) + ctf_array(unsigned char, line, pdu->sdata, P9_PROTO_DUMP_SZ) + ) +) +#endif + +#endif /* LTTNG_TRACE_9P_H */ + +/* This part must be outside protection */ +#include