提交 aa18703e 编写于 作者: J johnc

7194409: os::javaTimeNanos() shows hot on CPU_CLK_UNHALTED profiles

Summary: Add inline directives to os::Linux::supports_monotonic_clock() and os::Bsd::supports_monotonic_clock().
Reviewed-by: johnc, azeemj, mikael
Contributed-by: NBrandon Mitchell <brandon@twitter.com>
上级 3c3c2c12
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -202,7 +202,7 @@ class Bsd {
static void fast_thread_clock_init(void);
#endif
static bool supports_monotonic_clock() {
static inline bool supports_monotonic_clock() {
return _clock_gettime != NULL;
}
......
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -178,7 +178,7 @@ class Linux {
// fast POSIX clocks support
static void fast_thread_clock_init(void);
static bool supports_monotonic_clock() {
static inline bool supports_monotonic_clock() {
return _clock_gettime != NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册