mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] Enable some configs in loongson3_defconfig
@ 2025-04-30 13:15 Tiezhu Yang
  2025-04-30 13:15 ` [PATCH 1/5] LoongArch: Clean up loongson3_defconfig Tiezhu Yang
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Tiezhu Yang @ 2025-04-30 13:15 UTC (permalink / raw)
  To: Huacai Chen; +Cc: loongarch, linux-kernel

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@linux:~/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@linux:~/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(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-09 15:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-30 13:15 [PATCH 0/5] Enable some configs in loongson3_defconfig Tiezhu Yang
2025-04-30 13:15 ` [PATCH 1/5] LoongArch: Clean up loongson3_defconfig Tiezhu Yang
2025-04-30 13:15 ` [PATCH 2/5] LoongArch: Enable tracing infrastructure in defconfig Tiezhu Yang
2025-04-30 13:15 ` [PATCH 3/5] LoongArch: Enable tracing syscalls " Tiezhu Yang
2025-04-30 13:15 ` [PATCH 4/5] LoongArch: Enable debug information " Tiezhu Yang
2025-04-30 13:15 ` [PATCH 5/5] LoongArch: Enable kprobe and ftrace " Tiezhu Yang
2025-04-30 13:41 ` [PATCH 0/5] Enable some configs in loongson3_defconfig Huacai Chen
2025-05-01  1:37   ` Vincent Li
2025-05-01  3:19     ` Huacai Chen
2025-05-07  4:24   ` Huacai Chen
2025-05-09 15:09     ` Tiezhu Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®