qemu/net/trace-events

22 lines
1.1 KiB
Plaintext
Raw Normal View History

# See docs/devel/tracing.txt for syntax documentation.
# net/vhost-user.c
vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
trace: move colo trace events to net/ sub-directory The colo patch series added various trace events to the top level trace-events file, despite the files using them being in a sub-dir. commit 30656b097e9dd7978d3fe9416cb9f5a421a9e63e Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:34 2016 +0800 filter-rewriter: rewrite tcp packet to keep secondary connection commit f4b618360e5a81b097e2e35d52011bec3c63af68 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:31 2016 +0800 colo-compare: add TCP, UDP, ICMP packet comparison We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com> commit 0682e15b19b2f41c0568142b42518b9471168597 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:30 2016 +0800 colo-compare: introduce packet comparison thread commit 59509ec16b7ee92b3f8261c554023aa1d3169317 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:27 2016 +0800 net/colo.c: add colo.c to define and handle packet This moves all events into net/trace-events where they were supposed to live. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-2-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-10-04 16:35:40 +03:00
# net/colo.c
colo_proxy_main(const char *chr) ": %s"
# net/colo-compare.c
colo_compare_main(const char *chr) ": %s"
colo_compare_udp_miscompare(const char *sta, int size) ": %s = %d"
colo_compare_icmp_miscompare(const char *sta, int size) ": %s = %d"
colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, const char *stc, const char *std) "ppkt size = %d, ip_src = %s, ip_dst = %s, spkt size = %d, ip_src = %s, ip_dst = %s"
colo_old_packet_check_found(int64_t old_time) "%" PRId64
colo_compare_miscompare(void) ""
colo: compare the packet based on the tcp sequence number Packet size some time different or when network is busy. Based on same payload size, but TCP protocol can not guarantee send the same one packet in the same way, like that: We send this payload: ------------------------------ | header |1|2|3|4|5|6|7|8|9|0| ------------------------------ primary: ppkt1: ---------------- | header |1|2|3| ---------------- ppkt2: ------------------------ | header |4|5|6|7|8|9|0| ------------------------ secondary: spkt1: ------------------------------ | header |1|2|3|4|5|6|7|8|9|0| ------------------------------ In the original method, ppkt1 and ppkt2 are different in size and spkt1, so they can't compare and trigger the checkpoint. I have tested FTP get 200M and 1G file many times, I found that the performance was less than 1% of the native. Now I reconstructed the comparison of TCP packets based on the TCP sequence number. first of all, ppkt1 and spkt1 have the same starting sequence number, so they can compare, even though their length is different. And then ppkt1 with a smaller payload length is used as the comparison length, if the payload is same, send out the ppkt1 and record the offset(the length of ppkt1 payload) in spkt1. The next comparison, ppkt2 and spkt1 can be compared from the recorded position of spkt1. like that: ---------------- | header |1|2|3| ppkt1 ---------|-----| | | ---------v-----v-------------- | header |1|2|3|4|5|6|7|8|9|0| spkt1 ---------------|\------------| | \offset | ---------v-------------v | header |4|5|6|7|8|9|0| ppkt2 ------------------------ In this way, the performance can reach native 20% in my multiple tests. Cc: Zhang Chen <zhangckid@gmail.com> Cc: Li Zhijian <lizhijian@cn.fujitsu.com> Cc: Jason Wang <jasowang@redhat.com> Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Zhang Chen <zhangckid@gmail.com> Reviewed-by: Zhang Chen <zhangckid@gmail.com> Tested-by: Zhang Chen <zhangckid@gmail.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-12-25 05:54:12 +03:00
colo_compare_tcp_info(const char *pkt, uint32_t seq, uint32_t ack, int hdlen, int pdlen, int offset, int flags) "%s: seq/ack= %u/%u hdlen= %d pdlen= %d offset= %d flags=%d\n"
trace: move colo trace events to net/ sub-directory The colo patch series added various trace events to the top level trace-events file, despite the files using them being in a sub-dir. commit 30656b097e9dd7978d3fe9416cb9f5a421a9e63e Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:34 2016 +0800 filter-rewriter: rewrite tcp packet to keep secondary connection commit f4b618360e5a81b097e2e35d52011bec3c63af68 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:31 2016 +0800 colo-compare: add TCP, UDP, ICMP packet comparison We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com> commit 0682e15b19b2f41c0568142b42518b9471168597 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:30 2016 +0800 colo-compare: introduce packet comparison thread commit 59509ec16b7ee92b3f8261c554023aa1d3169317 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:27 2016 +0800 net/colo.c: add colo.c to define and handle packet This moves all events into net/trace-events where they were supposed to live. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-2-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-10-04 16:35:40 +03:00
# net/filter-rewriter.c
colo_filter_rewriter_debug(void) ""
colo_filter_rewriter_pkt_info(const char *func, const char *src, const char *dst, uint32_t seq, uint32_t ack, uint32_t flag) "%s: src/dst: %s/%s p: seq/ack=%u/%u flags=0x%x\n"
trace: move colo trace events to net/ sub-directory The colo patch series added various trace events to the top level trace-events file, despite the files using them being in a sub-dir. commit 30656b097e9dd7978d3fe9416cb9f5a421a9e63e Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:34 2016 +0800 filter-rewriter: rewrite tcp packet to keep secondary connection commit f4b618360e5a81b097e2e35d52011bec3c63af68 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:31 2016 +0800 colo-compare: add TCP, UDP, ICMP packet comparison We add TCP,UDP,ICMP packet comparison to replace IP packet comparison. This can increase the accuracy of the package comparison. Less checkpoint more efficiency. Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Jason Wang <jasowang@redhat.com> commit 0682e15b19b2f41c0568142b42518b9471168597 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:30 2016 +0800 colo-compare: introduce packet comparison thread commit 59509ec16b7ee92b3f8261c554023aa1d3169317 Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Date: Tue Sep 27 10:22:27 2016 +0800 net/colo.c: add colo.c to define and handle packet This moves all events into net/trace-events where they were supposed to live. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 1475588159-30598-2-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-10-04 16:35:40 +03:00
colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"