44fda11460
This patch adds a tracepoint for transaction events of nilfs. With the tracepoint, these events can be tracked: begin, abort, commit, trylock, lock, and unlock. Basically, these events have corresponding functions e.g. begin event corresponds nilfs_transaction_begin(). The unlock event is an exception. It corresponds to the iteration in nilfs_transaction_lock(). Only one tracepoint is introcued: nilfs2_transaction_transition. The above events are distinguished with newly introduced enum. With this tracepoint, we can analyse a critical section of segment constructoin. Sample output by tpoint of perf-tools: cp-4457 [000] ...1 63.266220: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 1 flags = 9 state = BEGIN cp-4457 [000] ...1 63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT cp-4457 [000] ...1 63.266221: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800bf5ccc58 count = 0 flags = 9 state = COMMIT segctord-4371 [001] ...1 68.261196: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK segctord-4371 [001] ...1 68.261280: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = LOCK segctord-4371 [001] ...1 68.261877: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 1 flags = 10 state = BEGIN segctord-4371 [001] ...1 68.262116: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = COMMIT segctord-4371 [001] ...1 68.265032: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 18 state = UNLOCK segctord-4371 [001] ...1 132.376847: nilfs2_transaction_transition: sb = ffff8802112b8800 ti = ffff8800b889bdf8 count = 0 flags = 10 state = TRYLOCK This patch also does trivial cleaning of comma usage in collection stage transition event for consistent coding style. Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
9p.h | ||
asoc.h | ||
bcache.h | ||
block.h | ||
btrfs.h | ||
clk.h | ||
cma.h | ||
compaction.h | ||
context_tracking.h | ||
ext4.h | ||
f2fs.h | ||
fence.h | ||
fib.h | ||
filelock.h | ||
filemap.h | ||
gfpflags.h | ||
gpio.h | ||
host1x.h | ||
hswadsp.h | ||
i2c.h | ||
intel-sst.h | ||
iommu.h | ||
ipi.h | ||
irq.h | ||
jbd2.h | ||
kmem.h | ||
kvm.h | ||
libata.h | ||
lock.h | ||
mce.h | ||
migrate.h | ||
module.h | ||
napi.h | ||
net.h | ||
nilfs2.h | ||
nmi.h | ||
oom.h | ||
pagemap.h | ||
power_cpu_migrate.h | ||
power.h | ||
printk.h | ||
random.h | ||
rcu.h | ||
regulator.h | ||
rpm.h | ||
sched.h | ||
scsi.h | ||
signal.h | ||
skb.h | ||
sock.h | ||
spi.h | ||
spmi.h | ||
sunrpc.h | ||
swiotlb.h | ||
syscalls.h | ||
target.h | ||
task.h | ||
thermal_power_allocator.h | ||
thermal.h | ||
thp.h | ||
timer.h | ||
tlb.h | ||
udp.h | ||
v4l2.h | ||
vb2.h | ||
vmscan.h | ||
workqueue.h | ||
writeback.h | ||
xen.h |