net: tcp: sctp: dccp: Replace jprobe usage with trace events
Subsystems (5)
Masami Hiramatsu
maintainerv4 cover net: tcp: sctp: dccp: Replace jprobe usage with trace events
Hi,
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of __u64, and moves a temporal variable
definition in a block.
Thank you,
---
Masami Hiramatsu (6):
net: tcp: Add trace events for TCP congestion window tracing
net: tcp: Remove TCP probe module
net: sctp: Add SCTP ACK tracking trace event
net: sctp: Remove debug SCTP probe module
net: dccp: Add DCCP sendmsg trace event
net: dccp: Remove dccpprobe module
include/trace/events/sctp.h | 99 ++++++++++++++ include/trace/events/tcp.h | 80 +++++++++++ net/Kconfig | 17 -- net/dccp/Kconfig | 17 -- net/dccp/Makefile | 2 net/dccp/probe.c | 203 ----------------------------- net/dccp/proto.c | 5 + net/dccp/trace.h | 105 +++++++++++++++ net/ipv4/Makefile | 1 net/ipv4/tcp_input.c | 3 net/ipv4/tcp_probe.c | 301 ------------------------------------------- net/sctp/Kconfig | 12 -- net/sctp/Makefile | 3 net/sctp/probe.c | 244 ----------------------------------- net/sctp/sm_statefuns.c | 5 + 15 files changed, 297 insertions(+), 800 deletions(-) create mode 100644 include/trace/events/sctp.h delete mode 100644 net/dccp/probe.c create mode 100644 net/dccp/trace.h delete mode 100644 net/ipv4/tcp_probe.c delete mode 100644 net/sctp/probe.c
--
Masami Hiramatsu (Linaro) <[email protected]>
Masami Hiramatsu
maintainerPATCH v4 1/6 net: tcp: Add trace events for TCP congestion window tracing
This adds an event to trace TCP stat variables with slightly intrusive trace-event. This uses ftrace/perf event log buffer to trace those state, no needs to prepare own ring-buffer, nor custom user apps.
User can use ftrace to trace this event as below;
# cd /sys/kernel/debug/tracing # echo 1 > events/tcp/tcp_probe/enable (run workloads) # cat trace
---
Changes in v3:
- Fix build errors caused by including events/tcp.h twice.
- Sort out the including headers.
--- include/trace/events/tcp.h | 80 ++++++++++++++++++++++++++++++++++++++++++++ net/ipv4/tcp_input.c | 3 ++ 2 files changed, 83 insertions(+)
include/trace/events/tcp.h +80 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #undef TRACE_SYSTEM#define TRACE_SYSTEM tcp
@@ -8,6 +9,7 @@#include <linux/tcp.h> #include <linux/tracepoint.h> #include <net/ipv6.h> +#include <net/tcp.h> #define tcp_state_name (state) { state, #state }#define show_tcp_state_name (val) \
@@ -293,6 +295,84 @@ TRACE_EVENT(tcp_retransmit_synack, __entry->saddr_v6, __entry->daddr_v6) ); +TRACE_EVENT(tcp_probe, + + TP_PROTO(struct sock *sk, struct sk_buff *skb), + + TP_ARGS(sk, skb), + + TP_STRUCT__entry( + /* sockaddr_in6 is always bigger than sockaddr_in */ + __array(__u8, saddr, sizeof(struct sockaddr_in6)) + __array(__u8, daddr, sizeof(struct sockaddr_in6)) + __field(__u16, sport) + __field(__u16, dport) + __field(__u32, mark) + __field(__u16, length) + __field(__u32, snd_nxt) + __field(__u32, snd_una) + __field(__u32, snd_cwnd) + __field(__u32, ssthresh) + __field(__u32, snd_wnd) + __field(__u32, srtt) + __field(__u32, rcv_wnd) + ), + + TP_fast_assign( + const struct tcp_sock *tp = tcp_sk(sk); + const struct inet_sock *inet = inet_sk(sk); + + memset(__entry->saddr, 0, sizeof(struct sockaddr_in6)); + memset(__entry->daddr, 0, sizeof(struct sockaddr_in6)); + + if (sk->sk_family = AF_INET) { + struct sockaddr_in *v4 = (void *)__entry->saddr; + + v4->sin_family = AF_INET; + v4->sin_port = inet->inet_sport; + v4->sin_addr.s_addr = inet->inet_saddr; + v4 = (void *)__entry->daddr; + v4->sin_family = AF_INET; + v4->sin_port = inet->inet_dport; + v4->sin_addr.s_addr = inet->inet_daddr; +#if IS_ENABLED(CONFIG_IPV6) + } else if (sk->sk_family = AF_INET6) { + struct sockaddr_in6 *v6 = (void *)__entry->saddr; + + v6->sin6_family = AF_INET6; + v6->sin6_port = inet->inet_sport; + v6->sin6_addr = inet6_sk(sk)->saddr; + v6 = (void *)__entry->daddr; + v6->sin6_family = AF_INET6; + v6->sin6_port = inet->inet_dport; + v6->sin6_addr = sk->sk_v6_daddr; +#endif + } + + /* For filtering use */ + __entry->sport = ntohs(inet->inet_sport); + __entry->dport = ntohs(inet->inet_dport); + __entry->mark = skb->mark; + + __entry->length = skb->len; + __entry->snd_nxt = tp->snd_nxt; + __entry->snd_una = tp->snd_una; + __entry->snd_cwnd = tp->snd_cwnd; + __entry->snd_wnd = tp->snd_wnd; + __entry->rcv_wnd = tp->rcv_wnd; + __entry->ssthresh = tcp_current_ssthresh(sk); + __entry->srtt = tp->srtt_us >> 3; + ), + + TP_printk("src=%pISpc dest=%pISpc mark=%#x length=%d snd_nxt=%#x " + "snd_una=%#x snd_cwnd=%u ssthresh=%u snd_wnd=%u srtt=%u " + "rcv_wnd=%u", + __entry->saddr, __entry->daddr, __entry->mark, + __entry->length, __entry->snd_nxt, __entry->snd_una, + __entry->snd_cwnd, __entry->ssthresh, __entry->snd_wnd, + __entry->srtt, __entry->rcv_wnd) +); + #endif /* _TRACE_TCP_H */ /* This part must be outside protection */
net/ipv4/tcp_input.c +3 -0
@@ -5299,6 +5299,9 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb,unsigned int len = skb->len;struct tcp_sock *tp =tcp_sk (sk); +/* TCP congestion window tracking */ +trace_tcp_probe (sk, skb); +tcp_mstamp_refresh (tp);if (unlikely (!sk->sk_rx_dst))inet_csk (sk)->icsk_af_ops->sk_rx_dst_set (sk, skb);
Masami Hiramatsu
maintainerPATCH v4 2/6 net: tcp: Remove TCP probe module
In reply to Masami HiramatsuRemove TCP probe module since jprobe has been deprecated. That function is now replaced by tcp/tcp_probe trace-event. You can use it via ftrace or perftools.
--- net/Kconfig | 17 --- net/ipv4/Makefile | 1 net/ipv4/tcp_probe.c | 301 -------------------------------------------------- 3 files changed, 319 deletions(-) delete mode 100644 net/ipv4/tcp_probe.c
net/Kconfig +0 -17
@@ -336,23 +336,6 @@ config NET_PKTGEN To compile this code as a module, choose M here: the module will be called pktgen. -config NET_TCPPROBE - tristate "TCP connection probing" - depends on INET && PROC_FS && KPROBES - ---help--- - This module allows for capturing the changes to TCP connection - state in response to incoming packets. It is used for debugging - TCP congestion avoidance modules. If you don't understand - what was just said, you don't need it: say N. - - Documentation on how to use TCP connection probing can be found - at: - - http://www.linuxfoundation.org/collaborate/workgroups/networking/tcpprobe - - To compile this code as a module, choose M here: the - module will be called tcp_probe. - config NET_DROP_MONITOR tristate "Network packet drop alerting service" depends on INET && TRACEPOINTS
net/ipv4/Makefile +0 -1
@@ -43,7 +43,6 @@ obj-$(CONFIG_INET_DIAG) += inet_diag.o obj-$(CONFIG_INET_TCP_DIAG) += tcp_diag.o obj-$(CONFIG_INET_UDP_DIAG) += udp_diag.o obj-$(CONFIG_INET_RAW_DIAG) += raw_diag.o -obj-$(CONFIG_NET_TCPPROBE) += tcp_probe.o obj-$(CONFIG_TCP_CONG_BBR) += tcp_bbr.o obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o obj-$(CONFIG_TCP_CONG_CDG) += tcp_cdg.o
net/ipv4/tcp_probe.c deleted +0 -301
301 lines not on this page · raw message
Masami Hiramatsu
maintainerPATCH v4 3/6 net: sctp: Add SCTP ACK tracking trace event
In reply to Masami HiramatsuAdd SCTP ACK tracking trace event to trace the changes of SCTP association state in response to incoming packets. It is used for debugging SCTP congestion control algorithms, and will replace sctp_probe module.
Note that this event a bit tricky. Since this consists of 2 events (sctp_probe and sctp_probe_path) so you have to enable both events as below.
# cd /sys/kernel/debug/tracing # echo 1 > events/sctp/sctp_probe/enable # echo 1 > events/sctp/sctp_probe_path/enable
Or, you can enable all the events under sctp.
# echo 1 > events/sctp/enable
Since sctp_probe_path event is always invoked from sctp_probe event, you can not see any output if you only enable sctp_probe_path.
---
Changes in v3:
- Add checking whether sctp_probe_path event is enabled before iterating sctp paths to record. Thanks Steven.
Changes in v4:
- Move a temporal variable definition in the block.
- Fix to cast pointer to unsigned long instead of __u64 for 32bit environment.
--- include/trace/events/sctp.h | 99 +++++++++++++++++++++++++++++++++++++++++++ net/sctp/sm_statefuns.c | 5 ++ 2 files changed, 104 insertions(+) create mode 100644 include/trace/events/sctp.h
include/trace/events/sctp.h new file +99 -0
@@ -0,0 +1,99 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM sctp + +#if !defined(_TRACE_SCTP_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_SCTP_H + +#include <net/sctp/structs.h> +#include <linux/tracepoint.h> + +TRACE_EVENT (sctp_probe_path, + + TP_PROTO(struct sctp_transport *sp, + const struct sctp_association *asoc), + +TP_ARGS (sp, asoc), + +TP_STRUCT__entry ( + __field(__u64, asoc) + __field(__u32, primary) + __array(__u8, ipaddr, sizeof(union sctp_addr)) + __field(__u32, state) + __field(__u32, cwnd) + __field(__u32, ssthresh) + __field(__u32, flight_size) + __field(__u32, partial_bytes_acked) +__field (__u32, pathmtu) + ), + +TP_fast_assign ( + __entry->asoc = (unsigned long)asoc; + __entry->primary = (sp = asoc->peer.primary_path); + memcpy(__entry->ipaddr, &sp->ipaddr, sizeof(union sctp_addr)); + __entry->state = sp->state; + __entry->cwnd = sp->cwnd; + __entry->ssthresh = sp->ssthresh; + __entry->flight_size = sp->flight_size; + __entry->partial_bytes_acked = sp->partial_bytes_acked; + __entry->pathmtu = sp->pathmtu; + ), + +TP_printk ("asoc=%#llx%s ipaddr=%pISpc state=%u cwnd=%u ssthresh=%u " +"flight_size=%u partial_bytes_acked=%u pathmtu=%u" , + __entry->asoc, __entry->primary ?"(*)" :"" , + __entry->ipaddr, __entry->state, __entry->cwnd, + __entry->ssthresh, __entry->flight_size, + __entry->partial_bytes_acked, __entry->pathmtu) +); + +TRACE_EVENT (sctp_probe, + + TP_PROTO(const struct sctp_endpoint *ep, + const struct sctp_association *asoc, + struct sctp_chunk *chunk), + +TP_ARGS (ep, asoc, chunk), + +TP_STRUCT__entry ( + __field(__u64, asoc) + __field(__u32, mark) + __field(__u16, bind_port) + __field(__u16, peer_port) + __field(__u32, pathmtu) + __field(__u32, rwnd) +__field (__u16, unack_data) + ), + +TP_fast_assign ( + struct sk_buff *skb = chunk->skb; + + __entry->asoc = (unsigned long)asoc; + __entry->mark = skb->mark; + __entry->bind_port = ep->base.bind_addr.port; + __entry->peer_port = asoc->peer.port; + __entry->pathmtu = asoc->pathmtu; + __entry->rwnd = asoc->peer.rwnd; + __entry->unack_data = asoc->unack_data; + + if (trace_sctp_probe_path_enabled()) { +struct sctp_transport *sp; + +list_for_each_entry (sp, &asoc->peer.transport_addr_list, + transports) { +trace_sctp_probe_path (sp, asoc); + } + } + ), + +TP_printk ("asoc=%#llx mark=%#x bind_port=%d peer_port=%d pathmtu=%d " +"rwnd=%u unack_data=%d" , + __entry->asoc, __entry->mark, __entry->bind_port, + __entry->peer_port, __entry->pathmtu, __entry->rwnd, + __entry->unack_data) +); + +#endif /* _TRACE_SCTP_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
net/sctp/sm_statefuns.c +5 -0
@@ -59,6 +59,9 @@#include <net/sctp/sm.h> #include <net/sctp/structs.h> +#define CREATE_TRACE_POINTS +#include <trace/events/sctp.h> + static struct sctp_packet *sctp_abort_pkt_new( struct net *net, const struct sctp_endpoint *ep,
@@ -3219,6 +3222,8 @@ enum sctp_disposition sctp_sf_eat_sack_6_2(struct net *net,struct sctp_sackhdr *sackh;__u32 ctsn; +trace_sctp_probe (ep, asoc, chunk); +if (!sctp_vtag_verify (chunk, asoc))return sctp_sf_pdiscard (net, ep, asoc, type, arg, commands);
Masami Hiramatsu
maintainerPATCH v4 4/6 net: sctp: Remove debug SCTP probe module
In reply to Masami HiramatsuRemove SCTP probe module since jprobe has been deprecated. That function is now replaced by sctp/sctp_probe and sctp/sctp_probe_path trace-events.
You can use it via ftrace or perftools.
--- net/sctp/Kconfig | 12 --- net/sctp/Makefile | 3 - net/sctp/probe.c | 244 ----------------------------------------------------- 3 files changed, 259 deletions(-) delete mode 100644 net/sctp/probe.c
net/sctp/Kconfig +0 -12
@@ -37,18 +37,6 @@ menuconfig IP_SCTP if IP_SCTP -config NET_SCTPPROBE - tristate "SCTP: Association probing" - depends on PROC_FS && KPROBES - ---help--- - This module allows for capturing the changes to SCTP association - state in response to incoming packets. It is used for debugging - SCTP congestion control algorithms. If you don't understand - what was just said, you don't need it: say N. - - To compile this code as a module, choose M here: the - module will be called sctp_probe. - config SCTP_DBG_OBJCNT bool "SCTP: Debug object counts" depends on PROC_FS
net/sctp/Makefile +0 -3
@@ -4,7 +4,6 @@ # obj-$(CONFIG_IP_SCTP) += sctp.o -obj-$(CONFIG_NET_SCTPPROBE) += sctp_probe.o obj-$(CONFIG_INET_SCTP_DIAG) += sctp_diag.o sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \
@@ -16,8 +15,6 @@ sctp-y := sm_statetable.o sm_statefuns.o sm_sideeffect.o \ offload.o stream_sched.o stream_sched_prio.o \ stream_sched_rr.o stream_interleave.o -sctp_probe-y := probe.o - sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o sctp-$(CONFIG_PROC_FS) += proc.o sctp-$(CONFIG_SYSCTL) += sysctl.o
net/sctp/probe.c deleted +0 -244
244 lines not on this page · raw message
Masami Hiramatsu
maintainerPATCH v4 5/6 net: dccp: Add DCCP sendmsg trace event
In reply to Masami HiramatsuAdd DCCP sendmsg trace event (dccp/dccp_probe) for replacing dccpprobe. User can trace this event via ftrace or perftools.
--- net/dccp/proto.c | 5 +++ net/dccp/trace.h | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 net/dccp/trace.h
net/dccp/proto.c +5 -0
@@ -38,6 +38,9 @@#include "dccp.h" #include "feat.h" +#define CREATE_TRACE_POINTS +#include "trace.h" + DEFINE_SNMP_STAT(struct dccp_mib, dccp_statistics) __read_mostly;EXPORT_SYMBOL_GPL (dccp_statistics);
@@ -761,6 +764,8 @@ int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)int rc, size;long timeo; +trace_dccp_probe (sk, len); +if (len > dp->dccps_mss_cache)return -EMSGSIZE ;
net/dccp/trace.h new file +105 -0
105 lines not on this page · raw message
Masami Hiramatsu
maintainerPATCH v4 5/6 net: dccp: Add DCCP sendmsg trace event
Add DCCP sendmsg trace event (dccp/dccp_probe) for replacing dccpprobe. User can trace this event via ftrace or perftools.
---
Changes in v4.1
- Fix to add local directory to include for trace.h. Thanks Steven!
--- net/dccp/Makefile | 3 ++ net/dccp/proto.c | 5 +++ net/dccp/trace.h | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 net/dccp/trace.h
net/dccp/Makefile +3 -0
@@ -27,3 +27,6 @@ dccp-$(CONFIG_SYSCTL) += sysctl.o dccp_diag-y := diag.o dccp_probe-y := probe.o + +# build with local directory for trace.h +CFLAGS_proto.o := -I$(src)
net/dccp/proto.c +5 -0
@@ -38,6 +38,9 @@#include "dccp.h" #include "feat.h" +#define CREATE_TRACE_POINTS +#include "trace.h" + DEFINE_SNMP_STAT(struct dccp_mib, dccp_statistics) __read_mostly;EXPORT_SYMBOL_GPL (dccp_statistics);
@@ -761,6 +764,8 @@ int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)int rc, size;long timeo; +trace_dccp_probe (sk, len); +if (len > dp->dccps_mss_cache)return -EMSGSIZE ;
net/dccp/trace.h new file +105 -0
105 lines not on this page · raw message
David Miller
maintainerRe: [PATCH net-next v4.1 5/6] net: dccp: Add DCCP sendmsg trace event
When you fix any part of a patch series, you must always repost the entire series from scratch, not just the patch(s) that change.
Thank you.
Steven Rostedt
maintainerRe: [PATCH net-next v4.1 5/6] net: dccp: Add DCCP sendmsg trace event
Quoted 2 lines · On Thu, 21 Dec 2017 10:57:36 -0500 (EST) David Miller <[email protected]>…
When you fix any part of a patch series, you must always repost the entire series from scratch, not just the patch(s) that change.
He probably gets that from me. I don't usually require a full series if only a single patch changes. But I don't receive as many patch series as you do, so I can handle that work flow without too much difficulty.
-- Steve
Masami Hiramatsu
maintainerRe: [PATCH net-next v4.1 5/6] net: dccp: Add DCCP sendmsg trace event
Quoted 9 lines · On Thu, 21 Dec 2017 11:08:05 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 2 lines · On Thu, 21 Dec 2017 10:57:36 -0500 (EST) David Miller <[email protected]>…
When you fix any part of a patch series, you must always repost the entire series from scratch, not just the patch(s) that change.
He probably gets that from me. I don't usually require a full series if only a single patch changes. But I don't receive as many patch series as you do, so I can handle that work flow without too much difficulty.
Yeah :)
OK, anyway, this is for net-next branch. I follow that rule. I'm happy to resend the series :)
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Masami Hiramatsu
maintainerPATCH v4 6/6 net: dccp: Remove dccpprobe module
In reply to Masami HiramatsuRemove DCCP probe module since jprobe has been deprecated. That function is now replaced by dccp/dccp_probe trace-event. You can use it via ftrace or perftools.
--- net/dccp/Kconfig | 17 ---- net/dccp/Makefile | 2 - net/dccp/probe.c | 203 ----------------------------------------------------- 3 files changed, 222 deletions(-) delete mode 100644 net/dccp/probe.c
net/dccp/Kconfig +0 -17
@@ -39,23 +39,6 @@ config IP_DCCP_DEBUG Just say N. -config NET_DCCPPROBE - tristate "DCCP connection probing" - depends on PROC_FS && KPROBES - ---help--- - This module allows for capturing the changes to DCCP connection - state in response to incoming packets. It is used for debugging - DCCP congestion avoidance modules. If you don't understand - what was just said, you don't need it: say N. - - Documentation on how to use DCCP connection probing can be found - at: - - http://www.linuxfoundation.org/collaborate/workgroups/networking/dccpprobe - - To compile this code as a module, choose M here: the - module will be called dccp_probe. - endmenu
net/dccp/Makefile +0 -2
@@ -21,9 +21,7 @@ obj-$(subst y,$(CONFIG_IP_DCCP),$(CONFIG_IPV6)) += dccp_ipv6.o dccp_ipv6-y := ipv6.o obj-$(CONFIG_INET_DCCP_DIAG) += dccp_diag.o -obj-$(CONFIG_NET_DCCPPROBE) += dccp_probe.o dccp-$(CONFIG_SYSCTL) += sysctl.o dccp_diag-y := diag.o -dccp_probe-y := probe.o
net/dccp/probe.c deleted +0 -203
203 lines not on this page · raw message
David Miller
maintainerFrom: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900
Quoted 4 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Quoted 8 lines
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.
Looks good, series applied to net-next, thanks.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153
Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included from net/dccp/trace.h:105:0,
from net/dccp/proto.c:42:
./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^compilation terminated.
Masami Hiramatsu
maintainerQuoted 23 lines · On Wed, 20 Dec 2017 14:24:24 -0500 (EST) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
Quoted 7 lines
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included fromnet/dccp/trace.h:105:0,from net/dccp/proto.c:42: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^compilation terminated.
Hmm, strange.
I could compile it on x86-64 and i386. Let me check what was wrong.
Thanks,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Masami Hiramatsu
maintainerQuoted 23 lines · On Wed, 20 Dec 2017 14:24:24 -0500 (EST) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
Quoted 7 lines
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included fromnet/dccp/trace.h:105:0,from net/dccp/proto.c:42: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^compilation terminated.
Hi David,
Could you share your .config file? I would like to reproduce it. When I tried with attached kconfig, I could not reproduce this issue, and could run it.
====/sys/kernel/debug/tracing/events # cd dccp/ /sys/kernel/debug/tracing/events/dccp # lsdccp_probe enable filter/sys/kernel/debug/tracing/events/dccp # cd dccp_probe/ /sys/kernel/debug/tracing/events/dccp/dccp_probe # ls
enable filter format hist id trigger/sys/kernel/debug/tracing/events/dccp/dccp_probe # cat format
name: dccp_probe
ID: 1002
format:
field:unsigned short common_type; offset:0; size:2; signed:0; field:unsigned char common_flags; offset:2; size:1; signed:0; field:unsigned char common_preempt_count; offset:3; size:1; signed:0; field:int common_pid; offset:4; size:4; signed:1; field:__u8 saddr[sizeof(struct sockaddr_in6)]; offset:8; size:28; signed:0; field:__u8 daddr[sizeof(struct sockaddr_in6)]; offset:36; size:28; signed:0; field:__u16 sport; offset:64; size:2; signed:0; field:__u16 dport; offset:66; size:2; signed:0; field:__u16 size; offset:68; size:2; signed:0; field:__u16 tx_s; offset:70; size:2; signed:0; field:__u32 tx_rtt; offset:72; size:4; signed:0; field:__u32 tx_p; offset:76; size:4; signed:0; field:__u32 tx_x_calc; offset:80; size:4; signed:0; field:__u64 tx_x_recv; offset:88; size:8; signed:0; field:__u64 tx_x; offset:96; size:8; signed:0; field:__u32 tx_t_ipi; offset:104; size:4; signed:0;
print fmt: "src=%pISpc dest=%pISpc size=%d tx_s=%d tx_rtt=%d tx_p=%d tx_x_calc=%u tx_x_recv=%llu tx_x=%llu tx_t_ipi=%d", REC->saddr, REC->daddr, REC->size, REC->tx_s, REC->tx_rtt, REC->tx_p, REC->tx_x_calc, REC->tx_x_recv, REC->tx_x, REC->tx_t_ipi
====
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Steven Rostedt
maintainerQuoted 34 lines · On Thu, 21 Dec 2017 11:36:57 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 23 lines · On Wed, 20 Dec 2017 14:24:24 -0500 (EST) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
Quoted 7 lines
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included fromnet/dccp/trace.h:105:0,from net/dccp/proto.c:42: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^compilation terminated.
Quoted 6 lines
Hi David,
Could you share your .config file? I would like to reproduce it. When I tried with attached kconfig, I could not reproduce this issue, and could run it.
Hi Masami,
Are you sure you committed everything in this change set? I don't see a modification of the Makefile to get the trace.h file you created. Shouldn't there be something like:
CFLAGS_proto.o := -I$(src)
in the Makefile?
-- Steve
Masami Hiramatsu
maintainerQuoted 46 lines · On Wed, 20 Dec 2017 22:12:38 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 34 lines · On Thu, 21 Dec 2017 11:36:57 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 23 lines · On Wed, 20 Dec 2017 14:24:24 -0500 (EST) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
Quoted 7 lines
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included fromnet/dccp/trace.h:105:0,from net/dccp/proto.c:42: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^compilation terminated.
Quoted 6 lines
Hi David,
Could you share your .config file? I would like to reproduce it. When I tried with attached kconfig, I could not reproduce this issue, and could run it.
Hi Masami,
Quoted 7 lines
Are you sure you committed everything in this change set? I don't see a modification of the
Makefileto get thetrace.hfile you created. Shouldn't there be something like:CFLAGS_proto.o := -I$(src)
in the
Makefile?
Oops, I didn't do that, but also I had committed all in this changeset. Hmm, strange, because I don't see same issue... At first I will try to reproduce it and try above flags again.
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Masami Hiramatsu
maintainerQuoted 46 lines · On Wed, 20 Dec 2017 22:12:38 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 34 lines · On Thu, 21 Dec 2017 11:36:57 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 23 lines · On Wed, 20 Dec 2017 14:24:24 -0500 (EST) David Miller <[email protected]>…
From: David Miller <[email protected]>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)Quoted 10 lines
From: Masami Hiramatsu <[email protected]>
Date: Wed, 20 Dec 2017 13:14:11 +0900Quoted 7 lines
This series is v4 of the replacement of jprobe usage with trace events. This version is rebased on net-next, fixes a build warning and moves a temporal variable definition in a block.
Previous version is here;
https://lkml.org/lkml/2017/12/19/153Quoted 7 lines
Quoted 5 lines
Changes from v3:
All: Rebased on net-next
[3/6]: fixes a build warning for i386 by casting pointer unsigned
long instead of__u64, and moves a temporal variable
definition in a block.Looks good, series applied to net-next, thanks.
Actually, this doesn't even compile, so I've reverted:
Quoted 7 lines
[davem@dhcp-10-15-49-227 net-next]$ make -s -j16
In file included fromnet/dccp/trace.h:105:0,from net/dccp/proto.c:42: ./include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) ^compilation terminated.
Quoted 6 lines
Hi David,
Could you share your .config file? I would like to reproduce it. When I tried with attached kconfig, I could not reproduce this issue, and could run it.
Hi Masami,
Quoted 7 lines
Are you sure you committed everything in this change set? I don't see a modification of the
Makefileto get thetrace.hfile you created. Shouldn't there be something like:CFLAGS_proto.o := -I$(src)
in the
Makefile?
You're correct. I could reproduce it with kallmodconfig. And when I add below diff, it is resolved.
If I built with O=<dir> option, it didn't happen.
net/dccp/Makefile +2 -0
@@ -25,3 +25,5 @@ obj-$(CONFIG_INET_DCCP_DIAG) += dccp_diag.o dccp-$(CONFIG_SYSCTL) += sysctl.o dccp_diag-y := diag.o + +CFLAGS_proto.o := -I$(src)
I'll update [5/6].
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
David Miller
maintainerFrom: Masami Hiramatsu <[email protected]>
Date: Thu, 21 Dec 2017 11:36:57 +0900
Quoted 1 line
Could you share your .config file?
You never need to ask me this question.
All of my test builds are with "allmodconfig".
Masami Hiramatsu
maintainerQuoted 8 lines · On Wed, 20 Dec 2017 23:08:38 -0500 (EST) David Miller <[email protected]>…
From: Masami Hiramatsu <[email protected]>
Date: Thu, 21 Dec 2017 11:36:57 +0900Quoted 1 line
Could you share your .config file?
You never need to ask me this question.
All of my test builds are with "allmodconfig".
OK, thanks!
Signature · 1 line
Masami Hiramatsu <[email protected]>