Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/g1CardCounts.hpp @ 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 | 9cb63cd234a0 |
children | 1f1d373cd044 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2013, 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. |
75 size_t ptr_2_card_num(const jbyte* card_ptr) { | 75 size_t ptr_2_card_num(const jbyte* card_ptr) { |
76 assert(card_ptr >= _ct_bot, | 76 assert(card_ptr >= _ct_bot, |
77 err_msg("Invalid card pointer: " | 77 err_msg("Invalid card pointer: " |
78 "card_ptr: " PTR_FORMAT ", " | 78 "card_ptr: " PTR_FORMAT ", " |
79 "_ct_bot: " PTR_FORMAT, | 79 "_ct_bot: " PTR_FORMAT, |
80 card_ptr, _ct_bot)); | 80 p2i(card_ptr), p2i(_ct_bot))); |
81 size_t card_num = pointer_delta(card_ptr, _ct_bot, sizeof(jbyte)); | 81 size_t card_num = pointer_delta(card_ptr, _ct_bot, sizeof(jbyte)); |
82 assert(card_num >= 0 && card_num < _committed_max_card_num, | 82 assert(card_num >= 0 && card_num < _committed_max_card_num, |
83 err_msg("card pointer out of range: " PTR_FORMAT, card_ptr)); | 83 err_msg("card pointer out of range: " PTR_FORMAT, p2i(card_ptr))); |
84 return card_num; | 84 return card_num; |
85 } | 85 } |
86 | 86 |
87 jbyte* card_num_2_ptr(size_t card_num) { | 87 jbyte* card_num_2_ptr(size_t card_num) { |
88 assert(card_num >= 0 && card_num < _committed_max_card_num, | 88 assert(card_num >= 0 && card_num < _committed_max_card_num, |