[dpdk-dev,3/3] app/test: use memory barrier version of rte_rdtsc() eal api for multi arch support

Message ID 1440924922-11156-4-git-send-email-jerin.jacob@caviumnetworks.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Jerin Jacob Aug. 30, 2015, 8:55 a.m. UTC
  Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 app/test/test_red.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
  

Patch

diff --git a/app/test/test_red.c b/app/test/test_red.c
index 262df72..37841b3 100644
--- a/app/test/test_red.c
+++ b/app/test/test_red.c
@@ -146,16 +146,7 @@  static void rdtsc_prof_init(struct rdtsc_prof *p, const char *name)
 
 static inline void rdtsc_prof_start(struct rdtsc_prof *p)
 {
-#ifdef __PIC__
-    asm volatile (
-    "mov %%ebx, %%edi\n"
-    "cpuid\n"
-    "xchgl %%ebx, %%edi;\n"
-	: : : "%eax", "%edi", "%ecx", "%edx" );
-#else
-	asm( "cpuid" : : : "%eax", "%ebx", "%ecx", "%edx" );
-#endif
-	p->clk_start = rte_rdtsc();
+	p->clk_start = rte_rdtsc_precise();
 }
 
 static inline void rdtsc_prof_end(struct rdtsc_prof *p)