7194409: os::javaTimeNanos() shows hot on CPU_CLK_UNHALTED profiles
authorjohnc
Wed, 29 Aug 2012 13:02:54 -0700
changeset 13518 86a9027340fb
parent 13517 f158a0c702d4
child 13519 3113751c12df
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: Brandon Mitchell <brandon@twitter.com>
hotspot/src/os/bsd/vm/os_bsd.hpp
hotspot/src/os/linux/vm/os_linux.hpp
--- a/hotspot/src/os/bsd/vm/os_bsd.hpp	Tue Aug 28 15:20:08 2012 -0700
+++ b/hotspot/src/os/bsd/vm/os_bsd.hpp	Wed Aug 29 13:02:54 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * 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 @@
   static void fast_thread_clock_init(void);
 #endif
 
-  static bool supports_monotonic_clock() {
+  static inline bool supports_monotonic_clock() {
     return _clock_gettime != NULL;
   }
 
--- a/hotspot/src/os/linux/vm/os_linux.hpp	Tue Aug 28 15:20:08 2012 -0700
+++ b/hotspot/src/os/linux/vm/os_linux.hpp	Wed Aug 29 13:02:54 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * 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 @@
   // 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;
   }