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

TOMOYO Linux Cross Reference
Linux/sound/firewire/amdtp-stream-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-stream-trace.h - tracepoint definitions to dump a part of packet data
  4  *
  5  * Copyright (c) 2016 Takashi Sakamoto
  6  */
  7 
  8 #undef TRACE_SYSTEM
  9 #define TRACE_SYSTEM            snd_firewire_lib
 10 
 11 #if !defined(_AMDTP_STREAM_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 12 #define _AMDTP_STREAM_TRACE_H
 13 
 14 #include <linux/tracepoint.h>
 15 
 16 TRACE_EVENT(amdtp_packet,
 17         TP_PROTO(const struct amdtp_stream *s, u32 cycles, const __be32 *cip_header, unsigned int payload_length, unsigned int data_blocks, unsigned int data_block_counter, unsigned int packet_index, unsigned int index, u32 curr_cycle_time),
 18         TP_ARGS(s, cycles, cip_header, payload_length, data_blocks, data_block_counter, packet_index, index, curr_cycle_time),
 19         TP_STRUCT__entry(
 20                 __field(unsigned int, cycle_time)
 21                 __field(unsigned int, second)
 22                 __field(unsigned int, cycle)
 23                 __field(int, channel)
 24                 __field(int, src)
 25                 __field(int, dest)
 26                 __dynamic_array(u8, cip_header, cip_header ? 8 : 0)
 27                 __field(unsigned int, payload_quadlets)
 28                 __field(unsigned int, data_blocks)
 29                 __field(unsigned int, data_block_counter)
 30                 __field(unsigned int, packet_index)
 31                 __field(unsigned int, irq)
 32                 __field(unsigned int, index)
 33         ),
 34         TP_fast_assign(
 35                 __entry->cycle_time = curr_cycle_time;
 36                 __entry->second = cycles / CYCLES_PER_SECOND;
 37                 __entry->cycle = cycles % CYCLES_PER_SECOND;
 38                 __entry->channel = s->context->channel;
 39                 if (s->direction == AMDTP_IN_STREAM) {
 40                         __entry->src = fw_parent_device(s->unit)->node_id;
 41                         __entry->dest = fw_parent_device(s->unit)->card->node_id;
 42                 } else {
 43                         __entry->src = fw_parent_device(s->unit)->card->node_id;
 44                         __entry->dest = fw_parent_device(s->unit)->node_id;
 45                 }
 46                 if (cip_header) {
 47                         memcpy(__get_dynamic_array(cip_header), cip_header,
 48                                __get_dynamic_array_len(cip_header));
 49                 }
 50                 __entry->payload_quadlets = payload_length / sizeof(__be32);
 51                 __entry->data_blocks = data_blocks;
 52                 __entry->data_block_counter = data_block_counter,
 53                 __entry->packet_index = packet_index;
 54                 __entry->irq = !!in_softirq();
 55                 __entry->index = index;
 56         ),
 57         TP_printk(
 58                 "%08x %02u %04u %04x %04x %02d %03u %02u %03u %02u %01u %02u %s",
 59                 __entry->cycle_time,
 60                 __entry->second,
 61                 __entry->cycle,
 62                 __entry->src,
 63                 __entry->dest,
 64                 __entry->channel,
 65                 __entry->payload_quadlets,
 66                 __entry->data_blocks,
 67                 __entry->data_block_counter,
 68                 __entry->packet_index,
 69                 __entry->irq,
 70                 __entry->index,
 71                 __print_array(__get_dynamic_array(cip_header),
 72                               __get_dynamic_array_len(cip_header), 1))
 73 );
 74 
 75 #endif
 76 
 77 #undef TRACE_INCLUDE_PATH
 78 #define TRACE_INCLUDE_PATH      .
 79 #undef TRACE_INCLUDE_FILE
 80 #define TRACE_INCLUDE_FILE      amdtp-stream-trace
 81 #include <trace/define_trace.h>
 82 

~ [ 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