aboutsummaryrefslogtreecommitdiff
path: root/test/performance
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2015-11-05 18:00:36 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-11-25 16:30:59 +0300
commite56a592c7e074872aa1d818c3f12782f6f22047a (patch)
treecd63f11f061b35c896df023b48d6a8254b404d2e /test/performance
parent6b07335b356fea9caac948ba7f8f1eacc0915c6f (diff)
api: cpu: change order of arguments for diff function
It's more convenient to pass parameters in order, like t2 - t1, when t2 is supposed to be more. Also it's needed to keep in sync with time API which uses same order. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: test/performance/odp_scheduling.c
Diffstat (limited to 'test/performance')
-rw-r--r--test/performance/odp_scheduling.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index 73eeb7245..cb865b35b 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -199,7 +199,7 @@ static int test_alloc_single(int thr, odp_pool_t pool)
}
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
cycles = cycles / ALLOC_ROUNDS;
printf(" [%i] alloc_sng alloc+free %6" PRIu64 " CPU cycles\n",
@@ -239,7 +239,7 @@ static int test_alloc_multi(int thr, odp_pool_t pool)
}
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
cycles = cycles / (ALLOC_ROUNDS * MAX_ALLOCS);
printf(" [%i] alloc_multi alloc+free %6" PRIu64 " CPU cycles\n",
@@ -310,7 +310,7 @@ static int test_poll_queue(int thr, odp_pool_t msg_pool)
}
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
cycles = cycles / QUEUE_ROUNDS;
printf(" [%i] poll_queue enq+deq %6" PRIu64 " CPU cycles\n",
@@ -382,7 +382,7 @@ static int test_schedule_single(const char *str, int thr,
odp_schedule_resume();
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(barrier);
clear_sched_queues();
@@ -458,7 +458,7 @@ static int test_schedule_many(const char *str, int thr,
odp_schedule_resume();
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(barrier);
clear_sched_queues();
@@ -574,7 +574,7 @@ static int test_schedule_multi(const char *str, int thr,
c2 = odp_cpu_cycles();
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
odp_barrier_wait(barrier);
clear_sched_queues();
@@ -745,7 +745,7 @@ static void test_cpu_freq(void)
else
nsec -= tp1.tv_nsec - tp2.tv_nsec;
- cycles = odp_cpu_cycles_diff(c1, c2);
+ cycles = odp_cpu_cycles_diff(c2, c1);
max_cycles = (nsec * odp_sys_cpu_hz()) / 1000000000.0;
/* Compare measured CPU cycles to maximum theoretical CPU cycle count */