Commit 8d1cb17
f2fs: optimize trace_f2fs_write_checkpoint with enums
This patch optimizes the tracepoint by replacing these hardcoded strings
with a new enumeration f2fs_cp_phase.
1.Defines enum f2fs_cp_phase with values for each checkpoint phase.
2.Updates trace_f2fs_write_checkpoint to accept a u16 phase argument
instead of a string pointer.
3.Uses __print_symbolic in TP_printk to convert the enum values
back to their corresponding strings for human-readable trace output.
This change reduces the storage overhead for each trace event
by replacing a variable-length string with a 2-byte integer,
while maintaining the same readable output in ftrace.
Signed-off-by: YH Lin <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>1 parent 37345ea commit 8d1cb17
3 files changed
+23
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
1676 | | - | |
| 1676 | + | |
1677 | 1677 | | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | 1681 | | |
1682 | 1682 | | |
1683 | 1683 | | |
1684 | | - | |
| 1684 | + | |
1685 | 1685 | | |
1686 | 1686 | | |
1687 | 1687 | | |
| |||
1747 | 1747 | | |
1748 | 1748 | | |
1749 | 1749 | | |
1750 | | - | |
| 1750 | + | |
1751 | 1751 | | |
1752 | 1752 | | |
1753 | 1753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
175 | 178 | | |
176 | 179 | | |
177 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
| |||
1573 | 1582 | | |
1574 | 1583 | | |
1575 | 1584 | | |
1576 | | - | |
| 1585 | + | |
1577 | 1586 | | |
1578 | | - | |
| 1587 | + | |
1579 | 1588 | | |
1580 | 1589 | | |
1581 | 1590 | | |
1582 | 1591 | | |
1583 | | - | |
| 1592 | + | |
1584 | 1593 | | |
1585 | 1594 | | |
1586 | 1595 | | |
1587 | 1596 | | |
1588 | 1597 | | |
1589 | | - | |
| 1598 | + | |
1590 | 1599 | | |
1591 | 1600 | | |
1592 | 1601 | | |
1593 | 1602 | | |
1594 | 1603 | | |
1595 | | - | |
| 1604 | + | |
1596 | 1605 | | |
1597 | 1606 | | |
1598 | 1607 | | |
| |||
0 commit comments