aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/arm
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-08-10 22:54:33 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2017-08-11 02:52:21 -0700
commitecdc375c54201be5776ce93d665ee77f74b1167a (patch)
treee7f1354d5587a58306a41ecd2b2f73b40e11f2f0 /modules/devices/arm
parent242cf8f80c05d655c3ae6ce22ec3751668b11895 (diff)
CPU Frequency Desc and benchmark result re-format
Current CPU configurations aren't properly represented in Hardinfo. For SMT, each hardware thread is still reported as a CPU. Clusters with different CPU clock rates are not reported. It is common for ARM to pair a cluster of fast cores with a cluster of slower, but more power-efficient cores. These changes attempt to address this. The getProcessorFrequency method now returns the processor's max frequency for all its cores. While the new getProcessorFrequencyDesc lists each unique frequency with a prefix Nx with the count of cores at that freqency. Benchmark results have been reformated to use the de-prefixed getProcessorName and getProcessorFrequencyDesc. As an example from benchmark.conf: 4x AMD Phenom(tm) II X4 940 Processor | 800 MHz becomes: AMD Phenom(tm) II X4 940 Processor | 4x 800 MHz Which, I think, makes much more sense, as it works well with this kind of thing: Qualcomm Snapdragon 691 | 4x 1400 MHz + 4x 800 MHz Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/arm')
-rw-r--r--modules/devices/arm/processor.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/devices/arm/processor.c b/modules/devices/arm/processor.c
index bcfb570e..0448f72a 100644
--- a/modules/devices/arm/processor.c
+++ b/modules/devices/arm/processor.c
@@ -323,16 +323,24 @@ gchar *processor_describe(GSList * processors) {
gchar *processor_meta(GSList * processors) {
gchar *meta_soc = processor_name(processors);
gchar *meta_cpu_desc = processor_describe(processors);
+ gchar *meta_cpu_topo = processor_describe_default(processors);
+ gchar *meta_clocks = processor_frequency_desc(processors);
gchar *ret = NULL;
UNKIFNULL(meta_cpu_desc);
ret = g_strdup_printf("[%s]\n"
"%s=%s\n"
+ "%s=%s\n"
+ "%s=%s\n"
"%s=%s\n",
_("SOC/Package"),
_("Name"), meta_soc,
- _("Description"), meta_cpu_desc);
+ _("Description"), meta_cpu_desc,
+ _("Topology"), meta_cpu_topo,
+ _("Clocks"), meta_clocks );
g_free(meta_soc);
g_free(meta_cpu_desc);
+ g_free(meta_cpu_topo);
+ g_free(meta_clocks);
return ret;
}
@@ -351,10 +359,10 @@ gchar *processor_get_info(GSList * processors)
for (l = processors; l; l = l->next) {
processor = (Processor *) l->data;
- tmp = g_strdup_printf(_("%s$CPU%d$%s=%.2fMHz\n"),
+ tmp = g_strdup_printf(_("%s$CPU%d$%s=%.2f%s\n"),
tmp, processor->id,
processor->model_name,
- processor->cpu_mhz);
+ processor->cpu_mhz, _("MHz"));
hashkey = g_strdup_printf("CPU%d", processor->id);
moreinfo_add_with_prefix("DEV", hashkey,