summaryrefslogtreecommitdiffstats
path: root/net/filter-rewriter.c
diff options
context:
space:
mode:
authorPeter Maydell2020-09-10 12:45:13 +0200
committerPeter Maydell2020-09-10 12:45:13 +0200
commit922781b7b37de22a06269f25c9c1ae66293c5991 (patch)
treebf94f80cb7aa2336878e4c1b48a438f0ac11ff33 /net/filter-rewriter.c
parentMerge remote-tracking branch 'remotes/kraxel/tags/sirius/ipxe-20200908-pull-r... (diff)
parenttrace-events: Fix attribution of trace points to source (diff)
downloadqemu-922781b7b37de22a06269f25c9c1ae66293c5991.tar.gz
qemu-922781b7b37de22a06269f25c9c1ae66293c5991.tar.xz
qemu-922781b7b37de22a06269f25c9c1ae66293c5991.zip
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Pull request v2: * Rebased after meson and resolved conflict in "softmmu: Add missing trace-events file" * Dropped "meson: Don't make object files for dtrace on macOS" (already merged via Paolo's tree) # gpg: Signature made Thu 10 Sep 2020 09:09:47 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: trace-events: Fix attribution of trace points to source trace-events: Delete unused trace points scripts/cleanup-trace-events: Emit files in alphabetical order scripts/cleanup-trace-events: Fix for vcpu property net/colo: Match is-enabled probe to tracepoint scripts/tracetool: Use void pointer for vcpu scripts/tracetool: Fix dtrace generation for macOS softmmu: Add missing trace-events file Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'net/filter-rewriter.c')
-rw-r--r--net/filter-rewriter.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
index 1aaad101b6..576b019d09 100644
--- a/net/filter-rewriter.c
+++ b/net/filter-rewriter.c
@@ -76,11 +76,14 @@ static int handle_primary_tcp_pkt(RewriterState *rf,
struct tcp_hdr *tcp_pkt;
tcp_pkt = (struct tcp_hdr *)pkt->transport_header;
- if (trace_event_get_state_backends(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
+ if (trace_event_get_state_backends(TRACE_COLO_FILTER_REWRITER_PKT_INFO)) {
trace_colo_filter_rewriter_pkt_info(__func__,
inet_ntoa(pkt->ip->ip_src), inet_ntoa(pkt->ip->ip_dst),
ntohl(tcp_pkt->th_seq), ntohl(tcp_pkt->th_ack),
tcp_pkt->th_flags);
+ }
+ if (trace_event_get_state_backends(
+ TRACE_COLO_FILTER_REWRITER_CONN_OFFSET)) {
trace_colo_filter_rewriter_conn_offset(conn->offset);
}
@@ -180,11 +183,14 @@ static int handle_secondary_tcp_pkt(RewriterState *rf,
tcp_pkt = (struct tcp_hdr *)pkt->transport_header;
- if (trace_event_get_state_backends(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
+ if (trace_event_get_state_backends(TRACE_COLO_FILTER_REWRITER_PKT_INFO)) {
trace_colo_filter_rewriter_pkt_info(__func__,
inet_ntoa(pkt->ip->ip_src), inet_ntoa(pkt->ip->ip_dst),
ntohl(tcp_pkt->th_seq), ntohl(tcp_pkt->th_ack),
tcp_pkt->th_flags);
+ }
+ if (trace_event_get_state_backends(
+ TRACE_COLO_FILTER_REWRITER_CONN_OFFSET)) {
trace_colo_filter_rewriter_conn_offset(conn->offset);
}