我正在尝试查看跟踪点以跟踪 ping 数据包的旅程。第一次运行
vagrant@ubuntu-xenial:~$ sudo perf trace --no-syscalls --event 'net:*' ping 10.0.2.2 -c 1 |column
0.705 net:net_dev_queue:dev=enp0s3 skbaddr=0xffff88003c70d200 len=98)
0.719 net:net_dev_start_xmit:dev=enp0s3 queue_mapping=0 skbaddr=0xffff88003c70d200 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 ip_summed=0 len=98 data_len=0 network_offset=14 transport_offset_valid=1 transport_offset=34 tx_flags=0 gso_size=0 gso_segs=0 gso_type=0)
0.788 net:net_dev_xmit:dev=enp0s3 skbaddr=0xffff88003c70d200 len=98 rc=0)
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data. 1 packets transmitted, 1 received, 0% packet loss, time 0ms
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=0.289 ms rtt min/avg/max/mdev = 0.289/0.289/0.289/0.000 ms
--- 10.0.2.2 ping statistics ---
在同一命令的其他运行中,有时会显示更多跟踪点。我希望所有运行都显示相同的跟踪点,但它是否显示更多或更少是不一致的。
vagrant@ubuntu-xenial:~$ sudo perf trace --no-syscalls --event 'net:*' ping 10.0.2.2 -c 1
PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
64 bytes from 10.0.2.2: icmp_seq=1 ttl=64 time=0.127 ms
1.588 net:net_dev_queue:dev=enp0s3 skbaddr=0xffff88003ba9a100 len=98)
1.604 net:net_dev_start_xmit:dev=enp0s3 queue_mapping=0 skbaddr=0xffff88003ba9a100 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 ip_summed=0 len
=98 data_len=0 network_offset=14 transport_offset_valid=1 transport_offset=34 tx_flags=0 gso_size=0 gso_segs=0 gso_type=0)
1.676 net:net_dev_xmit:dev=enp0s3 skbaddr=0xffff88003ba9a100 len=98 rc=0)
1.687 net:napi_gro_receive_entry:dev=enp0s3 napi_id=0 queue_mapping=0 skbaddr=0xffff88003ba9a100 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 i
p_summed=0 hash=0x00000000 l4_hash=0 len=84 data_len=0 truesize=768 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0)
1.695 net:netif_receive_skb:dev=enp0s3 skbaddr=0xffff88003ba9a100 len=84)
6.495 net:napi_gro_receive_entry:dev=enp0s3 napi_id=0 queue_mapping=0 skbaddr=0xffff88003ba9a600 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 i
p_summed=0 hash=0x00000000 l4_hash=0 len=46 data_len=0 truesize=704 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0)
6.505 net:netif_receive_skb:--- 10.0.2.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.127/0.127/0.127/0.000 ms
dev=enp0s3 skbaddr=0xffff88003ba9a600 len=46)
7.618 net:napi_gro_receive_entry:dev=enp0s3 napi_id=0 queue_mapping=0 skbaddr=0xffff88003ba9a600 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 i
p_summed=0 hash=0x00000000 l4_hash=0 len=46 data_len=0 truesize=704 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0)
7.625 net:netif_receive_skb:dev=enp0s3 skbaddr=0xffff88003ba9a600 len=46)
8.357 net:napi_gro_receive_entry:dev=enp0s3 napi_id=0 queue_mapping=0 skbaddr=0xffff88003ba9a400 vlan_tagged=0 vlan_proto=0x0000 vlan_tci=0x0000 protocol=0x0800 i
p_summed=0 hash=0x00000000 l4_hash=0 len=46 data_len=0 truesize=704 mac_header_valid=1 mac_header=-14 nr_frags=0 gso_size=0 gso_type=0)
8.364 net:netif_receive_skb:dev=enp0s3 skbaddr=0xffff88003ba9a400 len=46)
我可以运行任意次数,并且输出将是不可预测的。