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

TOMOYO Linux Cross Reference
Linux/fs/zonefs/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 */
  2 /*
  3  * zonefs filesystem driver tracepoints.
  4  *
  5  * Copyright (C) 2021 Western Digital Corporation or its affiliates.
  6  */
  7 
  8 #undef TRACE_SYSTEM
  9 #define TRACE_SYSTEM zonefs
 10 
 11 #if !defined(_TRACE_ZONEFS_H) || defined(TRACE_HEADER_MULTI_READ)
 12 #define _TRACE_ZONEFS_H
 13 
 14 #include <linux/tracepoint.h>
 15 #include <linux/trace_seq.h>
 16 #include <linux/blkdev.h>
 17 
 18 #include "zonefs.h"
 19 
 20 #define show_dev(dev) MAJOR(dev), MINOR(dev)
 21 
 22 TRACE_EVENT(zonefs_zone_mgmt,
 23             TP_PROTO(struct super_block *sb, struct zonefs_zone *z,
 24                      enum req_op op),
 25             TP_ARGS(sb, z, op),
 26             TP_STRUCT__entry(
 27                              __field(dev_t, dev)
 28                              __field(ino_t, ino)
 29                              __field(enum req_op, op)
 30                              __field(sector_t, sector)
 31                              __field(sector_t, nr_sectors)
 32             ),
 33             TP_fast_assign(
 34                            __entry->dev = sb->s_dev;
 35                            __entry->ino =
 36                                 z->z_sector >> ZONEFS_SB(sb)->s_zone_sectors_shift;
 37                            __entry->op = op;
 38                            __entry->sector = z->z_sector;
 39                            __entry->nr_sectors = z->z_size >> SECTOR_SHIFT;
 40             ),
 41             TP_printk("bdev=(%d,%d), ino=%lu op=%s, sector=%llu, nr_sectors=%llu",
 42                       show_dev(__entry->dev), (unsigned long)__entry->ino,
 43                       blk_op_str(__entry->op), __entry->sector,
 44                       __entry->nr_sectors
 45             )
 46 );
 47 
 48 TRACE_EVENT(zonefs_file_dio_append,
 49             TP_PROTO(struct inode *inode, ssize_t size, ssize_t ret),
 50             TP_ARGS(inode, size, ret),
 51             TP_STRUCT__entry(
 52                              __field(dev_t, dev)
 53                              __field(ino_t, ino)
 54                              __field(sector_t, sector)
 55                              __field(ssize_t, size)
 56                              __field(loff_t, wpoffset)
 57                              __field(ssize_t, ret)
 58             ),
 59             TP_fast_assign(
 60                            __entry->dev = inode->i_sb->s_dev;
 61                            __entry->ino = inode->i_ino;
 62                            __entry->sector = zonefs_inode_zone(inode)->z_sector;
 63                            __entry->size = size;
 64                            __entry->wpoffset =
 65                                 zonefs_inode_zone(inode)->z_wpoffset;
 66                            __entry->ret = ret;
 67             ),
 68             TP_printk("bdev=(%d, %d), ino=%lu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu",
 69                       show_dev(__entry->dev), (unsigned long)__entry->ino,
 70                       __entry->sector, __entry->size, __entry->wpoffset,
 71                       __entry->ret
 72             )
 73 );
 74 
 75 TRACE_EVENT(zonefs_iomap_begin,
 76             TP_PROTO(struct inode *inode, struct iomap *iomap),
 77             TP_ARGS(inode, iomap),
 78             TP_STRUCT__entry(
 79                              __field(dev_t, dev)
 80                              __field(ino_t, ino)
 81                              __field(u64, addr)
 82                              __field(loff_t, offset)
 83                              __field(u64, length)
 84             ),
 85             TP_fast_assign(
 86                            __entry->dev = inode->i_sb->s_dev;
 87                            __entry->ino = inode->i_ino;
 88                            __entry->addr = iomap->addr;
 89                            __entry->offset = iomap->offset;
 90                            __entry->length = iomap->length;
 91             ),
 92             TP_printk("bdev=(%d,%d), ino=%lu, addr=%llu, offset=%llu, length=%llu",
 93                       show_dev(__entry->dev), (unsigned long)__entry->ino,
 94                       __entry->addr, __entry->offset, __entry->length
 95             )
 96 );
 97 
 98 #endif /* _TRACE_ZONEFS_H */
 99 
100 #undef TRACE_INCLUDE_PATH
101 #define TRACE_INCLUDE_PATH .
102 #undef TRACE_INCLUDE_FILE
103 #define TRACE_INCLUDE_FILE trace
104 
105 /* This part must be outside protection */
106 #include <trace/define_trace.h>
107 

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