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