Lines Matching refs:ent
1439 const struct blk_io_trace2 *te_blk_io_trace(const struct trace_entry *ent) in te_blk_io_trace() argument
1441 return (const struct blk_io_trace2 *)ent; in te_blk_io_trace()
1444 static inline const void *pdu_start(const struct trace_entry *ent, bool has_cg) in pdu_start() argument
1446 return (void *)(te_blk_io_trace(ent) + 1) + (has_cg ? sizeof(u64) : 0); in pdu_start()
1449 static inline u64 t_cgid(const struct trace_entry *ent) in t_cgid() argument
1451 return *(u64 *)(te_blk_io_trace(ent) + 1); in t_cgid()
1454 static inline int pdu_real_len(const struct trace_entry *ent, bool has_cg) in pdu_real_len() argument
1456 return te_blk_io_trace(ent)->pdu_len - (has_cg ? sizeof(u64) : 0); in pdu_real_len()
1459 static inline u32 t_action(const struct trace_entry *ent) in t_action() argument
1461 return te_blk_io_trace(ent)->action; in t_action()
1464 static inline u32 t_bytes(const struct trace_entry *ent) in t_bytes() argument
1466 return te_blk_io_trace(ent)->bytes; in t_bytes()
1469 static inline u32 t_sec(const struct trace_entry *ent) in t_sec() argument
1471 return te_blk_io_trace(ent)->bytes >> 9; in t_sec()
1474 static inline unsigned long long t_sector(const struct trace_entry *ent) in t_sector() argument
1476 return te_blk_io_trace(ent)->sector; in t_sector()
1479 static inline __u16 t_error(const struct trace_entry *ent) in t_error() argument
1481 return te_blk_io_trace(ent)->error; in t_error()
1484 static __u64 get_pdu_int(const struct trace_entry *ent, bool has_cg) in get_pdu_int() argument
1486 const __be64 *val = pdu_start(ent, has_cg); in get_pdu_int()
1500 const struct blk_io_trace2 *t = te_blk_io_trace(iter->ent); in blk_log_action_classic()
1507 secs, nsec_rem, iter->ent->pid, act, rwbs); in blk_log_action_classic()
1514 const struct blk_io_trace2 *t = te_blk_io_trace(iter->ent); in blk_log_action()
1518 u64 id = t_cgid(iter->ent); in blk_log_action()
1553 const struct trace_entry *ent, bool has_cg) in blk_log_dump_pdu() argument
1559 pdu_buf = pdu_start(ent, has_cg); in blk_log_dump_pdu()
1560 pdu_len = pdu_real_len(ent, has_cg); in blk_log_dump_pdu()
1591 static void blk_log_generic(struct trace_seq *s, const struct trace_entry *ent, bool has_cg) in blk_log_generic() argument
1595 trace_find_cmdline(ent->pid, cmd); in blk_log_generic()
1597 if (t_action(ent) & BLK_TC_ACT(BLK_TC_PC)) { in blk_log_generic()
1598 trace_seq_printf(s, "%u ", t_bytes(ent)); in blk_log_generic()
1599 blk_log_dump_pdu(s, ent, has_cg); in blk_log_generic()
1602 if (t_sec(ent)) in blk_log_generic()
1604 t_sector(ent), t_sec(ent), cmd); in blk_log_generic()
1611 const struct trace_entry *ent, bool has_cg) in blk_log_with_error() argument
1613 if (t_action(ent) & BLK_TC_ACT(BLK_TC_PC)) { in blk_log_with_error()
1614 blk_log_dump_pdu(s, ent, has_cg); in blk_log_with_error()
1615 trace_seq_printf(s, "[%d]\n", t_error(ent)); in blk_log_with_error()
1617 if (t_sec(ent)) in blk_log_with_error()
1619 t_sector(ent), in blk_log_with_error()
1620 t_sec(ent), t_error(ent)); in blk_log_with_error()
1623 t_sector(ent), t_error(ent)); in blk_log_with_error()
1627 static void blk_log_remap(struct trace_seq *s, const struct trace_entry *ent, bool has_cg) in blk_log_remap() argument
1629 const struct blk_io_trace_remap *__r = pdu_start(ent, has_cg); in blk_log_remap()
1632 t_sector(ent), t_sec(ent), in blk_log_remap()
1638 static void blk_log_plug(struct trace_seq *s, const struct trace_entry *ent, bool has_cg) in blk_log_plug() argument
1642 trace_find_cmdline(ent->pid, cmd); in blk_log_plug()
1647 static void blk_log_unplug(struct trace_seq *s, const struct trace_entry *ent, bool has_cg) in blk_log_unplug() argument
1651 trace_find_cmdline(ent->pid, cmd); in blk_log_unplug()
1653 trace_seq_printf(s, "[%s] %llu\n", cmd, get_pdu_int(ent, has_cg)); in blk_log_unplug()
1656 static void blk_log_split(struct trace_seq *s, const struct trace_entry *ent, bool has_cg) in blk_log_split() argument
1660 trace_find_cmdline(ent->pid, cmd); in blk_log_split()
1662 trace_seq_printf(s, "%llu / %llu [%s]\n", t_sector(ent), in blk_log_split()
1663 get_pdu_int(ent, has_cg), cmd); in blk_log_split()
1666 static void blk_log_msg(struct trace_seq *s, const struct trace_entry *ent, in blk_log_msg() argument
1670 trace_seq_putmem(s, pdu_start(ent, has_cg), in blk_log_msg()
1671 pdu_real_len(ent, has_cg)); in blk_log_msg()
1711 void (*print)(struct trace_seq *s, const struct trace_entry *ent,
1741 t = te_blk_io_trace(iter->ent); in print_one_line()
1749 blk_log_msg(s, iter->ent, has_cg); in print_one_line()
1757 what2act[what].print(s, iter->ent, has_cg); in print_one_line()
1772 struct blk_io_trace2 *t = (struct blk_io_trace2 *)iter->ent; in blk_trace_synthesize_old_trace()
1795 if ((iter->ent->type != TRACE_BLK) || in blk_tracer_print_line()