Mellanox/sockperf

port to riscv

kirana1996 opened this issue · 2 comments

hi,
when porting this to riscv we got error rdtsc not supported and we replaced that using rdcycle but here itś taking more time to build compare arm but it is not giving any error....can any one clear me why it takes more time...

code:
arm
register uint32_t upper_32, lower_32;
asm volatile("rdtsc" : "=a"(lower_32), "=d"(upper_32));
return (((ticks_t)upper_32) << 32) | lower_32;

riscv:
uint64_t cycles;
asm("rdcycle %0" : "=r"(cycles));
  return cycles;

Hello @kirana1996. Time compilation of sockperf mostly depends on amount of RAM and compiler version.

i am ok with that..but here three is a file client.cpp is it depents on rdtsc because after porting to riscv i was getting teststart is greater than testend so ¨for¨ loop is not at all executing in that file...