linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: 赵佳炜 <phoenix500526@163.com>
Cc: Jiri Olsa <olsajiri@gmail.com>,
	ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	yonghong.song@linux.dev, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH bpf-next v10 3/3] selftests/bpf: make usdt_o2 reliably generate SIB USDT arg spec
Date: Mon, 18 Aug 2025 08:56:56 +0200	[thread overview]
Message-ID: <aKLOuLGY93zYXbxA@krava> (raw)
In-Reply-To: <5f3a942c.1b6e.198b1b181ef.Coremail.phoenix500526@163.com>

On Sat, Aug 16, 2025 at 03:04:17PM +0800, 赵佳炜 wrote:
> 
> 
> 
> 
> 
> 
> Hi, Jiri. Sorry for my oversight, the optimized compile condition didn't work properly.
> 
> Could you try to replace the `__attribute__((optimize("O2")))` with `#pragma GCC optimize("O2")`
> in usdt_o2.c and verify it one more time?  I guess it'll help. In fact, the usdt1 argument spec generated 
> by the `__attribute__((optimize("O2")))` on my machine was `8@%rax`, not `8@(%rdx,%rax,8)`.
> 
> For more detail:
> 
> > - #if defined(__GNUC__) && !defined(__clang__)
> > - __attribute__((optimize("O2")))
> >
> > +#if (defined(__GNUC__) && !defined(__clang__))
> > +#pragma GCC optimize("O2")
> > +#else
> > +#pragma message("non-gcc compiler: the correct probes might not be installed")
> > +#endif
> 
> Thanks

yep, that helped

  stapsdt              0x00000033       NT_STAPSDT (SystemTap probe descriptors)
    Provider: test
    Name: usdt1
    Location: 0x00000000007674d9, Base: 0x00000000035bc698, Semaphore: 0x0000000000000000
    Arguments: 8@(%rdx,%rax,8)


thanks,
jirka

      reply	other threads:[~2025-08-18  6:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 16:07 [PATCH bpf-next v10 0/3] libbpf: fix USDT SIB argument handling causing unrecognized register error Jiawei Zhao
2025-08-14 16:07 ` [PATCH bpf-next v10 1/3] " Jiawei Zhao
2025-08-14 16:07 ` [PATCH bpf-next v10 2/3] selftests/bpf: Add an usdt_o2 test case in selftests to cover SIB handling logic Jiawei Zhao
2025-08-14 16:07 ` [PATCH bpf-next v10 3/3] selftests/bpf: make usdt_o2 reliably generate SIB USDT arg spec Jiawei Zhao
2025-08-15 12:44   ` Jiri Olsa
2025-08-16  7:04     ` 赵佳炜
2025-08-18  6:56       ` Jiri Olsa [this message]

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=aKLOuLGY93zYXbxA@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=phoenix500526@163.com \
    --cc=yonghong.song@linux.dev \
    /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).