0fad336bfc
__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@google.com> Bug: 154668398 Bug: 157925983 Test: run bionic-benchmarks --bionic_xml vdso.xml (cherry picked from fc30ad8ca60eccbce5245103fb4a2b070aa294de) Signed-off-by: Mark Salyzyn <salyzyn@google.com> Change-Id: Ibd9835254c065801ba2f0976dffbf70d7bf0c85c
51 lines
894 B
C
51 lines
894 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* ARM64 compat userspace implementations of gettimeofday() and similar.
|
|
*
|
|
* Copyright (C) 2018 ARM Limited
|
|
*
|
|
*/
|
|
|
|
int __vdso_clock_gettime(clockid_t clock,
|
|
struct old_timespec32 *ts)
|
|
{
|
|
return __cvdso_clock_gettime32(clock, ts);
|
|
}
|
|
|
|
int __vdso_clock_gettime64(clockid_t clock,
|
|
struct __kernel_timespec *ts)
|
|
{
|
|
return __cvdso_clock_gettime(clock, ts);
|
|
}
|
|
|
|
int __vdso_gettimeofday(struct __kernel_old_timeval *tv,
|
|
struct timezone *tz)
|
|
{
|
|
return __cvdso_gettimeofday(tv, tz);
|
|
}
|
|
|
|
int __vdso_clock_getres(clockid_t clock_id,
|
|
struct old_timespec32 *res)
|
|
{
|
|
return __cvdso_clock_getres_time32(clock_id, res);
|
|
}
|
|
|
|
time_t __vdso_time(time_t *time)
|
|
{
|
|
return __cvdso_time(time);
|
|
}
|
|
|
|
/* Avoid unresolved references emitted by GCC */
|
|
|
|
void __aeabi_unwind_cpp_pr0(void)
|
|
{
|
|
}
|
|
|
|
void __aeabi_unwind_cpp_pr1(void)
|
|
{
|
|
}
|
|
|
|
void __aeabi_unwind_cpp_pr2(void)
|
|
{
|
|
}
|