~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/firewire/motu/amdtp-motu-trace.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * amdtp-motu-trace.h - tracepoint definitions to dump a part of packet data
  4  *
  5  * Copyright (c) 2017 Takashi Sakamoto
  6  */
  7 
  8 #undef TRACE_SYSTEM
  9 #define TRACE_SYSTEM            snd_firewire_motu
 10 
 11 #if !defined(_SND_FIREWIRE_MOTU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 12 #define _SND_FIREWIRE_MOTU_TRACE_H
 13 
 14 #include <linux/tracepoint.h>
 15 
 16 static void copy_sph(u32 *frame, __be32 *buffer, unsigned int data_blocks,
 17                      unsigned int data_block_quadlets);
 18 static void copy_message(u64 *frames, __be32 *buffer, unsigned int data_blocks,
 19                          unsigned int data_block_quadlets);
 20 
 21 TRACE_EVENT(data_block_sph,
 22         TP_PROTO(struct amdtp_stream *s, unsigned int data_blocks, __be32 *buffer),
 23         TP_ARGS(s, data_blocks, buffer),
 24         TP_STRUCT__entry(
 25                 __field(int, src)
 26                 __field(int, dst)
 27                 __field(unsigned int, data_blocks)
 28                 __dynamic_array(u32, tstamps, data_blocks)
 29         ),
 30         TP_fast_assign(
 31                 if (s->direction == AMDTP_IN_STREAM) {
 32                         __entry->src = fw_parent_device(s->unit)->node_id;
 33                         __entry->dst = fw_parent_device(s->unit)->card->node_id;
 34                 } else {
 35                         __entry->src = fw_parent_device(s->unit)->card->node_id;
 36                         __entry->dst = fw_parent_device(s->unit)->node_id;
 37                 }
 38                 __entry->data_blocks = data_blocks;
 39                 copy_sph(__get_dynamic_array(tstamps), buffer, data_blocks, s->data_block_quadlets);
 40         ),
 41         TP_printk(
 42                 "%04x %04x %u %s",
 43                 __entry->src,
 44                 __entry->dst,
 45                 __entry->data_blocks,
 46                 __print_array(__get_dynamic_array(tstamps), __entry->data_blocks, 4)
 47         )
 48 );
 49 
 50 TRACE_EVENT(data_block_message,
 51         TP_PROTO(struct amdtp_stream *s, unsigned int data_blocks, __be32 *buffer),
 52         TP_ARGS(s, data_blocks, buffer),
 53         TP_STRUCT__entry(
 54                 __field(int, src)
 55                 __field(int, dst)
 56                 __field(unsigned int, data_blocks)
 57                 __dynamic_array(u64, messages, data_blocks)
 58         ),
 59         TP_fast_assign(
 60                 if (s->direction == AMDTP_IN_STREAM) {
 61                         __entry->src = fw_parent_device(s->unit)->node_id;
 62                         __entry->dst = fw_parent_device(s->unit)->card->node_id;
 63                 } else {
 64                         __entry->src = fw_parent_device(s->unit)->card->node_id;
 65                         __entry->dst = fw_parent_device(s->unit)->node_id;
 66                 }
 67                 __entry->data_blocks = data_blocks;
 68                 copy_message(__get_dynamic_array(messages), buffer, data_blocks, s->data_block_quadlets);
 69         ),
 70         TP_printk(
 71                 "%04x %04x %u %s",
 72                 __entry->src,
 73                 __entry->dst,
 74                 __entry->data_blocks,
 75                 __print_array(__get_dynamic_array(messages), __entry->data_blocks, 8)
 76         )
 77 );
 78 
 79 #endif
 80 
 81 #undef TRACE_INCLUDE_PATH
 82 #define TRACE_INCLUDE_PATH      .
 83 #undef TRACE_INCLUDE_FILE
 84 #define TRACE_INCLUDE_FILE      amdtp-motu-trace
 85 #include <trace/define_trace.h>
 86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php