]> git.saurik.com Git - apple/xnu.git/blob - bsd/hfs/hfs_kdebug.h
xnu-2782.40.9.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_kdebug.h
1 #include <sys/kdebug.h>
2
3 /*
4 * KERNEL_DEBUG related definitions for HFS.
5 *
6 * NOTE: The Class DBG_FSYSTEM = 3, and Subclass DBG_HFS = 8, so these
7 * debug codes are of the form 0x0308nnnn.
8 */
9 #define HFSDBG_CODE(code) FSDBG_CODE(DBG_HFS, code)
10
11 enum {
12 HFSDBG_WRITE = FSDBG_CODE(DBG_FSRW, 0), /* 0x3010000 */
13 HFSDBG_TRUNCATE = FSDBG_CODE(DBG_FSRW, 7), /* 0x301001C */
14 HFSDBG_READ = FSDBG_CODE(DBG_FSRW, 12), /* 0x3010030 */
15 HFSDBG_GETNEWVNODE = FSDBG_CODE(DBG_FSRW, 37), /* 0x3010094 */
16 HFSDBG_UPDATE = FSDBG_CODE(DBG_FSRW, 8192), /* 0x3018000 */
17 HFSDBG_UNMAP_FREE = HFSDBG_CODE(0), /* 0x03080000 */
18 HFSDBG_UNMAP_ALLOC = HFSDBG_CODE(1), /* 0x03080004 */
19 HFSDBG_UNMAP_CALLBACK = HFSDBG_CODE(2), /* 0x03080008 */
20 /* 0x0308000C is unused */
21 HFSDBG_BLOCK_ALLOCATE = HFSDBG_CODE(4), /* 0x03080010 */
22 HFSDBG_BLOCK_DEALLOCATE = HFSDBG_CODE(5), /* 0x03080014 */
23 HFSDBG_READ_BITMAP_BLOCK = HFSDBG_CODE(6), /* 0x03080018 */
24 HFSDBG_RELEASE_BITMAP_BLOCK = HFSDBG_CODE(7), /* 0x0308001C */
25 HFSDBG_ALLOC_CONTIG_BITMAP = HFSDBG_CODE(8), /* 0x03080020 */
26 HFSDBG_ALLOC_ANY_BITMAP = HFSDBG_CODE(9), /* 0x03080024 */
27 HFSDBG_ALLOC_KNOWN_BITMAP = HFSDBG_CODE(10), /* 0x03080028 */
28 HFSDBG_MARK_ALLOC_BITMAP = HFSDBG_CODE(11), /* 0x0308002C */
29 HFSDBG_MARK_FREE_BITMAP = HFSDBG_CODE(12), /* 0x03080030 */
30 HFSDBG_BLOCK_FIND_CONTIG = HFSDBG_CODE(13), /* 0x03080034 */
31 HFSDBG_IS_ALLOCATED = HFSDBG_CODE(14), /* 0x03080038 */
32 /* 0x0308003C is unused */
33 HFSDBG_RESET_EXTENT_CACHE = HFSDBG_CODE(16), /* 0x03080040 */
34 HFSDBG_REMOVE_EXTENT_CACHE = HFSDBG_CODE(17), /* 0x03080044 */
35 HFSDBG_ADD_EXTENT_CACHE = HFSDBG_CODE(18), /* 0x03080048 */
36 HFSDBG_READ_BITMAP_RANGE = HFSDBG_CODE(19), /* 0x0308004C */
37 HFSDBG_RELEASE_SCAN_BITMAP = HFSDBG_CODE(20), /* 0x03080050 */
38 HFSDBG_SYNCER = HFSDBG_CODE(21), /* 0x03080054 */
39 HFSDBG_SYNCER_TIMED = HFSDBG_CODE(22), /* 0x03080058 */
40 HFSDBG_UNMAP_SCAN = HFSDBG_CODE(23), /* 0x0308005C */
41 HFSDBG_UNMAP_SCAN_TRIM = HFSDBG_CODE(24) /* 0x03080060 */
42 };
43
44 /*
45 Parameters logged by the above tracepoints:
46 ---------------------------------------------------------------------------------------------------------------------------------
47 CODE EVENT NAME DBG_FUNC_START arg1, arg2, arg3, arg4, arg5 ... DBG_FUNC_END arg1, arg2, arg3, arg4, arg5
48 DBG_FUNC_NONE arg1, arg2, arg3, arg4, arg5
49 ---------------------------------------------------------------------------------------------------------------------------------
50 0x3010000 HFSDBG_WRITE offset, uio_resid, ff_size, filebytes, 0 ... uio_offset, uio_resid, ff_size, filebytes, 0
51 offset, uio_resid, ff_size, filebytes, 0
52 0x301001C HFSDBG_TRUNCATE length, ff_size, filebytes, 0, 0 ... length, ff_size, filebytes, retval, 0
53 length, ff_size, filebytes, 0, 0
54 0x3010030 HFSDBG_READ uio_offset, uio_resid, filesize, filebytes, 0 ... uio_offset, uio_resid, filesize, filebytes, 0
55 0x3010094 HFSDBG_GETNEWVNODE c_vp, c_rsrc_vp, 0, 0, 0
56 0x3018000 HFSDBG_UPDATE vp, tstate, 0, 0, 0 ... vp, tstate, error, 0/-1, 0
57 0 HFSDBG_UNMAP_FREE startBlock, blockCount, 0, 0, 0 ... err, 0, 0, 0, 0
58 1 HFSDBG_UNMAP_ALLOC startBlock, blockCount, 0, 0, 0 ... err, 0, 0, 0, 0
59 2 HFSDBG_UNMAP_CALLBACK 0, extentCount, 0, 0, 0 ... 0, 0, 0, 0, 0
60 3 unused
61 4 HFSDBG_BLOCK_ALLOCATE startBlock, minBlocks, maxBlocks, flags, 0 ... err, actualStartBlock, actualBlockCount, 0, 0
62 5 HFSDBG_BLOCK_DEALLOCATE startBlock, blockCount, flags, 0, 0 ... err, 0, 0, 0, 0
63 6 HFSDBG_READ_BITMAP_BLOCK startBlock, 0, 0, 0, 0 ... err, 0, 0, 0, 0
64 7 HFSDBG_RELEASE_BITMAP_BLOCK dirty, 0, 0, 0, 0 ... 0, 0, 0, 0, 0
65 8 HFSDBG_ALLOC_CONTIG_BITMAP startBlock, minBlocks, maxBlocks, useMeta, 0 ... err, actualStartBlock, actualBlockCount, 0, 0
66 9 HFSDBG_ALLOC_ANY_BITMAP startBlock, endBlock, maxBlocks, useMeta, 0 ... err, actualStartBlock, actualBlockCount, 0, 0
67 10 HFSDBG_ALLOC_KNOWN_BITMAP 0, 0, maxBlocks, 0, 0 ... err, actualStartBlock, actualBlockCount, 0, 0
68 11 HFSDBG_MARK_ALLOC_BITMAP startBlock, blockCount, 0, 0, 0 ... err, 0, 0, 0, 0
69 12 HFSDBG_MARK_FREE_BITMAP startBlock, blockCount, valid, 0, 0 ... err, 0, 0, 0, 0
70 13 HFSDBG_BLOCK_FIND_CONTIG startBlock, endBlock, minBlocks, maxBlocks, 0 ... err, actualStartBlock, actualBlockCount, 0, 0
71 14 HFSDBG_IS_ALLOCATED startBlock, blockCount, stop, 0, 0 ... err, 0, actualBlockCount, 0, 0
72 15 unused
73 16 HFSDBG_RESET_EXTENT_CACHE 0, 0, 0, 0, 0 ... 0, 0, 0, 0, 0
74 17 HFSDBG_REMOVE_EXTENT_CACHE startBlock, blockCount, vcbFreeExtCnt, 0, 0 ... 0, 0, vcbFreeExtCnt, extentsRemoved, 0
75 18 HFSDBG_ADD_EXTENT_CACHE startBlock, blockCount, vcbFreeExtCnt, 0, 0 ... 0, 0, vcbFreeExtCnt, retval, 0
76 19 HFSDBG_READ_BITMAP_RANGE startBlock, iosize, 0, 0, 0 ... err, 0, 0, 0, 0
77 20 HFSDBG_RELEASE_SCAN_BITMAP 0, 0, 0, 0, 0 ... 0, 0, 0, 0, 0
78 21 HFSDBG_SYNCER hfsmp, now, mnt_last_write_completed_timestamp, mnt_pending_write_size, 0 ... err, deadline, 0, 0, 0
79 22 HFSDBG_SYNCER_TIMED now, last_write_completed, hfs_mp->mnt_last_write_issued_timestamp, mnt_pending_write_size, 0 ... now, mnt_last_write_completed_timestamp, mnt_last_write_issued_timestamp, hfs_mp->mnt_pending_write_size, 0
80 23 HFSDBG_UNMAP_SCAN hfs_raw_dev, 0, 0, 0, 0 ... hfs_raw_dev, error, 0, 0, 0
81 24 HFSDBG_UNMAP_TRIM hfs_raw_dev, 0, 0, 0, 0 ... hfs_raw_dev, error, 0, 0, 0
82 */