1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624 |
- /* SPDX-License-Identifier: GPL-2.0 */
- #undef TRACE_SYSTEM
- #define TRACE_SYSTEM f2fs
- #if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
- #define _TRACE_F2FS_H
- #include <linux/tracepoint.h>
- #define show_dev(dev) MAJOR(dev), MINOR(dev)
- #define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino
- TRACE_DEFINE_ENUM(NODE);
- TRACE_DEFINE_ENUM(DATA);
- TRACE_DEFINE_ENUM(META);
- TRACE_DEFINE_ENUM(META_FLUSH);
- TRACE_DEFINE_ENUM(INMEM);
- TRACE_DEFINE_ENUM(INMEM_DROP);
- TRACE_DEFINE_ENUM(INMEM_INVALIDATE);
- TRACE_DEFINE_ENUM(INMEM_REVOKE);
- TRACE_DEFINE_ENUM(IPU);
- TRACE_DEFINE_ENUM(OPU);
- TRACE_DEFINE_ENUM(HOT);
- TRACE_DEFINE_ENUM(WARM);
- TRACE_DEFINE_ENUM(COLD);
- TRACE_DEFINE_ENUM(CURSEG_HOT_DATA);
- TRACE_DEFINE_ENUM(CURSEG_WARM_DATA);
- TRACE_DEFINE_ENUM(CURSEG_COLD_DATA);
- TRACE_DEFINE_ENUM(CURSEG_HOT_NODE);
- TRACE_DEFINE_ENUM(CURSEG_WARM_NODE);
- TRACE_DEFINE_ENUM(CURSEG_COLD_NODE);
- TRACE_DEFINE_ENUM(NO_CHECK_TYPE);
- TRACE_DEFINE_ENUM(GC_GREEDY);
- TRACE_DEFINE_ENUM(GC_CB);
- TRACE_DEFINE_ENUM(FG_GC);
- TRACE_DEFINE_ENUM(BG_GC);
- TRACE_DEFINE_ENUM(LFS);
- TRACE_DEFINE_ENUM(SSR);
- TRACE_DEFINE_ENUM(__REQ_RAHEAD);
- TRACE_DEFINE_ENUM(__REQ_SYNC);
- TRACE_DEFINE_ENUM(__REQ_IDLE);
- TRACE_DEFINE_ENUM(__REQ_PREFLUSH);
- TRACE_DEFINE_ENUM(__REQ_FUA);
- TRACE_DEFINE_ENUM(__REQ_PRIO);
- TRACE_DEFINE_ENUM(__REQ_META);
- TRACE_DEFINE_ENUM(CP_UMOUNT);
- TRACE_DEFINE_ENUM(CP_FASTBOOT);
- TRACE_DEFINE_ENUM(CP_SYNC);
- TRACE_DEFINE_ENUM(CP_RECOVERY);
- TRACE_DEFINE_ENUM(CP_DISCARD);
- TRACE_DEFINE_ENUM(CP_TRIMMED);
- #define show_block_type(type) \
- __print_symbolic(type, \
- { NODE, "NODE" }, \
- { DATA, "DATA" }, \
- { META, "META" }, \
- { META_FLUSH, "META_FLUSH" }, \
- { INMEM, "INMEM" }, \
- { INMEM_DROP, "INMEM_DROP" }, \
- { INMEM_INVALIDATE, "INMEM_INVALIDATE" }, \
- { INMEM_REVOKE, "INMEM_REVOKE" }, \
- { IPU, "IN-PLACE" }, \
- { OPU, "OUT-OF-PLACE" })
- #define show_block_temp(temp) \
- __print_symbolic(temp, \
- { HOT, "HOT" }, \
- { WARM, "WARM" }, \
- { COLD, "COLD" })
- #define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_META | REQ_PRIO | \
- REQ_PREFLUSH | REQ_FUA)
- #define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS)
- #define show_bio_type(op,op_flags) show_bio_op(op), \
- show_bio_op_flags(op_flags)
- #define show_bio_op(op) \
- __print_symbolic(op, \
- { REQ_OP_READ, "READ" }, \
- { REQ_OP_WRITE, "WRITE" }, \
- { REQ_OP_FLUSH, "FLUSH" }, \
- { REQ_OP_DISCARD, "DISCARD" }, \
- { REQ_OP_ZONE_REPORT, "ZONE_REPORT" }, \
- { REQ_OP_SECURE_ERASE, "SECURE_ERASE" }, \
- { REQ_OP_ZONE_RESET, "ZONE_RESET" }, \
- { REQ_OP_WRITE_SAME, "WRITE_SAME" }, \
- { REQ_OP_WRITE_ZEROES, "WRITE_ZEROES" })
- #define show_bio_op_flags(flags) \
- __print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \
- { REQ_RAHEAD, "R" }, \
- { REQ_SYNC, "S" }, \
- { REQ_META, "M" }, \
- { REQ_PRIO, "P" }, \
- { REQ_PREFLUSH, "PF" }, \
- { REQ_FUA, "FUA" })
- #define show_data_type(type) \
- __print_symbolic(type, \
- { CURSEG_HOT_DATA, "Hot DATA" }, \
- { CURSEG_WARM_DATA, "Warm DATA" }, \
- { CURSEG_COLD_DATA, "Cold DATA" }, \
- { CURSEG_HOT_NODE, "Hot NODE" }, \
- { CURSEG_WARM_NODE, "Warm NODE" }, \
- { CURSEG_COLD_NODE, "Cold NODE" }, \
- { NO_CHECK_TYPE, "No TYPE" })
- #define show_file_type(type) \
- __print_symbolic(type, \
- { 0, "FILE" }, \
- { 1, "DIR" })
- #define show_gc_type(type) \
- __print_symbolic(type, \
- { FG_GC, "Foreground GC" }, \
- { BG_GC, "Background GC" })
- #define show_alloc_mode(type) \
- __print_symbolic(type, \
- { LFS, "LFS-mode" }, \
- { SSR, "SSR-mode" })
- #define show_victim_policy(type) \
- __print_symbolic(type, \
- { GC_GREEDY, "Greedy" }, \
- { GC_CB, "Cost-Benefit" })
- #define show_cpreason(type) \
- __print_flags(type, "|", \
- { CP_UMOUNT, "Umount" }, \
- { CP_FASTBOOT, "Fastboot" }, \
- { CP_SYNC, "Sync" }, \
- { CP_RECOVERY, "Recovery" }, \
- { CP_DISCARD, "Discard" }, \
- { CP_UMOUNT, "Umount" }, \
- { CP_TRIMMED, "Trimmed" })
- #define show_fsync_cpreason(type) \
- __print_symbolic(type, \
- { CP_NO_NEEDED, "no needed" }, \
- { CP_NON_REGULAR, "non regular" }, \
- { CP_HARDLINK, "hardlink" }, \
- { CP_SB_NEED_CP, "sb needs cp" }, \
- { CP_WRONG_PINO, "wrong pino" }, \
- { CP_NO_SPC_ROLL, "no space roll forward" }, \
- { CP_NODE_NEED_CP, "node needs cp" }, \
- { CP_FASTBOOT_MODE, "fastboot mode" }, \
- { CP_SPEC_LOG_NUM, "log type is 2" }, \
- { CP_RECOVER_DIR, "dir needs recovery" })
- struct victim_sel_policy;
- struct f2fs_map_blocks;
- DECLARE_EVENT_CLASS(f2fs__inode,
- TP_PROTO(struct inode *inode),
- TP_ARGS(inode),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, pino)
- __field(umode_t, mode)
- __field(loff_t, size)
- __field(unsigned int, nlink)
- __field(blkcnt_t, blocks)
- __field(__u8, advise)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pino = F2FS_I(inode)->i_pino;
- __entry->mode = inode->i_mode;
- __entry->nlink = inode->i_nlink;
- __entry->size = inode->i_size;
- __entry->blocks = inode->i_blocks;
- __entry->advise = F2FS_I(inode)->i_advise;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
- "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
- show_dev_ino(__entry),
- (unsigned long)__entry->pino,
- __entry->mode,
- __entry->size,
- (unsigned int)__entry->nlink,
- (unsigned long long)__entry->blocks,
- (unsigned char)__entry->advise)
- );
- DECLARE_EVENT_CLASS(f2fs__inode_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
- show_dev_ino(__entry),
- __entry->ret)
- );
- DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter,
- TP_PROTO(struct inode *inode),
- TP_ARGS(inode)
- );
- TRACE_EVENT(f2fs_sync_file_exit,
- TP_PROTO(struct inode *inode, int cp_reason, int datasync, int ret),
- TP_ARGS(inode, cp_reason, datasync, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, cp_reason)
- __field(int, datasync)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->cp_reason = cp_reason;
- __entry->datasync = datasync;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, cp_reason: %s, "
- "datasync = %d, ret = %d",
- show_dev_ino(__entry),
- show_fsync_cpreason(__entry->cp_reason),
- __entry->datasync,
- __entry->ret)
- );
- TRACE_EVENT(f2fs_sync_fs,
- TP_PROTO(struct super_block *sb, int wait),
- TP_ARGS(sb, wait),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(int, dirty)
- __field(int, wait)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY);
- __entry->wait = wait;
- ),
- TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
- show_dev(__entry->dev),
- __entry->dirty ? "dirty" : "not dirty",
- __entry->wait)
- );
- DEFINE_EVENT(f2fs__inode, f2fs_iget,
- TP_PROTO(struct inode *inode),
- TP_ARGS(inode)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
- TP_PROTO(struct inode *inode),
- TP_ARGS(inode)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- TRACE_EVENT(f2fs_unlink_enter,
- TP_PROTO(struct inode *dir, struct dentry *dentry),
- TP_ARGS(dir, dentry),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, size)
- __field(blkcnt_t, blocks)
- __field(const char *, name)
- ),
- TP_fast_assign(
- __entry->dev = dir->i_sb->s_dev;
- __entry->ino = dir->i_ino;
- __entry->size = dir->i_size;
- __entry->blocks = dir->i_blocks;
- __entry->name = dentry->d_name.name;
- ),
- TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
- "i_blocks = %llu, name = %s",
- show_dev_ino(__entry),
- __entry->size,
- (unsigned long long)__entry->blocks,
- __entry->name)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_drop_inode,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DEFINE_EVENT(f2fs__inode, f2fs_truncate,
- TP_PROTO(struct inode *inode),
- TP_ARGS(inode)
- );
- TRACE_EVENT(f2fs_truncate_data_blocks_range,
- TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
- TP_ARGS(inode, nid, ofs, free),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(nid_t, nid)
- __field(unsigned int, ofs)
- __field(int, free)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->nid = nid;
- __entry->ofs = ofs;
- __entry->free = free;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
- show_dev_ino(__entry),
- (unsigned int)__entry->nid,
- __entry->ofs,
- __entry->free)
- );
- DECLARE_EVENT_CLASS(f2fs__truncate_op,
- TP_PROTO(struct inode *inode, u64 from),
- TP_ARGS(inode, from),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, size)
- __field(blkcnt_t, blocks)
- __field(u64, from)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->size = inode->i_size;
- __entry->blocks = inode->i_blocks;
- __entry->from = from;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
- "start file offset = %llu",
- show_dev_ino(__entry),
- __entry->size,
- (unsigned long long)__entry->blocks,
- (unsigned long long)__entry->from)
- );
- DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter,
- TP_PROTO(struct inode *inode, u64 from),
- TP_ARGS(inode, from)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter,
- TP_PROTO(struct inode *inode, u64 from),
- TP_ARGS(inode, from)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DECLARE_EVENT_CLASS(f2fs__truncate_node,
- TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
- TP_ARGS(inode, nid, blk_addr),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(nid_t, nid)
- __field(block_t, blk_addr)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->nid = nid;
- __entry->blk_addr = blk_addr;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
- show_dev_ino(__entry),
- (unsigned int)__entry->nid,
- (unsigned long long)__entry->blk_addr)
- );
- DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter,
- TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
- TP_ARGS(inode, nid, blk_addr)
- );
- DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit,
- TP_PROTO(struct inode *inode, int ret),
- TP_ARGS(inode, ret)
- );
- DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node,
- TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
- TP_ARGS(inode, nid, blk_addr)
- );
- TRACE_EVENT(f2fs_truncate_partial_nodes,
- TP_PROTO(struct inode *inode, nid_t *nid, int depth, int err),
- TP_ARGS(inode, nid, depth, err),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(nid_t, nid[3])
- __field(int, depth)
- __field(int, err)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->nid[0] = nid[0];
- __entry->nid[1] = nid[1];
- __entry->nid[2] = nid[2];
- __entry->depth = depth;
- __entry->err = err;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, "
- "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
- show_dev_ino(__entry),
- (unsigned int)__entry->nid[0],
- (unsigned int)__entry->nid[1],
- (unsigned int)__entry->nid[2],
- __entry->depth,
- __entry->err)
- );
- TRACE_EVENT(f2fs_map_blocks,
- TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int ret),
- TP_ARGS(inode, map, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(block_t, m_lblk)
- __field(block_t, m_pblk)
- __field(unsigned int, m_len)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->m_lblk = map->m_lblk;
- __entry->m_pblk = map->m_pblk;
- __entry->m_len = map->m_len;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
- "start blkaddr = 0x%llx, len = 0x%llx, err = %d",
- show_dev_ino(__entry),
- (unsigned long long)__entry->m_lblk,
- (unsigned long long)__entry->m_pblk,
- (unsigned long long)__entry->m_len,
- __entry->ret)
- );
- TRACE_EVENT(f2fs_background_gc,
- TP_PROTO(struct super_block *sb, unsigned int wait_ms,
- unsigned int prefree, unsigned int free),
- TP_ARGS(sb, wait_ms, prefree, free),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(unsigned int, wait_ms)
- __field(unsigned int, prefree)
- __field(unsigned int, free)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->wait_ms = wait_ms;
- __entry->prefree = prefree;
- __entry->free = free;
- ),
- TP_printk("dev = (%d,%d), wait_ms = %u, prefree = %u, free = %u",
- show_dev(__entry->dev),
- __entry->wait_ms,
- __entry->prefree,
- __entry->free)
- );
- TRACE_EVENT(f2fs_gc_begin,
- TP_PROTO(struct super_block *sb, bool sync, bool background,
- long long dirty_nodes, long long dirty_dents,
- long long dirty_imeta, unsigned int free_sec,
- unsigned int free_seg, int reserved_seg,
- unsigned int prefree_seg),
- TP_ARGS(sb, sync, background, dirty_nodes, dirty_dents, dirty_imeta,
- free_sec, free_seg, reserved_seg, prefree_seg),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(bool, sync)
- __field(bool, background)
- __field(long long, dirty_nodes)
- __field(long long, dirty_dents)
- __field(long long, dirty_imeta)
- __field(unsigned int, free_sec)
- __field(unsigned int, free_seg)
- __field(int, reserved_seg)
- __field(unsigned int, prefree_seg)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->sync = sync;
- __entry->background = background;
- __entry->dirty_nodes = dirty_nodes;
- __entry->dirty_dents = dirty_dents;
- __entry->dirty_imeta = dirty_imeta;
- __entry->free_sec = free_sec;
- __entry->free_seg = free_seg;
- __entry->reserved_seg = reserved_seg;
- __entry->prefree_seg = prefree_seg;
- ),
- TP_printk("dev = (%d,%d), sync = %d, background = %d, nodes = %lld, "
- "dents = %lld, imeta = %lld, free_sec:%u, free_seg:%u, "
- "rsv_seg:%d, prefree_seg:%u",
- show_dev(__entry->dev),
- __entry->sync,
- __entry->background,
- __entry->dirty_nodes,
- __entry->dirty_dents,
- __entry->dirty_imeta,
- __entry->free_sec,
- __entry->free_seg,
- __entry->reserved_seg,
- __entry->prefree_seg)
- );
- TRACE_EVENT(f2fs_gc_end,
- TP_PROTO(struct super_block *sb, int ret, int seg_freed,
- int sec_freed, long long dirty_nodes,
- long long dirty_dents, long long dirty_imeta,
- unsigned int free_sec, unsigned int free_seg,
- int reserved_seg, unsigned int prefree_seg),
- TP_ARGS(sb, ret, seg_freed, sec_freed, dirty_nodes, dirty_dents,
- dirty_imeta, free_sec, free_seg, reserved_seg, prefree_seg),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(int, ret)
- __field(int, seg_freed)
- __field(int, sec_freed)
- __field(long long, dirty_nodes)
- __field(long long, dirty_dents)
- __field(long long, dirty_imeta)
- __field(unsigned int, free_sec)
- __field(unsigned int, free_seg)
- __field(int, reserved_seg)
- __field(unsigned int, prefree_seg)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->ret = ret;
- __entry->seg_freed = seg_freed;
- __entry->sec_freed = sec_freed;
- __entry->dirty_nodes = dirty_nodes;
- __entry->dirty_dents = dirty_dents;
- __entry->dirty_imeta = dirty_imeta;
- __entry->free_sec = free_sec;
- __entry->free_seg = free_seg;
- __entry->reserved_seg = reserved_seg;
- __entry->prefree_seg = prefree_seg;
- ),
- TP_printk("dev = (%d,%d), ret = %d, seg_freed = %d, sec_freed = %d, "
- "nodes = %lld, dents = %lld, imeta = %lld, free_sec:%u, "
- "free_seg:%u, rsv_seg:%d, prefree_seg:%u",
- show_dev(__entry->dev),
- __entry->ret,
- __entry->seg_freed,
- __entry->sec_freed,
- __entry->dirty_nodes,
- __entry->dirty_dents,
- __entry->dirty_imeta,
- __entry->free_sec,
- __entry->free_seg,
- __entry->reserved_seg,
- __entry->prefree_seg)
- );
- TRACE_EVENT(f2fs_get_victim,
- TP_PROTO(struct super_block *sb, int type, int gc_type,
- struct victim_sel_policy *p, unsigned int pre_victim,
- unsigned int prefree, unsigned int free),
- TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(int, type)
- __field(int, gc_type)
- __field(int, alloc_mode)
- __field(int, gc_mode)
- __field(unsigned int, victim)
- __field(unsigned int, cost)
- __field(unsigned int, ofs_unit)
- __field(unsigned int, pre_victim)
- __field(unsigned int, prefree)
- __field(unsigned int, free)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->type = type;
- __entry->gc_type = gc_type;
- __entry->alloc_mode = p->alloc_mode;
- __entry->gc_mode = p->gc_mode;
- __entry->victim = p->min_segno;
- __entry->cost = p->min_cost;
- __entry->ofs_unit = p->ofs_unit;
- __entry->pre_victim = pre_victim;
- __entry->prefree = prefree;
- __entry->free = free;
- ),
- TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), "
- "victim = %u, cost = %u, ofs_unit = %u, "
- "pre_victim_secno = %d, prefree = %u, free = %u",
- show_dev(__entry->dev),
- show_data_type(__entry->type),
- show_gc_type(__entry->gc_type),
- show_alloc_mode(__entry->alloc_mode),
- show_victim_policy(__entry->gc_mode),
- __entry->victim,
- __entry->cost,
- __entry->ofs_unit,
- (int)__entry->pre_victim,
- __entry->prefree,
- __entry->free)
- );
- TRACE_EVENT(f2fs_lookup_start,
- TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
- TP_ARGS(dir, dentry, flags),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(const char *, name)
- __field(unsigned int, flags)
- ),
- TP_fast_assign(
- __entry->dev = dir->i_sb->s_dev;
- __entry->ino = dir->i_ino;
- __entry->name = dentry->d_name.name;
- __entry->flags = flags;
- ),
- TP_printk("dev = (%d,%d), pino = %lu, name:%s, flags:%u",
- show_dev_ino(__entry),
- __entry->name,
- __entry->flags)
- );
- TRACE_EVENT(f2fs_lookup_end,
- TP_PROTO(struct inode *dir, struct dentry *dentry, nid_t ino,
- int err),
- TP_ARGS(dir, dentry, ino, err),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(const char *, name)
- __field(nid_t, cino)
- __field(int, err)
- ),
- TP_fast_assign(
- __entry->dev = dir->i_sb->s_dev;
- __entry->ino = dir->i_ino;
- __entry->name = dentry->d_name.name;
- __entry->cino = ino;
- __entry->err = err;
- ),
- TP_printk("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d",
- show_dev_ino(__entry),
- __entry->name,
- __entry->cino,
- __entry->err)
- );
- TRACE_EVENT(f2fs_readdir,
- TP_PROTO(struct inode *dir, loff_t start_pos, loff_t end_pos, int err),
- TP_ARGS(dir, start_pos, end_pos, err),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, start)
- __field(loff_t, end)
- __field(int, err)
- ),
- TP_fast_assign(
- __entry->dev = dir->i_sb->s_dev;
- __entry->ino = dir->i_ino;
- __entry->start = start_pos;
- __entry->end = end_pos;
- __entry->err = err;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, start_pos:%llu, end_pos:%llu, err:%d",
- show_dev_ino(__entry),
- __entry->start,
- __entry->end,
- __entry->err)
- );
- TRACE_EVENT(f2fs_fallocate,
- TP_PROTO(struct inode *inode, int mode,
- loff_t offset, loff_t len, int ret),
- TP_ARGS(inode, mode, offset, len, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, mode)
- __field(loff_t, offset)
- __field(loff_t, len)
- __field(loff_t, size)
- __field(blkcnt_t, blocks)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->mode = mode;
- __entry->offset = offset;
- __entry->len = len;
- __entry->size = inode->i_size;
- __entry->blocks = inode->i_blocks;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
- "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
- show_dev_ino(__entry),
- __entry->mode,
- (unsigned long long)__entry->offset,
- (unsigned long long)__entry->len,
- (unsigned long long)__entry->size,
- (unsigned long long)__entry->blocks,
- __entry->ret)
- );
- TRACE_EVENT(f2fs_direct_IO_enter,
- TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
- TP_ARGS(inode, offset, len, rw),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, pos)
- __field(unsigned long, len)
- __field(int, rw)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pos = offset;
- __entry->len = len;
- __entry->rw = rw;
- ),
- TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d",
- show_dev_ino(__entry),
- __entry->pos,
- __entry->len,
- __entry->rw)
- );
- TRACE_EVENT(f2fs_direct_IO_exit,
- TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
- int rw, int ret),
- TP_ARGS(inode, offset, len, rw, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, pos)
- __field(unsigned long, len)
- __field(int, rw)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pos = offset;
- __entry->len = len;
- __entry->rw = rw;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
- "rw = %d ret = %d",
- show_dev_ino(__entry),
- __entry->pos,
- __entry->len,
- __entry->rw,
- __entry->ret)
- );
- TRACE_EVENT(f2fs_reserve_new_blocks,
- TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node,
- blkcnt_t count),
- TP_ARGS(inode, nid, ofs_in_node, count),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(nid_t, nid)
- __field(unsigned int, ofs_in_node)
- __field(blkcnt_t, count)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->nid = nid;
- __entry->ofs_in_node = ofs_in_node;
- __entry->count = count;
- ),
- TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu",
- show_dev(__entry->dev),
- (unsigned int)__entry->nid,
- __entry->ofs_in_node,
- (unsigned long long)__entry->count)
- );
- DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
- TP_PROTO(struct page *page, struct f2fs_io_info *fio),
- TP_ARGS(page, fio),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(pgoff_t, index)
- __field(block_t, old_blkaddr)
- __field(block_t, new_blkaddr)
- __field(int, op)
- __field(int, op_flags)
- __field(int, temp)
- __field(int, type)
- ),
- TP_fast_assign(
- __entry->dev = page->mapping->host->i_sb->s_dev;
- __entry->ino = page->mapping->host->i_ino;
- __entry->index = page->index;
- __entry->old_blkaddr = fio->old_blkaddr;
- __entry->new_blkaddr = fio->new_blkaddr;
- __entry->op = fio->op;
- __entry->op_flags = fio->op_flags;
- __entry->temp = fio->temp;
- __entry->type = fio->type;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
- "oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s_%s",
- show_dev_ino(__entry),
- (unsigned long)__entry->index,
- (unsigned long long)__entry->old_blkaddr,
- (unsigned long long)__entry->new_blkaddr,
- show_bio_type(__entry->op, __entry->op_flags),
- show_block_temp(__entry->temp),
- show_block_type(__entry->type))
- );
- DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio,
- TP_PROTO(struct page *page, struct f2fs_io_info *fio),
- TP_ARGS(page, fio),
- TP_CONDITION(page->mapping)
- );
- DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_write,
- TP_PROTO(struct page *page, struct f2fs_io_info *fio),
- TP_ARGS(page, fio),
- TP_CONDITION(page->mapping)
- );
- DECLARE_EVENT_CLASS(f2fs__bio,
- TP_PROTO(struct super_block *sb, int type, struct bio *bio),
- TP_ARGS(sb, type, bio),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(dev_t, target)
- __field(int, op)
- __field(int, op_flags)
- __field(int, type)
- __field(sector_t, sector)
- __field(unsigned int, size)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->target = bio_dev(bio);
- __entry->op = bio_op(bio);
- __entry->op_flags = bio->bi_opf;
- __entry->type = type;
- __entry->sector = bio->bi_iter.bi_sector;
- __entry->size = bio->bi_iter.bi_size;
- ),
- TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u",
- show_dev(__entry->target),
- show_dev(__entry->dev),
- show_bio_type(__entry->op, __entry->op_flags),
- show_block_type(__entry->type),
- (unsigned long long)__entry->sector,
- __entry->size)
- );
- DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_write_bio,
- TP_PROTO(struct super_block *sb, int type, struct bio *bio),
- TP_ARGS(sb, type, bio),
- TP_CONDITION(bio)
- );
- DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_read_bio,
- TP_PROTO(struct super_block *sb, int type, struct bio *bio),
- TP_ARGS(sb, type, bio),
- TP_CONDITION(bio)
- );
- DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_read_bio,
- TP_PROTO(struct super_block *sb, int type, struct bio *bio),
- TP_ARGS(sb, type, bio),
- TP_CONDITION(bio)
- );
- DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
- TP_PROTO(struct super_block *sb, int type, struct bio *bio),
- TP_ARGS(sb, type, bio),
- TP_CONDITION(bio)
- );
- TRACE_EVENT(f2fs_write_begin,
- TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
- unsigned int flags),
- TP_ARGS(inode, pos, len, flags),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, pos)
- __field(unsigned int, len)
- __field(unsigned int, flags)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pos = pos;
- __entry->len = len;
- __entry->flags = flags;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
- show_dev_ino(__entry),
- (unsigned long long)__entry->pos,
- __entry->len,
- __entry->flags)
- );
- TRACE_EVENT(f2fs_write_end,
- TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
- unsigned int copied),
- TP_ARGS(inode, pos, len, copied),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(loff_t, pos)
- __field(unsigned int, len)
- __field(unsigned int, copied)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pos = pos;
- __entry->len = len;
- __entry->copied = copied;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
- show_dev_ino(__entry),
- (unsigned long long)__entry->pos,
- __entry->len,
- __entry->copied)
- );
- DECLARE_EVENT_CLASS(f2fs__page,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, type)
- __field(int, dir)
- __field(pgoff_t, index)
- __field(int, dirty)
- __field(int, uptodate)
- ),
- TP_fast_assign(
- __entry->dev = page->mapping->host->i_sb->s_dev;
- __entry->ino = page->mapping->host->i_ino;
- __entry->type = type;
- __entry->dir = S_ISDIR(page->mapping->host->i_mode);
- __entry->index = page->index;
- __entry->dirty = PageDirty(page);
- __entry->uptodate = PageUptodate(page);
- ),
- TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
- "dirty = %d, uptodate = %d",
- show_dev_ino(__entry),
- show_block_type(__entry->type),
- show_file_type(__entry->dir),
- (unsigned long)__entry->index,
- __entry->dirty,
- __entry->uptodate)
- );
- DEFINE_EVENT(f2fs__page, f2fs_writepage,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_readpage,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_register_inmem_page,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page,
- TP_PROTO(struct page *page, int type),
- TP_ARGS(page, type)
- );
- TRACE_EVENT(f2fs_writepages,
- TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type),
- TP_ARGS(inode, wbc, type),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(int, type)
- __field(int, dir)
- __field(long, nr_to_write)
- __field(long, pages_skipped)
- __field(loff_t, range_start)
- __field(loff_t, range_end)
- __field(pgoff_t, writeback_index)
- __field(int, sync_mode)
- __field(char, for_kupdate)
- __field(char, for_background)
- __field(char, tagged_writepages)
- __field(char, for_reclaim)
- __field(char, range_cyclic)
- __field(char, for_sync)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->type = type;
- __entry->dir = S_ISDIR(inode->i_mode);
- __entry->nr_to_write = wbc->nr_to_write;
- __entry->pages_skipped = wbc->pages_skipped;
- __entry->range_start = wbc->range_start;
- __entry->range_end = wbc->range_end;
- __entry->writeback_index = inode->i_mapping->writeback_index;
- __entry->sync_mode = wbc->sync_mode;
- __entry->for_kupdate = wbc->for_kupdate;
- __entry->for_background = wbc->for_background;
- __entry->tagged_writepages = wbc->tagged_writepages;
- __entry->for_reclaim = wbc->for_reclaim;
- __entry->range_cyclic = wbc->range_cyclic;
- __entry->for_sync = wbc->for_sync;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
- "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
- "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
- show_dev_ino(__entry),
- show_block_type(__entry->type),
- show_file_type(__entry->dir),
- __entry->nr_to_write,
- __entry->pages_skipped,
- __entry->range_start,
- __entry->range_end,
- (unsigned long)__entry->writeback_index,
- __entry->sync_mode,
- __entry->for_kupdate,
- __entry->for_background,
- __entry->tagged_writepages,
- __entry->for_reclaim,
- __entry->range_cyclic,
- __entry->for_sync)
- );
- TRACE_EVENT(f2fs_readpages,
- TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage),
- TP_ARGS(inode, page, nrpage),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(pgoff_t, start)
- __field(unsigned int, nrpage)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->start = page->index;
- __entry->nrpage = nrpage;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
- show_dev_ino(__entry),
- (unsigned long)__entry->start,
- __entry->nrpage)
- );
- TRACE_EVENT(f2fs_write_checkpoint,
- TP_PROTO(struct super_block *sb, int reason, char *msg),
- TP_ARGS(sb, reason, msg),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(int, reason)
- __field(char *, msg)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->reason = reason;
- __entry->msg = msg;
- ),
- TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
- show_dev(__entry->dev),
- show_cpreason(__entry->reason),
- __entry->msg)
- );
- DECLARE_EVENT_CLASS(f2fs_discard,
- TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
- TP_ARGS(dev, blkstart, blklen),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(block_t, blkstart)
- __field(block_t, blklen)
- ),
- TP_fast_assign(
- __entry->dev = dev->bd_dev;
- __entry->blkstart = blkstart;
- __entry->blklen = blklen;
- ),
- TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
- show_dev(__entry->dev),
- (unsigned long long)__entry->blkstart,
- (unsigned long long)__entry->blklen)
- );
- DEFINE_EVENT(f2fs_discard, f2fs_queue_discard,
- TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
- TP_ARGS(dev, blkstart, blklen)
- );
- DEFINE_EVENT(f2fs_discard, f2fs_issue_discard,
- TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
- TP_ARGS(dev, blkstart, blklen)
- );
- DEFINE_EVENT(f2fs_discard, f2fs_remove_discard,
- TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
- TP_ARGS(dev, blkstart, blklen)
- );
- TRACE_EVENT(f2fs_issue_reset_zone,
- TP_PROTO(struct block_device *dev, block_t blkstart),
- TP_ARGS(dev, blkstart),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(block_t, blkstart)
- ),
- TP_fast_assign(
- __entry->dev = dev->bd_dev;
- __entry->blkstart = blkstart;
- ),
- TP_printk("dev = (%d,%d), reset zone at block = 0x%llx",
- show_dev(__entry->dev),
- (unsigned long long)__entry->blkstart)
- );
- TRACE_EVENT(f2fs_issue_flush,
- TP_PROTO(struct block_device *dev, unsigned int nobarrier,
- unsigned int flush_merge, int ret),
- TP_ARGS(dev, nobarrier, flush_merge, ret),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(unsigned int, nobarrier)
- __field(unsigned int, flush_merge)
- __field(int, ret)
- ),
- TP_fast_assign(
- __entry->dev = dev->bd_dev;
- __entry->nobarrier = nobarrier;
- __entry->flush_merge = flush_merge;
- __entry->ret = ret;
- ),
- TP_printk("dev = (%d,%d), %s %s, ret = %d",
- show_dev(__entry->dev),
- __entry->nobarrier ? "skip (nobarrier)" : "issue",
- __entry->flush_merge ? " with flush_merge" : "",
- __entry->ret)
- );
- TRACE_EVENT(f2fs_lookup_extent_tree_start,
- TP_PROTO(struct inode *inode, unsigned int pgofs),
- TP_ARGS(inode, pgofs),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(unsigned int, pgofs)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pgofs = pgofs;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u",
- show_dev_ino(__entry),
- __entry->pgofs)
- );
- TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end,
- TP_PROTO(struct inode *inode, unsigned int pgofs,
- struct extent_info *ei),
- TP_ARGS(inode, pgofs, ei),
- TP_CONDITION(ei),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(unsigned int, pgofs)
- __field(unsigned int, fofs)
- __field(u32, blk)
- __field(unsigned int, len)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pgofs = pgofs;
- __entry->fofs = ei->fofs;
- __entry->blk = ei->blk;
- __entry->len = ei->len;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
- "ext_info(fofs: %u, blk: %u, len: %u)",
- show_dev_ino(__entry),
- __entry->pgofs,
- __entry->fofs,
- __entry->blk,
- __entry->len)
- );
- TRACE_EVENT(f2fs_update_extent_tree_range,
- TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr,
- unsigned int len),
- TP_ARGS(inode, pgofs, blkaddr, len),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(unsigned int, pgofs)
- __field(u32, blk)
- __field(unsigned int, len)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->pgofs = pgofs;
- __entry->blk = blkaddr;
- __entry->len = len;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
- "blkaddr = %u, len = %u",
- show_dev_ino(__entry),
- __entry->pgofs,
- __entry->blk,
- __entry->len)
- );
- TRACE_EVENT(f2fs_shrink_extent_tree,
- TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
- unsigned int tree_cnt),
- TP_ARGS(sbi, node_cnt, tree_cnt),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(unsigned int, node_cnt)
- __field(unsigned int, tree_cnt)
- ),
- TP_fast_assign(
- __entry->dev = sbi->sb->s_dev;
- __entry->node_cnt = node_cnt;
- __entry->tree_cnt = tree_cnt;
- ),
- TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u",
- show_dev(__entry->dev),
- __entry->node_cnt,
- __entry->tree_cnt)
- );
- TRACE_EVENT(f2fs_destroy_extent_tree,
- TP_PROTO(struct inode *inode, unsigned int node_cnt),
- TP_ARGS(inode, node_cnt),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(ino_t, ino)
- __field(unsigned int, node_cnt)
- ),
- TP_fast_assign(
- __entry->dev = inode->i_sb->s_dev;
- __entry->ino = inode->i_ino;
- __entry->node_cnt = node_cnt;
- ),
- TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u",
- show_dev_ino(__entry),
- __entry->node_cnt)
- );
- DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes,
- TP_PROTO(struct super_block *sb, int type, s64 count),
- TP_ARGS(sb, type, count),
- TP_STRUCT__entry(
- __field(dev_t, dev)
- __field(int, type)
- __field(s64, count)
- ),
- TP_fast_assign(
- __entry->dev = sb->s_dev;
- __entry->type = type;
- __entry->count = count;
- ),
- TP_printk("dev = (%d,%d), %s, dirty count = %lld",
- show_dev(__entry->dev),
- show_file_type(__entry->type),
- __entry->count)
- );
- DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_enter,
- TP_PROTO(struct super_block *sb, int type, s64 count),
- TP_ARGS(sb, type, count)
- );
- DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_exit,
- TP_PROTO(struct super_block *sb, int type, s64 count),
- TP_ARGS(sb, type, count)
- );
- #endif /* _TRACE_F2FS_H */
- /* This part must be outside protection */
- #include <trace/define_trace.h>
|