xref: /linux/include/trace/events/rust_sample.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Tracepoints for `samples/rust/rust_print.rs`.
4  *
5  * Copyright (C) 2024 Google, Inc.
6  */
7 
8 #undef TRACE_SYSTEM
9 #define TRACE_SYSTEM rust_sample
10 
11 #if !defined(_RUST_SAMPLE_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
12 #define _RUST_SAMPLE_TRACE_H
13 
14 #include <linux/tracepoint.h>
15 
16 TRACE_EVENT(rust_sample_loaded,
17 	TP_PROTO(int magic_number),
18 	TP_ARGS(magic_number),
19 	TP_STRUCT__entry(
20 		__field(int, magic_number)
21 	),
22 	TP_fast_assign(
23 		__entry->magic_number = magic_number;
24 	),
25 	TP_printk("magic=%d", __entry->magic_number)
26 );
27 
28 #endif /* _RUST_SAMPLE_TRACE_H */
29 
30 /* This part must be outside protection */
31 #include <trace/define_trace.h>
32