comparison src/share/vm/gc_implementation/g1/g1BlockOffsetTable.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 2fc0334f613a
children 9441d22e429a
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 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.
78 virtual void resize(size_t new_word_size) = 0; 78 virtual void resize(size_t new_word_size) = 0;
79 79
80 virtual void set_bottom(HeapWord* new_bottom) { 80 virtual void set_bottom(HeapWord* new_bottom) {
81 assert(new_bottom <= _end, 81 assert(new_bottom <= _end,
82 err_msg("new_bottom (" PTR_FORMAT ") > _end (" PTR_FORMAT ")", 82 err_msg("new_bottom (" PTR_FORMAT ") > _end (" PTR_FORMAT ")",
83 new_bottom, _end)); 83 p2i(new_bottom), p2i(_end)));
84 _bottom = new_bottom; 84 _bottom = new_bottom;
85 resize(pointer_delta(_end, _bottom)); 85 resize(pointer_delta(_end, _bottom));
86 } 86 }
87 87
88 // Requires "addr" to be contained by a block, and returns the address of 88 // Requires "addr" to be contained by a block, and returns the address of
144 } 144 }
145 145
146 void check_offset(size_t offset, const char* msg) const { 146 void check_offset(size_t offset, const char* msg) const {
147 assert(offset <= N_words, 147 assert(offset <= N_words,
148 err_msg("%s - " 148 err_msg("%s - "
149 "offset: " UINT32_FORMAT", N_words: " UINT32_FORMAT, 149 "offset: " SIZE_FORMAT ", N_words: " UINT32_FORMAT,
150 msg, offset, N_words)); 150 msg, offset, N_words));
151 } 151 }
152 152
153 // Bounds checking accessors: 153 // Bounds checking accessors:
154 // For performance these have to devolve to array accesses in product builds. 154 // For performance these have to devolve to array accesses in product builds.