提交 5f293474 编写于 作者: A Andy Lutomirski 提交者: John Stultz

x86-64: Inline vdso clock_gettime helpers

This is about a 3% speedup on Sandy Bridge.
Signed-off-by: NAndy Lutomirski <luto@amacapital.net>
Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
上级 91ec87d5
...@@ -94,7 +94,8 @@ notrace static inline long vgetns(void) ...@@ -94,7 +94,8 @@ notrace static inline long vgetns(void)
return (v * gtod->clock.mult) >> gtod->clock.shift; 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; unsigned long seq, ns;
int mode; int mode;
...@@ -111,7 +112,7 @@ notrace static noinline int do_realtime(struct timespec *ts) ...@@ -111,7 +112,7 @@ notrace static noinline int do_realtime(struct timespec *ts)
return mode; return mode;
} }
notrace static noinline int do_monotonic(struct timespec *ts) notrace static int do_monotonic(struct timespec *ts)
{ {
unsigned long seq, ns; unsigned long seq, ns;
int mode; int mode;
...@@ -128,7 +129,7 @@ notrace static noinline int do_monotonic(struct timespec *ts) ...@@ -128,7 +129,7 @@ notrace static noinline int do_monotonic(struct timespec *ts)
return mode; return mode;
} }
notrace static noinline int do_realtime_coarse(struct timespec *ts) notrace static int do_realtime_coarse(struct timespec *ts)
{ {
unsigned long seq; unsigned long seq;
do { do {
...@@ -139,7 +140,7 @@ notrace static noinline int do_realtime_coarse(struct timespec *ts) ...@@ -139,7 +140,7 @@ notrace static noinline int do_realtime_coarse(struct timespec *ts)
return 0; return 0;
} }
notrace static noinline int do_monotonic_coarse(struct timespec *ts) notrace static int do_monotonic_coarse(struct timespec *ts)
{ {
unsigned long seq; unsigned long seq;
do { do {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册