All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Chaignon <paul.chaignon@gmail.com>
To: Eduard Zingerman <eddyz87@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>
Subject: Re: [PATCH bpf-next v3 3/3] veristat: Report max stack depth
Date: Thu, 14 May 2026 13:40:22 +0200	[thread overview]
Message-ID: <agW0pt2oNh9oKq89@Tunnel> (raw)
In-Reply-To: <fe8bedbcf7a9c0b3af7c92351a694784804f7e82.camel@gmail.com>

On Wed, May 13, 2026 at 04:23:48PM -0700, Eduard Zingerman wrote:
> On Wed, 2026-05-13 at 21:35 +0200, Paul Chaignon wrote:
> 
> [...]
> 
> > @@ -834,6 +835,7 @@ static struct stat_def {
> >  	[SIZE] = { "Program size", {"prog_size"}, },
> >  	[JITED_SIZE] = { "Jited size", {"prog_size_jited"}, },
> >  	[STACK] = {"Stack depth", {"stack_depth", "stack"}, },
> > +	[MAX_STACK] = {"Max stack depth", {"max_stack_depth"}, },
> >  	[PROG_TYPE] = { "Program type", {"prog_type"}, },
> >  	[ATTACH_TYPE] = { "Attach type", {"attach_type", }, },
> >  	[MEMORY_PEAK] = { "Peak memory (MiB)", {"mem_peak", }, },
> > @@ -1023,7 +1025,7 @@ static int parse_verif_log(char * const buf, size_t buf_sz, struct verif_stats *
> >  				&s->stats[MARK_READ_MAX_LEN]))
> >  			continue;
> >  
> > -		if (1 == sscanf(cur, "stack depth %511s", stack))
> > +		if (2 == sscanf(cur, "stack depth %511s max %ld", stack, &s->stats[MAX_STACK]))
> >  			continue;
> >  	}
> >  	while ((token = strtok_r(cnt++ ? NULL : stack, "+", &state))) {
> 
> Thinking about it some more I think that the meaning of the
> STACK/"Stack depth" metric should swapped for max stack depth.

Hm, I was a bit worried that might be considered a breaking change
(ex., if someone is tracking the STACK metric over time), but if you
think it's alright, I can send a followup to replace STACK with
MAX_STACK. I agree it would be better as the STACK metric may not
correspond to anything real at the moment (ex., if the callgraph may be
all flat).

> 
> [...]

  reply	other threads:[~2026-05-14 11:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 19:33 [PATCH bpf-next v3 0/3] bpf: Maximum combined stack depth Paul Chaignon
2026-05-13 19:34 ` [PATCH bpf-next v3 1/3] bpf: Report maximum " Paul Chaignon
2026-05-13 23:24   ` Eduard Zingerman
2026-05-13 19:35 ` [PATCH bpf-next v3 2/3] selftests/bpf: Test reported max " Paul Chaignon
2026-05-13 23:31   ` Eduard Zingerman
2026-05-13 19:35 ` [PATCH bpf-next v3 3/3] veristat: Report " Paul Chaignon
2026-05-13 23:23   ` Eduard Zingerman
2026-05-14 11:40     ` Paul Chaignon [this message]
2026-05-14  1:40 ` [PATCH bpf-next v3 0/3] bpf: Maximum combined " patchwork-bot+netdevbpf

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=agW0pt2oNh9oKq89@Tunnel \
    --to=paul.chaignon@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=memxor@gmail.com \
    /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.