From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Martin KaFai Lau <kafai@fb.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
Steven Rostedt <rostedt@goodmis.org>,
Lawrence Brakmo <brakmo@fb.com>, Josef Bacik <jbacik@fb.com>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [RFC PATCH net-next 3/5] tcp: Add a few more tracepoints for tcp tracer
Date: Wed, 17 Dec 2014 08:59:40 -0700 [thread overview]
Message-ID: <5491A86C.5030207@gmail.com> (raw)
In-Reply-To: <20141217153349.GG11607@kernel.org>
On 12/17/14 8:33 AM, Arnaldo Carvalho de Melo wrote:
>
> On a random RHEL7 kernel I had laying around on a test machine:
>
> [root@ssdandy ~]# perf probe -L tcp_sacktag_write_queue | head -20
> <tcp_sacktag_write_queue@/usr/src/debug/kernel-3.10.0-123.el7/linux-3.10.0-123.el7.x86_64/net/ipv4/tcp_input.c:0>
> 0 tcp_sacktag_write_queue(struct sock *sk, const struct sk_buff *ack_skb,
> u32 prior_snd_una)
> 2 {
> struct tcp_sock *tp = tcp_sk(sk);
> 4 const unsigned char *ptr = (skb_transport_header(ack_skb) +
> TCP_SKB_CB(ack_skb)->sacked);
> struct tcp_sack_block_wire *sp_wire = (struct tcp_sack_block_wire *)(ptr+2);
> struct tcp_sack_block sp[TCP_NUM_SACKS];
> struct tcp_sack_block *cache;
> struct tcp_sacktag_state state;
> struct sk_buff *skb;
> 11 int num_sacks = min(TCP_NUM_SACKS, (ptr[1] - TCPOLEN_SACK_BASE) >> 3);
> int used_sacks;
> bool found_dup_sack = false;
> int i, j;
> int first_sack_index;
>
> 17 state.flag = 0;
> 18 state.reord = tp->packets_out;
But there are limitations/hassles with this approach. For starters I
believe it requires vmlinux on box. The products I work on do not have
vmlinux available in the runtime environment. I recall someone (Masami?)
suggesting the ability to write the probe data to a file (ie., create
the probe definition off box) and load the file to create the probe, so
yes a solvable problem.
But with this approach it could very be that the function name and
variable names differ with kernel version and that makes it hard to
impossible to create a set of analysis commands.
David
next prev parent reply other threads:[~2014-12-17 15:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 1:56 [RFC PATCH net-next 0/5] tcp: TCP tracer Martin KaFai Lau
2014-12-15 1:56 ` [RFC PATCH net-next 1/5] tcp: Add TCP TRACE_EVENTs Martin KaFai Lau
2014-12-17 15:08 ` David Ahern
2014-12-15 1:56 ` [RFC PATCH net-next 2/5] tcp: A perf script for TCP tracepoints Martin KaFai Lau
2014-12-15 1:56 ` [RFC PATCH net-next 3/5] tcp: Add a few more tracepoints for tcp tracer Martin KaFai Lau
2014-12-17 15:33 ` Arnaldo Carvalho de Melo
2014-12-17 15:59 ` David Ahern [this message]
2014-12-17 17:02 ` Arnaldo Carvalho de Melo
2014-12-15 1:56 ` [RFC PATCH net-next 4/5] tcp: Introduce tcp_sk_trace and related structs Martin KaFai Lau
2014-12-15 1:56 ` [RFC PATCH net-next 5/5] tcp: Add TCP tracer Martin KaFai Lau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5491A86C.5030207@gmail.com \
--to=dsahern@gmail.com \
--cc=Kernel-team@fb.com \
--cc=acme@kernel.org \
--cc=brakmo@fb.com \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=jbacik@fb.com \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).