[PATCH v2]: arch: arm64: vdso: export the symbols for time()

Will Deacon will at kernel.org
Tue Jun 23 10:44:59 EDT 2020


On Mon, Jun 15, 2020 at 07:38:24AM -0700, Mark Salyzyn wrote:
> From: Chiawei Wang <chiaweiwang at google.com>
> 
> __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 <chiaweiwang at google.com>
> Signed-off-by: Mark Salyzyn <salyzyn at android.com>
> Cc: linux-kernel at vger.kernel.org
> Cc: kernel-team at android.com
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: Vincenzo Frascino <vincenzo.frascino at arm.com>
> Cc: Enrico Weigelt <info at metux.net>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: Alexios Zavras <alexios.zavras at intel.com>
> Cc: linux-arm-kernel at lists.infradead.org

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



More information about the linux-arm-kernel mailing list