On Mon, Jun 15, 2020 at 07:38:24AM -0700, Mark Salyzyn wrote: > From: Chiawei Wang <[email protected]> > > __cvdso_time() can be found in vDSO implementation, > but the symbols for time() are not exported. > > Export the symbols and run bionic-benchmarks. > > BEFORE: > bionic-benchmarks32 --bionic_extra BM_time_time > ----------------------------------------------------- > Benchmark Time CPU Iterations > ----------------------------------------------------- > BM_time_time 83.6 ns 83.5 ns 8385964 > > bionic-benchmarks64 --bionic_extra BM_time_time > ----------------------------------------------------- > Benchmark Time CPU Iterations > ----------------------------------------------------- > BM_time_time 63.5 ns 63.4 ns 11037509 > > AFTER: > bionic-benchmarks32 --bionic_extra BM_time_time > ----------------------------------------------------- > Benchmark Time CPU Iterations > ----------------------------------------------------- > BM_time_time 8.57 ns 8.56 ns 81887312 > > bionic-benchmarks64 --bionic_extra BM_time_time > ----------------------------------------------------- > Benchmark Time CPU Iterations > ----------------------------------------------------- > BM_time_time 7.52 ns 7.51 ns 93253809 > > Signed-off-by: Chiawei Wang <[email protected]> > Signed-off-by: Mark Salyzyn <[email protected]> > Cc: [email protected] > Cc: [email protected] > Cc: Catalin Marinas <[email protected]> > Cc: Will Deacon <[email protected]> > Cc: Thomas Gleixner <[email protected]> > Cc: Vincenzo Frascino <[email protected]> > Cc: Enrico Weigelt <[email protected]> > Cc: Greg Kroah-Hartman <[email protected]> > Cc: Alexios Zavras <[email protected]> > Cc: [email protected]
I don't understand this: neither arm nor arm64 offer the time() syscall afaict, so the C library should be implementing it in terms of clock_gettime() anyway, which _is_ implemented in the vDSO. What's am I missing? Will

