Re: [PATCH bpf-next v16 2/2] selftests/bpf: Enrich subtest_basic_usdt case in selftests to cover SIB handling logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 26, 2025 at 10:31 PM Jiawei Zhao <phoenix500526@xxxxxxx> wrote:
>
> When using GCC on x86-64 to compile an usdt prog with -O1 or higher
> optimization, the compiler will generate SIB addressing mode for global
> array, e.g. "1@-96(%rbp,%rax,8)".
>
> In this patch:
> - enrich subtest_basic_usdt test case to cover SIB addressing usdt argument spec
>   handling logic
>
> Signed-off-by: Jiawei Zhao <phoenix500526@xxxxxxx>
> ---
>  tools/testing/selftests/bpf/prog_tests/usdt.c | 84 ++++++++++++++++++-
>  tools/testing/selftests/bpf/progs/test_usdt.c | 31 +++++++
>  2 files changed, 113 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/usdt.c b/tools/testing/selftests/bpf/prog_tests/usdt.c
> index 9057e983cc54..9df2827991c7 100644
> --- a/tools/testing/selftests/bpf/prog_tests/usdt.c
> +++ b/tools/testing/selftests/bpf/prog_tests/usdt.c
> @@ -25,6 +25,7 @@ unsigned short test_usdt0_semaphore SEC(".probes");
>  unsigned short test_usdt3_semaphore SEC(".probes");
>  unsigned short test_usdt12_semaphore SEC(".probes");
>
> +

next time don't add random empty lines or unrelated formatting changes
(I fixed this up as well while applying)

>  static void __always_inline trigger_func(int x) {
>         long y = 42;
>

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux