[PATCH 0/5] firewire: add tracepoints events for asynchronous transaction

Takashi Sakamoto posted 5 patches 1 year, 7 months ago
drivers/firewire/Makefile           |   2 +-
drivers/firewire/core-trace.c       |   5 +
drivers/firewire/core-transaction.c |  93 +++++++-----
include/trace/events/firewire.h     | 211 ++++++++++++++++++++++++++++
4 files changed, 276 insertions(+), 35 deletions(-)
create mode 100644 drivers/firewire/core-trace.c
create mode 100644 include/trace/events/firewire.h
[PATCH 0/5] firewire: add tracepoints events for asynchronous transaction
Posted by Takashi Sakamoto 1 year, 7 months ago
Hi,

The series of changes in this patchse is to revise the previous RFC:
https://lore.kernel.org/lkml/20240418092303.19725-1-o-takashi@sakamocchi.jp/

In a view of IEEE 1394 bus, the main function of kernel core is to
provide transaction service to the bus. It is helpful to have some
mechanisms to trace any action of the service.

This series of changes adds some tracepoints events for the purpose.
It adds the following tracepoints events via 'firewire' subsystem:

* For outbound transactions (e.g. initiated by user process)
    * async_request_outbound_initiate
    * async_request_outbound_complete
    * async_response_inbound
* For inbound transactions (e.g. initiated by the other nodes in the bus)
    * async_request_inbound
    * async_response_outbound_initiate
    * async_response_outbound_complete

When probing these tracepoints events, the content of 'struct fw_packet'
passed between the core function and 1394 OHCI driver is recorded with
the fields of header and packet data. For example of the outbound
split transaction:

async_request_outbound_initiate: \
    transaction=0xffff955fc6a07b30 generation=5 scode=2 dst_id=0xffc0 \
    tlabel=18 tcode=9 src_id=0xffc1 offset=0xfffff0000984 \
    header={0xffc04990,0xffc1ffff,0xf0000984,0x80002} data={0x81,0x80}
async_request_outbound_complete: \
    transaction=0xffff955fc6a07b30 generation=5 scode=2 status=2 \
    timestamp=0xeabf
async_response_inbound: \
    transaction=0xffff955fc6a07b30 generation=5 scode=2 status=1 \
    timestamp=0xeac2 dst_id=0xffc1 tlabel=18 tcode=11 src_id=0xffc0 \
    rcode=0 header={0xffc149b0,0xffc00000,0x0,0x40002} data={0x81}

Takashi Sakamoto (5):
  firewire: core: add support for Linux kernel tracepoints
  firewire: core: add tracepoints events for asynchronous outbound
    request
  firewire: core: add tracepoints event for asynchronous inbound
    response
  firewire: core: add tracepoint event for asynchronous inbound request
  firewire: core: add tracepoints events for asynchronous outbound
    response

 drivers/firewire/Makefile           |   2 +-
 drivers/firewire/core-trace.c       |   5 +
 drivers/firewire/core-transaction.c |  93 +++++++-----
 include/trace/events/firewire.h     | 211 ++++++++++++++++++++++++++++
 4 files changed, 276 insertions(+), 35 deletions(-)
 create mode 100644 drivers/firewire/core-trace.c
 create mode 100644 include/trace/events/firewire.h

-- 
2.43.0
Re: [PATCH 0/5] firewire: add tracepoints events for asynchronous transaction
Posted by Takashi Sakamoto 1 year, 7 months ago
On Mon, Apr 29, 2024 at 01:32:13PM +0900, Takashi Sakamoto wrote:
> Hi,
> 
> The series of changes in this patchse is to revise the previous RFC:
> https://lore.kernel.org/lkml/20240418092303.19725-1-o-takashi@sakamocchi.jp/
> 
> In a view of IEEE 1394 bus, the main function of kernel core is to
> provide transaction service to the bus. It is helpful to have some
> mechanisms to trace any action of the service.
> 
> This series of changes adds some tracepoints events for the purpose.
> It adds the following tracepoints events via 'firewire' subsystem:
> 
> * For outbound transactions (e.g. initiated by user process)
>     * async_request_outbound_initiate
>     * async_request_outbound_complete
>     * async_response_inbound
> * For inbound transactions (e.g. initiated by the other nodes in the bus)
>     * async_request_inbound
>     * async_response_outbound_initiate
>     * async_response_outbound_complete
> 
> When probing these tracepoints events, the content of 'struct fw_packet'
> passed between the core function and 1394 OHCI driver is recorded with
> the fields of header and packet data. For example of the outbound
> split transaction:
> 
> async_request_outbound_initiate: \
>     transaction=0xffff955fc6a07b30 generation=5 scode=2 dst_id=0xffc0 \
>     tlabel=18 tcode=9 src_id=0xffc1 offset=0xfffff0000984 \
>     header={0xffc04990,0xffc1ffff,0xf0000984,0x80002} data={0x81,0x80}
> async_request_outbound_complete: \
>     transaction=0xffff955fc6a07b30 generation=5 scode=2 status=2 \
>     timestamp=0xeabf
> async_response_inbound: \
>     transaction=0xffff955fc6a07b30 generation=5 scode=2 status=1 \
>     timestamp=0xeac2 dst_id=0xffc1 tlabel=18 tcode=11 src_id=0xffc0 \
>     rcode=0 header={0xffc149b0,0xffc00000,0x0,0x40002} data={0x81}
> 
> Takashi Sakamoto (5):
>   firewire: core: add support for Linux kernel tracepoints
>   firewire: core: add tracepoints events for asynchronous outbound
>     request
>   firewire: core: add tracepoints event for asynchronous inbound
>     response
>   firewire: core: add tracepoint event for asynchronous inbound request
>   firewire: core: add tracepoints events for asynchronous outbound
>     response
> 
>  drivers/firewire/Makefile           |   2 +-
>  drivers/firewire/core-trace.c       |   5 +
>  drivers/firewire/core-transaction.c |  93 +++++++-----
>  include/trace/events/firewire.h     | 211 ++++++++++++++++++++++++++++
>  4 files changed, 276 insertions(+), 35 deletions(-)
>  create mode 100644 drivers/firewire/core-trace.c
>  create mode 100644 include/trace/events/firewire.h

Applied to for-next branch.


Regards

Takashi Sakamoto