diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2018-03-06 10:46:57 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-03-07 16:53:00 +0300 |
commit | c67dcec1c034a0c75c093b49e2a172bbd3d50def (patch) | |
tree | 7ced7e39fadf46e8486d7359287471aa7d38cc92 /platform/linux-generic/odp_system_info.c | |
parent | 80b9a1e4d6a297ac916cbaf360e7b2114ef86a7a (diff) |
linux-gen: sysinfo: add content to info string print
Added implementation details string and cpu mask to system
info print out.
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/odp_system_info.c')
-rw-r--r-- | platform/linux-generic/odp_system_info.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index d460a1981..d1cda1ea2 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -489,26 +489,36 @@ int odp_cpu_count(void) void odp_sys_info_print(void) { - int len; + int len, num_cpu; int max_len = 512; + odp_cpumask_t cpumask; + char cpumask_str[ODP_CPUMASK_STR_SIZE]; char str[max_len]; + memset(cpumask_str, 0, sizeof(cpumask_str)); + + num_cpu = odp_cpumask_all_available(&cpumask); + odp_cpumask_to_str(&cpumask, cpumask_str, ODP_CPUMASK_STR_SIZE); + len = snprintf(str, max_len, "\n" "ODP system info\n" "---------------\n" - "ODP API version: %s\n" - "ODP impl name: %s\n" - "CPU model: %s\n" - "CPU freq (hz): %" PRIu64 "\n" - "Cache line size: %i\n" - "CPU count: %i\n" + "ODP API version: %s\n" + "ODP impl name: %s\n" + "ODP impl details: %s\n" + "CPU model: %s\n" + "CPU freq (hz): %" PRIu64 "\n" + "Cache line size: %i\n" + "CPU count: %i\n" + "CPU mask: %s\n" "\n", odp_version_api_str(), odp_version_impl_name(), + odp_version_impl_str(), odp_cpu_model_str(), odp_cpu_hz_max(), odp_sys_cache_line_size(), - odp_cpu_count()); + num_cpu, cpumask_str); str[len] = '\0'; ODP_PRINT("%s", str); |