All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Eugene Loh <eugene.loh@oracle.com>
Cc: Yonghong Song <yhs@fb.com>, bpf@vger.kernel.org
Subject: Re: using skip>0 with bpf_get_stack()
Date: Fri, 4 Mar 2022 12:37:33 -0800	[thread overview]
Message-ID: <YiJ4jTB8siLwxAEN@google.com> (raw)
In-Reply-To: <4e2e5738-b103-d340-753e-7e37e06304c4@fb.com>

Hello,

On Mon, Jun 28, 2021 at 08:33:11PM -0700, Yonghong Song wrote:
> 
> 
> On 6/25/21 6:22 PM, Eugene Loh wrote:
> > 
> > On 6/1/21 5:48 PM, Yonghong Song wrote:
> > > Could you submit a patch for this? Thanks!
> > 
> > Sure.  Thanks for looking at this and sorry about the long delay getting
> > back to you.
> > 
> > Could you take a look at the attached, proposed patch?  As you see in
> > the commit message, I'm unclear about the bpf_get_stack*_pe() variants.
> > They might use an earlier construct callchain, and I do not know ho
> > init_nr was set for them.
> 
> I think bpf_get_stackid() and __bpf_get_stackid() implementation is correct.
> Did you find any issues?
> 
> For bpf_get_stack_pe, see:
> 
> https://lore.kernel.org/bpf/20200723180648.1429892-2-songliubraving@fb.com/
> I think you should not change bpf_get_stack() function.
> __bpf_get_stack() is used by bpf_get_stack() and bpf_get_stack_pe().
> In bpf_get_stack_pe(), callchain is fetched by perf event infrastructure
> if event->attr.sample_type & __PERF_SAMPLE_CALLCHAIN_EARLY is true.
> 
> Just focus on __bpf_get_stack(). We could factor __bpf_get_stackid(),
> but unless we have a bug, I didn't see it is necessary.
> 
> It will be good if you can add a test for the change, there is a stacktrace
> test prog_tests/stacktrace_map.c, you can take a look,
> and you can add a subtest there.
> 
> Next time, you can submit a formal patch with `git send-email ...` to
> this alias. This way it is easier to review compared to attachment.

Any updates on this?  I'm hitting the same issue and found this before
sending a fix.

Thanks,
Namhyung

  reply	other threads:[~2022-03-04 20:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 22:16 using skip>0 with bpf_get_stack() Eugene Loh
2021-06-01 21:48 ` Yonghong Song
2021-06-26  1:22   ` Eugene Loh
2021-06-29  3:33     ` Yonghong Song
2022-03-04 20:37       ` Namhyung Kim [this message]
2022-03-04 20:50         ` Eugene Loh
2022-03-04 21:16           ` Namhyung Kim

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=YiJ4jTB8siLwxAEN@google.com \
    --to=namhyung@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=eugene.loh@oracle.com \
    --cc=yhs@fb.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.