获取 ARM 处理器中的缓存详细信息 - Linux [英] Getting cache details in ARM processors - Linux

查看:48
本文介绍了获取 ARM 处理器中的缓存详细信息 - Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在英特尔处理器上

Linux linux-epq2.site 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux

获取缓存详细信息:

cat /sys/devices/system/cpu/cpu*/cache/index*/

其中*是各自的cpu和缓存索引号

Where * is the respective cpu and cache index numbers

但是,在 ARM 处理器上,此文件/文件夹不可用.有没有办法获取这些详细信息?

However, on ARM processors, this file/folder is not available. Is there a way to fetch these details?

Linux arndale 3.9.0-rc5+ #8 SMP Tue Apr 9 12:40:32 CEST 2013 armv7l GNU/Linux

推荐答案

从 ARMv8A(64 位)开始,可以从 CLIDR 寄存器中获取缓存信息.因此缓存信息可以填充到 Linux 中的/sys 文件系统.查看 kernel/arch/arm64/kernel/cacheinfo.c 中的详细信息.

From ARMv8A (64bit), it is possible to get cache info from CLIDR register. So cache info can be populated to /sys file system in Linux. Check detail from kernel/arch/arm64/kernel/cacheinfo.c.

这篇关于获取 ARM 处理器中的缓存详细信息 - Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆