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