• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/system/bin/sh
2
3TRACE=/sys/kernel/debug/tracing/
4dev=$(((8<<20) + 17)) # sdb1 (8,17)
5
6echo 1 > $TRACE/tracing_on
7
8# mmc tracepoints
9echo 0 > $TRACE/events/mmc/enable
10
11# block tracepoints
12#echo "dev == $dev" > $TRACE/events/block/block_rq_complete/filter
13echo 0 > $TRACE/events/block/block_rq_complete/enable
14echo 0 > $TRACE/events/block/block_bio_complete/enable
15
16# GC
17G=0
18echo $G > $TRACE/events/f2fs/f2fs_get_victim/enable
19
20# block allocation
21A=0
22echo $A > $TRACE/events/f2fs/f2fs_reserve_new_block/enable
23
24# block truncation
25T=0
26echo $T > $TRACE/events/f2fs/f2fs_truncate/enable
27echo $T > $TRACE/events/f2fs/f2fs_truncate_inode_blocks_enter/enable
28echo $T > $TRACE/events/f2fs/f2fs_truncate_inode_blocks_exit/enable
29echo $T > $TRACE/events/f2fs/f2fs_truncate_blocks_enter/enable
30echo $T > $TRACE/events/f2fs/f2fs_truncate_blocks_exit/enable
31echo $T > $TRACE/events/f2fs/f2fs_truncate_nodes_enter/enable
32echo $T > $TRACE/events/f2fs/f2fs_truncate_nodes_exit/enable
33echo $T > $TRACE/events/f2fs/f2fs_truncate_data_blocks_range/enable
34echo $T > $TRACE/events/f2fs/f2fs_truncate_node/enable
35echo $T > $TRACE/events/f2fs/f2fs_truncate_partial_nodes/enable
36
37# syscalls
38S=0
39echo $S > $TRACE/events/f2fs/f2fs_unlink_enter/enable
40echo $S > $TRACE/events/f2fs/f2fs_unlink_exit/enable
41echo $S > $TRACE/events/f2fs/f2fs_fallocate/enable
42echo $S > $TRACE/events/f2fs/f2fs_get_data_block/enable
43
44# IOs
45R=0
46W=0
47echo $R > $TRACE/events/f2fs/f2fs_readpage/enable
48echo $W > $TRACE/events/f2fs/f2fs_writepage/enable
49echo $W > $TRACE/events/f2fs/f2fs_write_begin/enable
50echo $W > $TRACE/events/f2fs/f2fs_write_end/enable
51
52echo 0 > $TRACE/events/f2fs/f2fs_submit_page_bio/enable
53echo 0 > $TRACE/events/f2fs/f2fs_submit_page_mbio/enable
54echo $R > $TRACE/events/f2fs/f2fs_submit_read_bio/enable
55echo $W > $TRACE/events/f2fs/f2fs_submit_write_bio/enable
56
57echo 0 > $TRACE/events/f2fs/f2fs_issue_discard/enable
58echo 0 > $TRACE/events/f2fs/f2fs_issue_flush/enable
59
60# VFS interfaces
61V=0
62echo $V > $TRACE/events/f2fs/f2fs_iget/enable
63echo $V > $TRACE/events/f2fs/f2fs_iget_exit/enable
64echo $V > $TRACE/events/f2fs/f2fs_new_inode/enable
65echo $V > $TRACE/events/f2fs/f2fs_evict_inode/enable
66echo $V > $TRACE/events/f2fs/f2fs_sync_file_enter/enable
67echo $V > $TRACE/events/f2fs/f2fs_sync_file_exit/enable
68echo $V > $TRACE/events/f2fs/f2fs_write_checkpoint/enable
69echo $V > $TRACE/events/f2fs/f2fs_sync_fs/enable
70
71cat $TRACE/trace_pipe
72