Message ID | 20181220174229.5834-3-gavin.hu@arm.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Thomas Monjalon |
Headers | show |
Series | spinlock optimization and test case enhancements | expand |
Context | Check | Description |
---|---|---|
ci/checkpatch | success | coding style OK |
ci/Intel-compilation | success | Compilation OK |
diff --git a/test/test/test_spinlock.c b/test/test/test_spinlock.c index 6795195ae..648474833 100644 --- a/test/test/test_spinlock.c +++ b/test/test/test_spinlock.c @@ -113,14 +113,14 @@ load_loop_fn(void *func_param) if (lcore != rte_get_master_lcore()) while (rte_atomic32_read(&synchro) == 0); - begin = rte_get_timer_cycles(); + begin = rte_rdtsc_precise(); while (time_diff < hz * TIME_MS / 1000) { if (use_lock) rte_spinlock_lock(&lk); lcount++; if (use_lock) rte_spinlock_unlock(&lk); - time_diff = rte_get_timer_cycles() - begin; + time_diff = rte_rdtsc_precise() - begin; } lock_count[lcore] = lcount; return 0;