Skip to content

Commit

Permalink
firewire: ohci: add support for Linux kernel tracepoints
Browse files Browse the repository at this point in the history
The Linux Kernel Tracepoints framework is enough useful to trace the
interaction between 1394 OHCI hardware and its driver.

This commit adds firewire_ohci subsystem to use the framework. It is
defined as the different subsystem from the existing firewire subsystem.
The definition file for the existing subsystem is slightly changed so that
both subsystems are available in 1394 OHCI driver.

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Sakamoto <[email protected]>
  • Loading branch information
takaswie committed Jun 25, 2024
1 parent daf763c commit 001c1ff
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@

#include <trace/events/firewire.h>

#define CREATE_TRACE_POINTS
#include <trace/events/firewire_ohci.h>

#define ohci_info(ohci, f, args...) dev_info(ohci->card.device, f, ##args)
#define ohci_notice(ohci, f, args...) dev_notice(ohci->card.device, f, ##args)
#define ohci_err(ohci, f, args...) dev_err(ohci->card.device, f, ##args)
Expand Down
1 change: 1 addition & 0 deletions include/trace/events/firewire.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2024 Takashi Sakamoto

#undef TRACE_SYSTEM
#define TRACE_SYSTEM firewire

#if !defined(_FIREWIRE_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
Expand Down
16 changes: 16 additions & 0 deletions include/trace/events/firewire_ohci.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright (c) 2024 Takashi Sakamoto

#undef TRACE_SYSTEM
#define TRACE_SYSTEM firewire_ohci

#if !defined(_FIREWIRE_OHCI_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
#define _FIREWIRE_OHCI_TRACE_EVENT_H

#include <linux/tracepoint.h>

// Placeholder for future use.

#endif // _FIREWIRE_OHCI_TRACE_EVENT_H

#include <trace/define_trace.h>

0 comments on commit 001c1ff

Please sign in to comment.