lkml.org 
[lkml]   [2021]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 0/2] net: snmp: tracepoint support for snmp
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

\
 
 \ /
  Last update: 2021-11-12 15:32    [W:0.079 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site