[缺陷描述]: anolis23 arm环境中没有配置CONFIG_OPROFILE,环境中缺少oprofile.ko模块 报错如下: # rmmod oprofile rmmod: ERROR: Module oprofile is not currently loaded # modprobe oprofile timer=1 modprobe: FATAL: Module oprofile not found in directory /lib/modules/5.10.134-14.an23.aarch64 # lsmod|grep oprofile [复现概率]: 必现 [复现环境]: 内核: # uname -r 5.10.134-14.an23.aarch64 # cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" 内存信息: # free -g total used free shared buff/cache available Mem: 30 10 13 0 6 19 Swap: 0 0 0 cpu信息: # lscpu Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 48 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: ARM BIOS Vendor ID: Alibaba Cloud Model name: Neoverse-N2 BIOS Model name: virt-rhel7.6.0 CPU @ 2.0GHz BIOS CPU family: 1 Model: 0 Thread(s) per core: 1 Core(s) per socket: 8 Socket(s): 1 Stepping: r0p0 Frequency boost: disabled CPU(s) scaling MHz: 100% CPU max MHz: 2750.0000 CPU min MHz: 2750.0000 BogoMIPS: 100.00 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm ssbs sb dcpodp sve2 svea es svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh Caches (sum of all): L1d: 512 KiB (8 instances) L1i: 512 KiB (8 instances) L2: 8 MiB (8 instances) L3: 64 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities: Itlb multihit: Not affected L1tf: Not affected Mds: Not affected Meltdown: Not affected Mmio stale data: Not affected Retbleed: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; __user pointer sanitization Spectre v2: Mitigation; CSV2, BHB Srbds: Not affected Tsx async abort: Not affected [复现步骤]: rmmod oprofile modprobe oprofile timer=1 lsmod|grep oprofile [预期结果]: oprofile.ko模块加载成功 [实际结果]: 加载失败,找不到oprofile.ko模块
oprofile 模块在 x86 中确实存在,arm 中没有,转交马乔处理。 x86: [root@localhost ~]# rpm -ql kernel-core-5.10.134-14.an23.x86_64 | grep oprofile /lib/modules/5.10.134-14.an23.x86_64/kernel/arch/x86/oprofile /lib/modules/5.10.134-14.an23.x86_64/kernel/arch/x86/oprofile/oprofile.ko arm: [root@localhost code]# rpm -ql kernel-core-5.10.134-14.1.an23.aarch64.rpm | grep oprofile [root@localhost code]#
alinux3 的内核也没有这个ko Linux iZbp1bcwxj0kpikpgpsnrvZ 5.10.134-14.al8.aarch64 #1 SMP Thu Apr 27 16:43:40 CST 2023 aarch64 aarch64 aarch64 GNU/Linux [root@iZbp1bcwxj0kpikpgpsnrvZ ~]# lsmod|grep oprofile anolis8的内核也没有。 [root@iZbp1bcwxj0kpikrfqwpvpZ ~]# uname -a Linux iZbp1bcwxj0kpikrfqwpvpZ 5.10.134-14.al8.aarch64 #1 SMP Thu Apr 27 16:43:40 CST 2023 aarch64 aarch64 aarch64 GNU/Linux [root@iZbp1bcwxj0kpikrfqwpvpZ ~]# lsmod|grep oprofile [root@iZbp1bcwxj0kpikrfqwpvpZ ~]#
arm64上不支持打开CONFIG_OPROFILE。 该config的信息如下: config OPROFILE tristate "OProfile system profiling" depends on PROFILING depends on HAVE_OPROFILE select RING_BUFFER select RING_BUFFER_ALLOW_SWAP help OProfile is a profiling system capable of profiling the whole system, include the kernel, kernel modules, libraries, and applications. If unsure, say N. 其中,依赖于HAVE_OPROFILE这个config。 在x86中,CONFIG_X86会select HAVE_OPROFILE,从而将其打开。 但是在arm64中,并没有CONFIG会select它,说明arm64不支持该config。 因此,将该问题置为invalid