From: Hongbo Zhang <[email protected]> The previous odp_sys_cpu_hz() is moved to cpu.h and then renamed to odp_cpu_hz(), but all the calling function of odp{_sys}_cpu_hz() want to show maximun CPU capacity in fact, so they should be updated to use the newly added odp_cpu_hz_max() instead of odp_cpu_hz(). This patch updates the test codes.
Signed-off-by: Hongbo Zhang <[email protected]> --- test/api_test/odp_common.c | 2 +- test/performance/odp_atomic.c | 2 +- test/performance/odp_l2fwd.c | 2 +- test/performance/odp_scheduling.c | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/api_test/odp_common.c b/test/api_test/odp_common.c index 8540108..5e6d542 100644 --- a/test/api_test/odp_common.c +++ b/test/api_test/odp_common.c @@ -42,7 +42,7 @@ void odp_print_system_info(void) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz()); + printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("CPU count: %i\n", odp_cpu_count()); printf("CPU mask: %s\n", str); diff --git a/test/performance/odp_atomic.c b/test/performance/odp_atomic.c index 101c54c..56fa6ed 100644 --- a/test/performance/odp_atomic.c +++ b/test/performance/odp_atomic.c @@ -338,7 +338,7 @@ void odp_print_system_info(void) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz()); + printf("CPU freq (hz): %"PRIu64"\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("CPU count: %i\n", odp_cpu_count()); printf("CPU mask: %s\n", str); diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 5533daa..aa3ffae 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -713,7 +713,7 @@ static void print_info(char *progname, appl_args_t *appl_args) "Cache line size: %i\n" "CPU count: %i\n" "\n", - odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz(), + odp_version_api_str(), odp_cpu_model_str(), odp_cpu_hz_max(), odp_sys_cache_line_size(), odp_cpu_count()); printf("Running ODP appl: \"%s\"\n" diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c index 0f288e2..d08f253 100644 --- a/test/performance/odp_scheduling.c +++ b/test/performance/odp_scheduling.c @@ -746,14 +746,14 @@ static void test_cpu_freq(void) nsec -= tp1.tv_nsec - tp2.tv_nsec; cycles = odp_cpu_cycles_diff(c1, c2); - max_cycles = (nsec * odp_cpu_hz()) / 1000000000.0; + max_cycles = (nsec * odp_cpu_hz_max()) / 1000000000.0; /* Compare measured CPU cycles to maximum theoretical CPU cycle count */ diff_max_hz = ((double)(cycles) - max_cycles) / max_cycles; printf("clock_gettime %" PRIu64 " ns\n", nsec); printf("odp_cpu_cycles %" PRIu64 " CPU cycles\n", cycles); - printf("odp_sys_cpu_hz %" PRIu64 " hz\n", odp_cpu_hz()); + printf("odp_sys_cpu_hz %" PRIu64 " hz\n", odp_cpu_hz_max()); printf("Diff from max CPU freq %f%%\n", diff_max_hz * 100.0); printf("\n"); @@ -868,7 +868,7 @@ int main(int argc, char *argv[]) printf("---------------\n"); printf("ODP API version: %s\n", odp_version_api_str()); printf("CPU model: %s\n", odp_cpu_model_str()); - printf("CPU freq (hz): %" PRIu64 "\n", odp_cpu_hz()); + printf("CPU freq (hz): %" PRIu64 "\n", odp_cpu_hz_max()); printf("Cache line size: %i\n", odp_sys_cache_line_size()); printf("Max CPU count: %i\n", odp_cpu_count()); -- 1.9.1 _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
