diff options
author | Burt P <pburt0@gmail.com> | 2017-12-10 22:38:17 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-02-27 07:43:20 -0800 |
commit | 2f9dad39b0847991dd2b19dc3e999f89397f47f9 (patch) | |
tree | 59fdcc4a9d62b99a66ba376029ab52dca3b818e5 /hardinfo | |
parent | 6a9f6819ae661f64c3c042d48f74d6419f63580e (diff) |
x86,arm: cpu clocks list in package information
Show actual clocks where cores or threads share a clock.
Ex: x86 SMT each core has one clock shared by both threads.
Ex: BCM2837 has one clock for all four cores.
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo')
-rw-r--r-- | hardinfo/cpu_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hardinfo/cpu_util.c b/hardinfo/cpu_util.c index e5cf9045..a598d2ed 100644 --- a/hardinfo/cpu_util.c +++ b/hardinfo/cpu_util.c @@ -129,6 +129,11 @@ void cpufreq_update(cpufreq_data *cpufd, int cur_only) cpufd->cpukhz_max = get_cpu_int("cpufreq/scaling_max_freq", cpufd->id, 0); if (cpufd->scaling_driver == NULL) cpufd->scaling_driver = g_strdup("(Unknown)"); if (cpufd->scaling_governor == NULL) cpufd->scaling_governor = g_strdup("(Unknown)"); + + /* x86 uses freqdomain_cpus, all others use affected_cpus */ + cpufd->shared_list = get_cpu_str("cpufreq/freqdomain_cpus", cpufd->id); + if (cpufd->shared_list == NULL) cpufd->shared_list = get_cpu_str("cpufreq/affected_cpus", cpufd->id); + if (cpufd->shared_list == NULL) cpufd->shared_list = g_strdup_printf("%d", cpufd->id); } } |