comparison src/os/linux/vm/os_linux.hpp @ 6630:fa9253dcd4df

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>
author johnc
date Wed, 29 Aug 2012 13:02:54 -0700
parents d2a62e0f25eb
children 63e54c37ac64
comparison
equal deleted inserted replaced
6629:c9814fadeb38 6630:fa9253dcd4df
1 /* 1 /*
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
176 static void clock_init(void); 176 static void clock_init(void);
177 177
178 // fast POSIX clocks support 178 // fast POSIX clocks support
179 static void fast_thread_clock_init(void); 179 static void fast_thread_clock_init(void);
180 180
181 static bool supports_monotonic_clock() { 181 static inline bool supports_monotonic_clock() {
182 return _clock_gettime != NULL; 182 return _clock_gettime != NULL;
183 } 183 }
184 184
185 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { 185 static int clock_gettime(clockid_t clock_id, struct timespec *tp) {
186 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; 186 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1;