diff --git a/xfs/parse.go b/xfs/parse.go index adf56a42..a337c68f 100644 --- a/xfs/parse.go +++ b/xfs/parse.go @@ -47,13 +47,19 @@ func ParseStats(r io.Reader) (*Stats, error) { fieldAbtc2 = "abtc2" fieldBmbt2 = "bmbt2" fieldIbt2 = "ibt2" - //fieldFibt2 = "fibt2" - fieldQm = "qm" - fieldDebug = "debug" - // Unimplemented at this time due to lack of documentation. - //fieldRmapbt = "rmapbt" - //fieldRefcntbt = "refcntbt" - + fieldFibt2 = "fibt2" + fieldRmapbt = "rmapbt" + fieldRefcntbt = "refcntbt" + fieldRmapbtMem = "rmapbt_mem" + fieldRcbagbt = "rcbagbt" + fieldRtrmapbt = "rtrmapbt" + fieldRtrmapbtMem = "rtrmapbt_mem" + fieldRtrefcntbt = "rtrefcntbt" + fieldQm = "qm" + fieldDebug = "debug" + fieldZoned = "zoned" + fieldMetaFile = "metafile" + fieldDeferRelog = "defer_relog" ) var xfss Stats @@ -63,12 +69,26 @@ func ParseStats(r io.Reader) (*Stats, error) { // Expect at least a string label and a single integer value, ex: // - abt 0 // - rw 1 2 + // - gc xpc 123 (two-word label) ss := strings.Fields(string(s.Bytes())) if len(ss) < 2 { continue } label := ss[0] + // Special case: "gc xpc" is a two-word label in the kernel output. + if label == "gc" && len(ss) >= 3 && ss[1] == "xpc" { + us, err := util.ParseUint64s(ss[2:]) + if err != nil { + return nil, err + } + xfss.GcXpc, err = gcXpcStats(us) + if err != nil { + return nil, err + } + continue + } + // Extended precision counters are uint64 values. if label == fieldXpc { us, err := util.ParseUint64s(ss[1:]) @@ -84,6 +104,19 @@ func ParseStats(r io.Reader) (*Stats, error) { continue } + // Defer relog counter is a single uint64 value. + if label == fieldDeferRelog { + us, err := util.ParseUint64s(ss[1:]) + if err != nil { + return nil, err + } + xfss.DeferRelog, err = deferRelogStats(us) + if err != nil { + return nil, err + } + continue + } + // All other counters are uint32 values. us, err := util.ParseUint32s(ss[1:]) if err != nil { @@ -129,11 +162,30 @@ func ParseStats(r io.Reader) (*Stats, error) { xfss.BtreeBlockMap2, err = btreeBlockMap2Stats(us) case fieldIbt2: xfss.BtreeInode2, err = btreeInode2Stats(us) - //case fieldFibt2: + case fieldFibt2: + xfss.BtreeFreeInode2, err = btreeFreeInode2Stats(us) + case fieldRmapbt: + xfss.BtreeReverseMap, err = btreeReverseMapStats(us) + case fieldRefcntbt: + xfss.BtreeRefCount, err = btreeRefCountStats(us) + case fieldRmapbtMem: + xfss.BtreeReverseMapMem, err = btreeReverseMapMemStats(us) + case fieldRcbagbt: + xfss.BtreeRcbag, err = btreeRcbagStats(us) + case fieldRtrmapbt: + xfss.BtreeRtReverseMap, err = btreeRtReverseMapStats(us) + case fieldRtrmapbtMem: + xfss.BtreeRtReverseMapMem, err = btreeRtReverseMapMemStats(us) + case fieldRtrefcntbt: + xfss.BtreeRtRefCount, err = btreeRtRefCountStats(us) case fieldQm: xfss.QuotaManager, err = quotaManagerStats(us) case fieldDebug: xfss.Debug, err = debugStats(us) + case fieldZoned: + xfss.Zoned, err = zonedStats(us) + case fieldMetaFile: + xfss.MetaFile, err = metaFileStats(us) } if err != nil { return nil, err @@ -516,3 +568,249 @@ func btreeInode2Stats(us []uint32) (BtreeInode2Stats, error) { Moves: us[14], }, nil } + +// btreeFreeInode2Stats handles fibt2 stats. +func btreeFreeInode2Stats(us []uint32) (BtreeFreeInode2Stats, error) { + if l := len(us); l != 15 { + return BtreeFreeInode2Stats{}, fmt.Errorf("incorrect number of values for fibt2 stats: %d", l) + } + + return BtreeFreeInode2Stats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeReverseMapStats handles rmapbt stats. +func btreeReverseMapStats(us []uint32) (BtreeReverseMapStats, error) { + if l := len(us); l != 15 { + return BtreeReverseMapStats{}, fmt.Errorf("incorrect number of values for rmapbt stats: %d", l) + } + + return BtreeReverseMapStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeRefCountStats handles refcntbt stats. +func btreeRefCountStats(us []uint32) (BtreeRefCountStats, error) { + if l := len(us); l != 15 { + return BtreeRefCountStats{}, fmt.Errorf("incorrect number of values for refcntbt stats: %d", l) + } + + return BtreeRefCountStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeReverseMapMemStats handles rmapbt_mem stats. +func btreeReverseMapMemStats(us []uint32) (BtreeReverseMapMemStats, error) { + if l := len(us); l != 15 { + return BtreeReverseMapMemStats{}, fmt.Errorf("incorrect number of values for rmapbt_mem stats: %d", l) + } + + return BtreeReverseMapMemStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeRcbagStats handles rcbagbt stats. +func btreeRcbagStats(us []uint32) (BtreeRcbagStats, error) { + if l := len(us); l != 15 { + return BtreeRcbagStats{}, fmt.Errorf("incorrect number of values for rcbagbt stats: %d", l) + } + + return BtreeRcbagStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeRtReverseMapStats handles rtrmapbt stats. +func btreeRtReverseMapStats(us []uint32) (BtreeRtReverseMapStats, error) { + if l := len(us); l != 15 { + return BtreeRtReverseMapStats{}, fmt.Errorf("incorrect number of values for rtrmapbt stats: %d", l) + } + + return BtreeRtReverseMapStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeRtReverseMapMemStats handles rtrmapbt_mem stats. +func btreeRtReverseMapMemStats(us []uint32) (BtreeRtReverseMapMemStats, error) { + if l := len(us); l != 15 { + return BtreeRtReverseMapMemStats{}, fmt.Errorf("incorrect number of values for rtrmapbt_mem stats: %d", l) + } + + return BtreeRtReverseMapMemStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// btreeRtRefCountStats handles rtrefcntbt stats. +func btreeRtRefCountStats(us []uint32) (BtreeRtRefCountStats, error) { + if l := len(us); l != 15 { + return BtreeRtRefCountStats{}, fmt.Errorf("incorrect number of values for rtrefcntbt stats: %d", l) + } + + return BtreeRtRefCountStats{ + Lookup: us[0], + Compare: us[1], + Insrec: us[2], + Delrec: us[3], + NewRoot: us[4], + KillRoot: us[5], + Increment: us[6], + Decrement: us[7], + Lshift: us[8], + Rshift: us[9], + Split: us[10], + Join: us[11], + Alloc: us[12], + Free: us[13], + Moves: us[14], + }, nil +} + +// zonedStats handles zoned stats. +func zonedStats(us []uint32) (ZonedStats, error) { + if l := len(us); l != 2 { + return ZonedStats{}, fmt.Errorf("incorrect number of values for zoned stats: %d", l) + } + + return ZonedStats{ + GcReadCalls: us[0], + GcBytes: us[1], + }, nil +} + +// metaFileStats handles metafile stats. +func metaFileStats(us []uint32) (MetaFileStats, error) { + if l := len(us); l != 2 { + return MetaFileStats{}, fmt.Errorf("incorrect number of values for metafile stats: %d", l) + } + + return MetaFileStats{ + Inodes: us[0], + Meta: us[1], + }, nil +} + +// deferRelogStats handles defer_relog stats. +func deferRelogStats(us []uint64) (DeferRelogStats, error) { + if l := len(us); l != 1 { + return DeferRelogStats{}, fmt.Errorf("incorrect number of values for XFS defer_relog stats: %d", l) + } + + return DeferRelogStats{ + Count: us[0], + }, nil +} + +// gcXpcStats handles gc xpc stats. +func gcXpcStats(us []uint64) (GcXpcStats, error) { + if l := len(us); l != 1 { + return GcXpcStats{}, fmt.Errorf("incorrect number of values for XFS gc xpc stats: %d", l) + } + + return GcXpcStats{ + Bytes: us[0], + }, nil +} diff --git a/xfs/parse_test.go b/xfs/parse_test.go index 069b9650..dcf38c79 100644 --- a/xfs/parse_test.go +++ b/xfs/parse_test.go @@ -519,6 +519,288 @@ func TestParseStats(t *testing.T) { }, }, }, + { + name: "fibt2 bad", + s: "fibt2 1 2 3 4 5 6", + invalid: true, + }, + { + name: "fibt2 OK", + s: "fibt2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeFreeInode2: xfs.BtreeFreeInode2Stats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rmapbt bad", + s: "rmapbt 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rmapbt OK", + s: "rmapbt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeReverseMap: xfs.BtreeReverseMapStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "refcntbt bad", + s: "refcntbt 1 2 3 4 5 6", + invalid: true, + }, + { + name: "refcntbt OK", + s: "refcntbt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeRefCount: xfs.BtreeRefCountStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rmapbt_mem bad", + s: "rmapbt_mem 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rmapbt_mem OK", + s: "rmapbt_mem 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeReverseMapMem: xfs.BtreeReverseMapMemStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rcbagbt bad", + s: "rcbagbt 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rcbagbt OK", + s: "rcbagbt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeRcbag: xfs.BtreeRcbagStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rtrmapbt bad", + s: "rtrmapbt 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rtrmapbt OK", + s: "rtrmapbt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeRtReverseMap: xfs.BtreeRtReverseMapStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rtrmapbt_mem bad", + s: "rtrmapbt_mem 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rtrmapbt_mem OK", + s: "rtrmapbt_mem 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeRtReverseMapMem: xfs.BtreeRtReverseMapMemStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "rtrefcntbt bad", + s: "rtrefcntbt 1 2 3 4 5 6", + invalid: true, + }, + { + name: "rtrefcntbt OK", + s: "rtrefcntbt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15", + stats: &xfs.Stats{ + BtreeRtRefCount: xfs.BtreeRtRefCountStats{ + Lookup: 1, + Compare: 2, + Insrec: 3, + Delrec: 4, + NewRoot: 5, + KillRoot: 6, + Increment: 7, + Decrement: 8, + Lshift: 9, + Rshift: 10, + Split: 11, + Join: 12, + Alloc: 13, + Free: 14, + Moves: 15, + }, + }, + }, + { + name: "zoned bad", + s: "zoned 1", + invalid: true, + }, + { + name: "zoned OK", + s: "zoned 1 2", + stats: &xfs.Stats{ + Zoned: xfs.ZonedStats{ + GcReadCalls: 1, + GcBytes: 2, + }, + }, + }, + { + name: "metafile bad", + s: "metafile 1", + invalid: true, + }, + { + name: "metafile OK", + s: "metafile 1 2", + stats: &xfs.Stats{ + MetaFile: xfs.MetaFileStats{ + Inodes: 1, + Meta: 2, + }, + }, + }, + { + name: "defer_relog bad", + s: "defer_relog 1 2", + invalid: true, + }, + { + name: "defer_relog OK", + s: "defer_relog 42", + stats: &xfs.Stats{ + DeferRelog: xfs.DeferRelogStats{ + Count: 42, + }, + }, + }, + { + name: "gc xpc bad uint64", + s: "gc xpc abc", + invalid: true, + }, + { + name: "gc xpc OK", + s: "gc xpc 999", + stats: &xfs.Stats{ + GcXpc: xfs.GcXpcStats{ + Bytes: 999, + }, + }, + }, { name: "fixtures OK", fs: true, @@ -718,6 +1000,168 @@ func TestParseStats(t *testing.T) { Free: 0, Moves: 0, }, + + BtreeFreeInode2: xfs.BtreeFreeInode2Stats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeReverseMap: xfs.BtreeReverseMapStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeRefCount: xfs.BtreeRefCountStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeReverseMapMem: xfs.BtreeReverseMapMemStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeRcbag: xfs.BtreeRcbagStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeRtReverseMap: xfs.BtreeRtReverseMapStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeRtReverseMapMem: xfs.BtreeRtReverseMapMemStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + BtreeRtRefCount: xfs.BtreeRtRefCountStats{ + Lookup: 0, + Compare: 0, + Insrec: 0, + Delrec: 0, + NewRoot: 0, + KillRoot: 0, + Increment: 0, + Decrement: 0, + Lshift: 0, + Rshift: 0, + Split: 0, + Join: 0, + Alloc: 0, + Free: 0, + Moves: 0, + }, + + Zoned: xfs.ZonedStats{ + GcReadCalls: 0, + GcBytes: 0, + }, + + MetaFile: xfs.MetaFileStats{ + Inodes: 0, + Meta: 0, + }, + + DeferRelog: xfs.DeferRelogStats{ + Count: 0, + }, + + GcXpc: xfs.GcXpcStats{ + Bytes: 0, + }, }, }, } diff --git a/xfs/xfs.go b/xfs/xfs.go index 7daa358e..5863e26e 100644 --- a/xfs/xfs.go +++ b/xfs/xfs.go @@ -35,28 +35,40 @@ type Stats struct { // filesystems on the host. Name string - ExtentAllocation ExtentAllocationStats - AllocationBTree BTreeStats - BlockMapping BlockMappingStats - BlockMapBTree BTreeStats - DirectoryOperation DirectoryOperationStats - Transaction TransactionStats - InodeOperation InodeOperationStats - LogOperation LogOperationStats - ReadWrite ReadWriteStats - AttributeOperation AttributeOperationStats - InodeClustering InodeClusteringStats - Vnode VnodeStats - Buffer BufferStats - ExtendedPrecision ExtendedPrecisionStats - Xstrat XstratStats // xstrat - PushAil PushAilStats // push_ail - Debug DebugStats // debug - QuotaManager QuotaManagerStats // qm - BtreeAllocBlocks2 BtreeAllocBlocks2Stats // abtb2 - BtreeAllocContig2 BtreeAllocContig2Stats // abtc2 - BtreeBlockMap2 BtreeBlockMap2Stats // bmbt2 - BtreeInode2 BtreeInode2Stats // ibt2 + ExtentAllocation ExtentAllocationStats // extent_alloc + AllocationBTree BTreeStats // abt + BlockMapping BlockMappingStats // blk_map + BlockMapBTree BTreeStats // bmbt + DirectoryOperation DirectoryOperationStats // dir + Transaction TransactionStats // trans + InodeOperation InodeOperationStats // ig + LogOperation LogOperationStats // log + ReadWrite ReadWriteStats // rw + AttributeOperation AttributeOperationStats // attr + InodeClustering InodeClusteringStats // icluster + Vnode VnodeStats // vnodes + Buffer BufferStats // buf + ExtendedPrecision ExtendedPrecisionStats // xpc + Xstrat XstratStats // xstrat + PushAil PushAilStats // push_ail + Debug DebugStats // debug + QuotaManager QuotaManagerStats // qm + BtreeAllocBlocks2 BtreeAllocBlocks2Stats // abtb2 + BtreeAllocContig2 BtreeAllocContig2Stats // abtc2 + BtreeBlockMap2 BtreeBlockMap2Stats // bmbt2 + BtreeInode2 BtreeInode2Stats // ibt2 + BtreeFreeInode2 BtreeFreeInode2Stats // fibt2 + BtreeReverseMap BtreeReverseMapStats // rmapbt + BtreeRefCount BtreeRefCountStats // refcntbt + BtreeReverseMapMem BtreeReverseMapMemStats // rmapbt_mem + BtreeRcbag BtreeRcbagStats // rcbagbt + BtreeRtReverseMap BtreeRtReverseMapStats // rtrmapbt + BtreeRtReverseMapMem BtreeRtReverseMapMemStats // rtrmapbt_mem + BtreeRtRefCount BtreeRtRefCountStats // rtrefcntbt + Zoned ZonedStats // zoned + MetaFile MetaFileStats // metafile + DeferRelog DeferRelogStats // defer_relog + GcXpc GcXpcStats // gc xpc } // ExtentAllocationStats contains statistics regarding XFS extent allocations. @@ -292,6 +304,180 @@ type BtreeInode2Stats struct { Moves uint32 } +// BtreeFreeInode2Stats contain statistics on B-tree v2 free inode allocations. +type BtreeFreeInode2Stats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeReverseMapStats contain statistics on B-tree reverse mapping record operations. +type BtreeReverseMapStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeRefCountStats contain statistics on B-tree reference count record operations. +type BtreeRefCountStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeReverseMapMemStats contain statistics on B-tree reverse mapping in-memory record operations. +type BtreeReverseMapMemStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeRcbagStats contain statistics on B-tree rcbag record operations. +type BtreeRcbagStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeRtReverseMapStats contain statistics on B-tree realtime reverse mapping record operations. +type BtreeRtReverseMapStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeRtReverseMapMemStats contain statistics on B-tree realtime reverse mapping in-memory record operations. +type BtreeRtReverseMapMemStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// BtreeRtRefCountStats contain statistics on B-tree realtime reference count record operations. +type BtreeRtRefCountStats struct { + Lookup uint32 + Compare uint32 + Insrec uint32 + Delrec uint32 + NewRoot uint32 + KillRoot uint32 + Increment uint32 + Decrement uint32 + Lshift uint32 + Rshift uint32 + Split uint32 + Join uint32 + Alloc uint32 + Free uint32 + Moves uint32 +} + +// ZonedStats contain statistics on zoned garbage collection operations. +type ZonedStats struct { + GcReadCalls uint32 + GcBytes uint32 +} + +// MetaFileStats contain statistics on metafile inode operations. +type MetaFileStats struct { + Inodes uint32 + Meta uint32 +} + +// DeferRelogStats contains the deferred buffer relog count. +type DeferRelogStats struct { + Count uint64 +} + +// GcXpcStats contains extended precision bytes for garbage collection. +type GcXpcStats struct { + Bytes uint64 +} + // FS represents the pseudo-filesystems proc and sys, which provides an interface to // kernel data structures. type FS struct {