From 08dd8602aab9fe9dbc3e41727caf7e416d2ccec4 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 1 May 2024 16:32:36 +0900 Subject: firewire: core: add tracepoints events for initiating bus reset At a commit 673249124304 ("firewire: core: option to log bus reset initiation"), some kernel log messages were added to trace initiation of bus reset. The kernel log messages are really helpful, while nowadays it is not preferable just for debugging purpose. For the purpose, Linux kernel tracepoints is more preferable. This commit adds some alternative tracepoints events. Link: https://lore.kernel.org/r/20240501073238.72769-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto --- include/trace/events/firewire.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'include/trace') diff --git a/include/trace/events/firewire.h b/include/trace/events/firewire.h index db49b9828bd1..92bcbe69bb42 100644 --- a/include/trace/events/firewire.h +++ b/include/trace/events/firewire.h @@ -284,6 +284,39 @@ TRACE_EVENT(async_phy_inbound, ) ); +DECLARE_EVENT_CLASS(bus_reset_arrange_template, + TP_PROTO(unsigned int generation, bool short_reset), + TP_ARGS(generation, short_reset), + TP_STRUCT__entry( + __field(u8, generation) + __field(bool, short_reset) + ), + TP_fast_assign( + __entry->generation = generation; + __entry->short_reset = short_reset; + ), + TP_printk( + "generation=%u short_reset=%s", + __entry->generation, + __entry->short_reset ? "true" : "false" + ) +); + +DEFINE_EVENT(bus_reset_arrange_template, bus_reset_initiate, + TP_PROTO(unsigned int generation, bool short_reset), + TP_ARGS(generation, short_reset) +); + +DEFINE_EVENT(bus_reset_arrange_template, bus_reset_schedule, + TP_PROTO(unsigned int generation, bool short_reset), + TP_ARGS(generation, short_reset) +); + +DEFINE_EVENT(bus_reset_arrange_template, bus_reset_postpone, + TP_PROTO(unsigned int generation, bool short_reset), + TP_ARGS(generation, short_reset) +); + #endif // _FIREWIRE_TRACE_EVENT_H #include -- cgit v1.2.3