cpuinfo: show cpufreq when hardware perfermance counting enabled
Signed-off-by: liaoao <liaoao@xiaomi.com>
This commit is contained in:
parent
45c04e9125
commit
c31e869fac
@ -51,9 +51,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* CPU Features */
|
||||
|
||||
|
@ -72,9 +72,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* CPU Features */
|
||||
|
||||
|
@ -70,9 +70,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* CPU Features */
|
||||
|
||||
|
@ -72,9 +72,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* CPU Features */
|
||||
|
||||
|
@ -74,9 +74,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* Cpu features */
|
||||
|
||||
|
@ -72,9 +72,11 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "BogoMIPS\t: %u.%02u\n",
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* CPU Features */
|
||||
|
||||
|
@ -100,14 +100,17 @@ ssize_t up_show_cpuinfo(FAR char *buf, size_t buf_size, off_t file_off)
|
||||
|
||||
procfs_sprintf(buf, buf_size, &file_off,
|
||||
"byte order\t: %s\n"
|
||||
"cpu MHz\t\t: %lu.%02lu\n"
|
||||
"bogomips\t: %u.%02u\n",
|
||||
XCHAL_HAVE_BE ? "big" : "little",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100,
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 1000),
|
||||
(CONFIG_BOARD_LOOPSPERMSEC / 10) % 100);
|
||||
|
||||
#if defined(CONFIG_ARCH_PERF_EVENTS)
|
||||
procfs_sprintf(buf, buf_size, &file_off, "cpu MHz\t\t: %lu.%02lu\n",
|
||||
up_perf_getfreq() / 1000000,
|
||||
(up_perf_getfreq() / 10000) % 100);
|
||||
#endif
|
||||
|
||||
/* Features */
|
||||
|
||||
procfs_sprintf(buf, buf_size, &file_off, "flags\t\t: "
|
||||
|
Loading…
Reference in New Issue
Block a user