Mercurial > hg > graal-jvmci-8
comparison src/os/bsd/vm/os_bsd.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 | 0af5da0c9d9d |
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. |
200 #ifndef _ALLBSD_SOURCE | 200 #ifndef _ALLBSD_SOURCE |
201 // fast POSIX clocks support | 201 // fast POSIX clocks support |
202 static void fast_thread_clock_init(void); | 202 static void fast_thread_clock_init(void); |
203 #endif | 203 #endif |
204 | 204 |
205 static bool supports_monotonic_clock() { | 205 static inline bool supports_monotonic_clock() { |
206 return _clock_gettime != NULL; | 206 return _clock_gettime != NULL; |
207 } | 207 } |
208 | 208 |
209 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { | 209 static int clock_gettime(clockid_t clock_id, struct timespec *tp) { |
210 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; | 210 return _clock_gettime ? _clock_gettime(clock_id, tp) : -1; |