diff options
author | Andy Lutomirski <luto@mit.edu> | 2012-03-23 05:15:52 +0100 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-03-24 00:49:35 +0100 |
commit | 5f293474c4c6c4dc2baaf2dfd486748b5986de76 (patch) | |
tree | 1ced9f5c401aa7d808954a21e527a0f0e54ea9b8 /arch/x86/vdso/vclock_gettime.c | |
parent | x86-64: Simplify and optimize vdso clock_gettime monotonic variants (diff) | |
download | linux-5f293474c4c6c4dc2baaf2dfd486748b5986de76.tar.xz linux-5f293474c4c6c4dc2baaf2dfd486748b5986de76.zip |
x86-64: Inline vdso clock_gettime helpers
This is about a 3% speedup on Sandy Bridge.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'arch/x86/vdso/vclock_gettime.c')
-rw-r--r-- | arch/x86/vdso/vclock_gettime.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c index 6eea70b8f384..885eff49d6ab 100644 --- a/arch/x86/vdso/vclock_gettime.c +++ b/arch/x86/vdso/vclock_gettime.c @@ -94,7 +94,8 @@ notrace static inline long vgetns(void) return (v * gtod->clock.mult) >> gtod->clock.shift; } -notrace static noinline int do_realtime(struct timespec *ts) +/* Code size doesn't matter (vdso is 4k anyway) and this is faster. */ +notrace static int __always_inline do_realtime(struct timespec *ts) { unsigned long seq, ns; int mode; @@ -111,7 +112,7 @@ notrace static noinline int do_realtime(struct timespec *ts) return mode; } -notrace static noinline int do_monotonic(struct timespec *ts) +notrace static int do_monotonic(struct timespec *ts) { unsigned long seq, ns; int mode; @@ -128,7 +129,7 @@ notrace static noinline int do_monotonic(struct timespec *ts) return mode; } -notrace static noinline int do_realtime_coarse(struct timespec *ts) +notrace static int do_realtime_coarse(struct timespec *ts) { unsigned long seq; do { @@ -139,7 +140,7 @@ notrace static noinline int do_realtime_coarse(struct timespec *ts) return 0; } -notrace static noinline int do_monotonic_coarse(struct timespec *ts) +notrace static int do_monotonic_coarse(struct timespec *ts) { unsigned long seq; do { |