Mercurial > hg > truffle
comparison src/share/vm/memory/genCollectedHeap.cpp @ 17937:78bbf4d43a14
8037816: Fix for 8036122 breaks build with Xcode5/clang
8043029: Change 8037816 breaks HS build with older GCC versions which don't support diagnostic pragmas
8043164: Format warning in traceStream.hpp
Summary: Backport of main fix + two corrections, enables clang compilation, turns on format attributes, corrects/mutes warnings
Reviewed-by: kvn, coleenp, iveresov, twisti
author | drchase |
---|---|
date | Thu, 22 May 2014 15:52:41 -0400 |
parents | 270d7cb38f40 |
children | 52b4284cb496 0982ec23da03 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2014, 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. |
807 } | 807 } |
808 | 808 |
809 bool GenCollectedHeap::is_in_young(oop p) { | 809 bool GenCollectedHeap::is_in_young(oop p) { |
810 bool result = ((HeapWord*)p) < _gens[_n_gens - 1]->reserved().start(); | 810 bool result = ((HeapWord*)p) < _gens[_n_gens - 1]->reserved().start(); |
811 assert(result == _gens[0]->is_in_reserved(p), | 811 assert(result == _gens[0]->is_in_reserved(p), |
812 err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p)); | 812 err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, p2i((void*)p))); |
813 return result; | 813 return result; |
814 } | 814 } |
815 | 815 |
816 // Returns "TRUE" iff "p" points into the committed areas of the heap. | 816 // Returns "TRUE" iff "p" points into the committed areas of the heap. |
817 bool GenCollectedHeap::is_in(const void* p) const { | 817 bool GenCollectedHeap::is_in(const void* p) const { |
1086 | 1086 |
1087 void GenCollectedHeap::verify(bool silent, VerifyOption option /* ignored */) { | 1087 void GenCollectedHeap::verify(bool silent, VerifyOption option /* ignored */) { |
1088 for (int i = _n_gens-1; i >= 0; i--) { | 1088 for (int i = _n_gens-1; i >= 0; i--) { |
1089 Generation* g = _gens[i]; | 1089 Generation* g = _gens[i]; |
1090 if (!silent) { | 1090 if (!silent) { |
1091 gclog_or_tty->print(g->name()); | 1091 gclog_or_tty->print("%s", g->name()); |
1092 gclog_or_tty->print(" "); | 1092 gclog_or_tty->print(" "); |
1093 } | 1093 } |
1094 g->verify(); | 1094 g->verify(); |
1095 } | 1095 } |
1096 if (!silent) { | 1096 if (!silent) { |
1289 // provided the underlying platform provides such a time source | 1289 // provided the underlying platform provides such a time source |
1290 // (and it is bug free). So we still have to guard against getting | 1290 // (and it is bug free). So we still have to guard against getting |
1291 // back a time later than 'now'. | 1291 // back a time later than 'now'. |
1292 jlong retVal = now - tolgc_cl.time(); | 1292 jlong retVal = now - tolgc_cl.time(); |
1293 if (retVal < 0) { | 1293 if (retVal < 0) { |
1294 NOT_PRODUCT(warning("time warp: "INT64_FORMAT, retVal);) | 1294 NOT_PRODUCT(warning("time warp: "INT64_FORMAT, (int64_t) retVal);) |
1295 return 0; | 1295 return 0; |
1296 } | 1296 } |
1297 return retVal; | 1297 return retVal; |
1298 } | 1298 } |