当tracing_thresh 设置为非零值时,function_graph 插件无法记录function_entry 记录,我使用的是带有4.15 内核的ubuntu。看起来,我偶然发现了https://lore.kernel.org/patchwork/patch/188477/上讨论的错误。请指教,重现步骤
root@rk-VirtualBox:/home/rk# echo 50 > /sys/kernel/debug/tracing/tracing_thresh
root@rk-VirtualBox:/home/rk# trace-cmd record -P $(pidof Xorg) -p function_graph -g "unix_stream_recvmsg"
plugin 'function_graph'
Hit Ctrl^C to stop recording
^CKernel buffer statistics:
Note: "entries" are the entries left in the kernel ring buffer and are not
recorded in the trace data. They should all be zero.
CPU: 0
entries: 0
overrun: 0
commit overrun: 0
bytes: 0
oldest event ts: 8174.755713
now ts: 10835.724188
dropped events: 0
read events: 0
CPU: 1
entries: 0
overrun: 0
commit overrun: 0
bytes: 1064
oldest event ts: 10823.335096
now ts: 10835.724471
dropped events: 0
read events: 21
CPU0 data recorded at offset=0x48c000
0 bytes in size
CPU1 data recorded at offset=0x48c000
4096 bytes in size
root@rk-VirtualBox:/home/rk# trace-cmd report -l
version = 6
CPU 0 is empty
cpus=2
Xorg-1629 1.... 10823.335096: funcgraph_exit: + 69.854 us | }
Xorg-1629 1.N.. 10823.335168: funcgraph_exit: ! 144.131 us | }
Xorg-1629 1.... 10823.484822: funcgraph_exit: + 65.652 us | }
Xorg-1629 1.... 10823.484830: funcgraph_exit: + 79.146 us | }
Xorg-1629 1.... 10824.115913: funcgraph_exit: + 61.892 us | }
Xorg-1629 1.... 10824.115915: funcgraph_exit: + 65.617 us | }
Xorg-1629 1.... 10824.369064: funcgraph_exit: + 53.736 us | }
Xorg-1629 1.... 10824.369067: funcgraph_exit: + 59.413 us | }
Xorg-1629 1.... 10824.369068: funcgraph_exit: + 61.351 us | }
Xorg-1629 1.... 10824.369073: funcgraph_exit: + 66.796 us | }
Xorg-1629 1.... 10824.369077: funcgraph_exit: + 70.633 us | }
Xorg-1629 1.... 10824.369080: funcgraph_exit: + 87.385 us | }
Xorg-1629 1.... 10824.369081: funcgraph_exit: + 89.105 us | }
Xorg-1629 1.... 10824.588131: funcgraph_exit: + 74.199 us | }
Xorg-1629 1.... 10824.588133: funcgraph_exit: + 79.437 us | }
Xorg-1629 1.... 10825.359456: funcgraph_exit: + 53.650 us | }
Xorg-1629 1.... 10825.359461: funcgraph_exit: + 60.938 us | }
Xorg-1629 1.... 10825.359466: funcgraph_exit: + 78.474 us | }
Xorg-1629 1.... 10825.359466: funcgraph_exit: + 80.188 us | }
Xorg-1629 1.... 10826.588161: funcgraph_exit: + 50.897 us | }
Xorg-1629 1.... 10826.588164: funcgraph_exit: + 77.478 us | }