mbox series

[net-next,v4,0/6] net: tcp: sctp: dccp: Replace jprobe usage with trace events

Message ID 151374325126.2497.6934744693865165386.stgit@devbox
Headers show
Series net: tcp: sctp: dccp: Replace jprobe usage with trace events | expand

Message

Masami Hiramatsu (Google) Dec. 20, 2017, 4:14 a.m. UTC
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) <mhiramat@kernel.org>

Comments

David Miller Dec. 20, 2017, 7:20 p.m. UTC | #1
From: Masami Hiramatsu <mhiramat@kernel.org>
Date: Wed, 20 Dec 2017 13:14:11 +0900

> 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.

Looks good, series applied to net-next, thanks.
David Miller Dec. 20, 2017, 7:24 p.m. UTC | #2
From: David Miller <davem@davemloft.net>
Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)

> From: Masami Hiramatsu <mhiramat@kernel.org>
> Date: Wed, 20 Dec 2017 13:14:11 +0900
> 
>> 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.
> 
> 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 (Google) Dec. 21, 2017, 12:10 a.m. UTC | #3
On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
David Miller <davem@davemloft.net> wrote:

> From: David Miller <davem@davemloft.net>
> Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
> 
> > From: Masami Hiramatsu <mhiramat@kernel.org>
> > Date: Wed, 20 Dec 2017 13:14:11 +0900
> > 
> >> 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.
> > 
> > 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.

Hmm, strange.
I could compile it on x86-64 and i386. Let me check what was wrong.

Thanks,
Masami Hiramatsu (Google) Dec. 21, 2017, 2:36 a.m. UTC | #4
On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
David Miller <davem@davemloft.net> wrote:

> From: David Miller <davem@davemloft.net>
> Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
> 
> > From: Masami Hiramatsu <mhiramat@kernel.org>
> > Date: Wed, 20 Dec 2017 13:14:11 +0900
> > 
> >> 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.
> > 
> > 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.

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 # ls
dccp_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,
Steven Rostedt Dec. 21, 2017, 3:12 a.m. UTC | #5
On Thu, 21 Dec 2017 11:36:57 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: David Miller <davem@davemloft.net>
> > Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
> >   
> > > From: Masami Hiramatsu <mhiramat@kernel.org>
> > > Date: Wed, 20 Dec 2017 13:14:11 +0900
> > >   
> > >> 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.  
> > > 
> > > 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.  
> 
> 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
David Miller Dec. 21, 2017, 4:08 a.m. UTC | #6
From: Masami Hiramatsu <mhiramat@kernel.org>
Date: Thu, 21 Dec 2017 11:36:57 +0900

> Could you share your .config file?

You never need to ask me this question.

All of my test builds are with "allmodconfig".
Masami Hiramatsu (Google) Dec. 21, 2017, 12:43 p.m. UTC | #7
On Wed, 20 Dec 2017 23:08:38 -0500 (EST)
David Miller <davem@davemloft.net> wrote:

> From: Masami Hiramatsu <mhiramat@kernel.org>
> Date: Thu, 21 Dec 2017 11:36:57 +0900
> 
> > Could you share your .config file?
> 
> You never need to ask me this question.
> 
> All of my test builds are with "allmodconfig".

OK, thanks!
Masami Hiramatsu (Google) Dec. 21, 2017, 1:16 p.m. UTC | #8
On Wed, 20 Dec 2017 22:12:38 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 21 Dec 2017 11:36:57 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
> > David Miller <davem@davemloft.net> wrote:
> > 
> > > From: David Miller <davem@davemloft.net>
> > > Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
> > >   
> > > > From: Masami Hiramatsu <mhiramat@kernel.org>
> > > > Date: Wed, 20 Dec 2017 13:14:11 +0900
> > > >   
> > > >> 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.  
> > > > 
> > > > 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.  
> > 
> > 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?

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,
Masami Hiramatsu (Google) Dec. 21, 2017, 2:27 p.m. UTC | #9
On Wed, 20 Dec 2017 22:12:38 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Thu, 21 Dec 2017 11:36:57 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > On Wed, 20 Dec 2017 14:24:24 -0500 (EST)
> > David Miller <davem@davemloft.net> wrote:
> > 
> > > From: David Miller <davem@davemloft.net>
> > > Date: Wed, 20 Dec 2017 14:20:40 -0500 (EST)
> > >   
> > > > From: Masami Hiramatsu <mhiramat@kernel.org>
> > > > Date: Wed, 20 Dec 2017 13:14:11 +0900
> > > >   
> > > >> 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.  
> > > > 
> > > > 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.  
> > 
> > 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?

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. 

diff --git a/net/dccp/Makefile b/net/dccp/Makefile
index 9d0383d2f277..8d4a8e901ae0 100644
--- a/net/dccp/Makefile
+++ b/net/dccp/Makefile
@@ -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,