[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK3+h2xQbw=4s8qRK9WDGmzDhsWC2WhqkYWuwKUXdJFwLaL2Pg@mail.gmail.com>
Date: Wed, 30 Apr 2025 18:37:57 -0700
From: Vincent Li <vincent.mc.li@...il.com>
To: Huacai Chen <chenhuacai@...nel.org>
Cc: Tiezhu Yang <yangtiezhu@...ngson.cn>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] Enable some configs in loongson3_defconfig
Hi Tiezhu,
On Wed, Apr 30, 2025 at 6:41 AM Huacai Chen <chenhuacai@...nel.org> wrote:
>
> Hi, Tiezhu,
>
> When I enable these options:
> CONFIG_FTRACE=y
> CONFIG_FUNCTION_TRACER=y
> CONFIG_FUNCTION_GRAPH_TRACER=y
> CONFIG_DYNAMIC_FTRACE=y
> CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
> CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
> CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y
> CONFIG_KPROBES=y
> CONFIG_UPROBES=y
> CONFIG_KPROBE_EVENTS=y
> CONFIG_UPROBE_EVENTS=y
>
> Then your above commands will hang (or get a SIGTRAP), which options I
> am missing?
>
> I haven't tried your patches, maybe it works, but I want to know the
> exactly needed options.
>
> Huacai
>
>
> On Wed, Apr 30, 2025 at 9:15 PM Tiezhu Yang <yangtiezhu@...ngson.cn> wrote:
> >
> > This is a small patchset based on 6.15-rc4, each patch is a
> > single logical change to better describe the problem and make
> > it easier to review.
> >
> > If the changes make sense, all of them can be squashed into one
> > single patch, I think that would be fine as well, let us see if
> > other people have concern about it.
> >
> > By the way, I received many compile-time error reports about tools,
> > most are related with configs, this is the motivation of this series.
> >
> > Additionally, I also received one run-time bug report about uprobe,
> > but it works fine on my test environment. If somebody can reproduce
> > it, please let me know, maybe I am missing something.
> >
> > 1. How to reproduce
> >
> > (1) Compile and install Tongsuo
> >
> > git clone https://github.com/Tongsuo-Project/Tongsuo.git
> > cd Tongsuo && ./config --prefix=/opt/tongsuo -Wl,-rpath,/opt/tongsuo/lib
> > make && sudo make install
> >
> > https://www.tongsuo.net/docs/compilation/source-compilation
> >
> > (2) Compile and update kernel
> >
> > Apply this series based on 6.15-rc4, then use the loongson3_defconfig,
> > CONFIG_UPROBE_EVENTS is already set.
> >
> > (3) Probe "openssl speed sm2"
> >
> > cd tools/perf && make
> > sudo ./perf probe -x /usr/lib64/libcrypto.so BN_mod_mul_montgomery
> > sudo ./perf stat -e probe_libcrypto:BN_mod_mul_montgomery /opt/tongsuo/bin/openssl speed sm2
> >
> > 2. My test results
> >
> > fedora@...ux:~/uprobe.git/tools/perf$ sudo ./perf probe -x /usr/lib64/libcrypto.so BN_mod_mul_montgomery
> > Added new event:
> > probe_libcrypto:BN_mod_mul_montgomery (on BN_mod_mul_montgomery in /usr/lib64/libcrypto.so.3.2.2)
> >
> > You can now use it in all perf tools, such as:
> >
> > perf record -e probe_libcrypto:BN_mod_mul_montgomery -aR sleep 1
> >
> > fedora@...ux:~/uprobe.git/tools/perf$ sudo ./perf stat -e probe_libcrypto:BN_mod_mul_montgomery /opt/tongsuo/bin/openssl speed sm2
> > Doing 256 bits sign CurveSM2's for 10s: 7463 256 bits CurveSM2 signs in 10.00s
> > Doing 256 bits verify CurveSM2's for 10s: 9681 256 bits CurveSM2 verify in 9.98s
> > ...
> > sign verify sign/s verify/s
> > 256 bits SM2 (CurveSM2) 0.0013s 0.0010s 746.3 970.0
> >
> > Performance counter stats for '/opt/tongsuo/bin/openssl speed sm2':
> >
> > 0 probe_libcrypto:BN_mod_mul_montgomery
> >
> > 20.007539877 seconds time elapsed
> >
> > 19.990010000 seconds user
> > 0.000000000 seconds sys
> >
> > Thanks,
> > Tiezhu
> >
> > Tiezhu Yang (5):
> > LoongArch: Clean up loongson3_defconfig
> > LoongArch: Enable tracing infrastructure in defconfig
> > LoongArch: Enable tracing syscalls in defconfig
> > LoongArch: Enable debug information in defconfig
> > LoongArch: Enable kprobe and ftrace in defconfig
> >
> > arch/loongarch/configs/loongson3_defconfig | 74 +++++-----------------
> > 1 file changed, 16 insertions(+), 58 deletions(-)
I recommend putting all the config changes in one patch so it is
easier to review change and test, I have to look through each patch to
see what config changed.
> >
> > --
> > 2.42.0
> >
>
Powered by blists - more mailing lists