Commit edb70ea
committed
libbpf-tools/biosnoop: Fix incorrect sizeof in bpf_get_current_comm
sizeof(&piddata.comm) returns the size of the pointer (8 bytes on 64-bit),
while sizeof(piddata.comm) returns the actual size of the char array
(TASK_COMM_LEN). This error caused the task command to be truncated.
Original output (truncated COMM):
TIME(s) COMM PID DISK T SECTOR BYTES LAT(ms)
0.000634 f2fs_ck 298 mmcblk0 WSM 5037016 16384 0.108
0.004835 kworker 2628 mmcblk0 WFSM 5037048 4096 0.464
Fixed output:
TIME(s) COMM PID DISK T SECTOR BYTES LAT(ms)
0.000253 f2fs_ckpt-254: 298 mmcblk0 WSM 5032920 20480 0.903
0.002865 kworker/0:0 2628 mmcblk0 WFSM 5032960 4096 0.495
Change-Id: Iaf1753055a9117e3cf6dbbf6dc6a6c753a584f6c
Signed-off-by: Ism Hong <ism.hong@gmail.com>1 parent b11c1bd commit edb70ea
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments