All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Menglong Dong <menglong8.dong@gmail.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
	David Miller <davem@davemloft.net>,
	mingo@redhat.com, Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	dsahern@kernel.org, Menglong Dong <imagedong@tencent.com>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 0/2] net: snmp: tracepoint support for snmp
Date: Fri, 12 Nov 2021 09:31:40 -0500	[thread overview]
Message-ID: <20211112093140.373da4f7@gandalf.local.home> (raw)
In-Reply-To: <CADxym3YzMGG3gZ1X6gc=qF182Ow0iO+782Hjn3QvnFnRhfEbRA@mail.gmail.com>

On Fri, 12 Nov 2021 14:42:23 +0800
Menglong Dong <menglong8.dong@gmail.com> wrote:

> What's more, I have also realized another version: create tracepoint for every
> statistics type, such as snmp_udp_incsumerrors, snmp_udp_rcvbuferrors, etc.
> This can solve performance issue, as users can enable part of them, which
> may be triggered not frequently. However, too many tracepoint are created, and
> I think it may be not applicable.

If possible, it would be great to have a single tracepoint to handle all
statistics (not sure what data it will be having). Or at least break it
down to one tracepoint per group of statistics.

There's two approaches that can be taken.

1) Create a DECLARE_EVENT_CLASS() template that the group of tracepoints
use, and then create a DEFINE_EVENT() for each one. This will create a
separate trace event for each stat. Most the footprint of a trace event is
in the CLASS portion, so having a single class helps keep the size overhead
down.

2) Just use a single trace event for all stats in a group, but perhaps have
a type field for each to use. That way it can be easy to filter on a set of
stats to trace.

-- Steve

  reply	other threads:[~2021-11-12 14:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 13:35 [PATCH net-next 0/2] net: snmp: tracepoint support for snmp menglong8.dong
2021-11-11 13:35 ` [PATCH net-next 1/2] net: snmp: add " menglong8.dong
2021-11-16 21:34   ` Steven Rostedt
2021-11-17 13:55     ` Menglong Dong
2021-11-11 13:35 ` [PATCH net-next 2/2] net: snmp: add snmp tracepoint support for udp menglong8.dong
2021-11-11 21:07   ` kernel test robot
2021-11-11 21:07     ` kernel test robot
2021-11-13  3:32   ` kernel test robot
2021-11-13  3:32     ` kernel test robot
2021-11-11 14:08 ` [PATCH net-next 0/2] net: snmp: tracepoint support for snmp Jakub Kicinski
2021-11-12  1:40   ` Menglong Dong
2021-11-12  1:50     ` Jakub Kicinski
2021-11-12  6:42       ` Menglong Dong
2021-11-12 14:31         ` Steven Rostedt [this message]
2021-11-16  2:27           ` Menglong Dong

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=20211112093140.373da4f7@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=imagedong@tencent.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=menglong8.dong@gmail.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.