Mercurial > hg > truffle
comparison src/share/vm/memory/binaryTreeDictionary.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 | ab36007d6358 |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
17935:7384f6a12fc1 | 17937:78bbf4d43a14 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2013, 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. |
1203 FreeBlockDictionary<Chunk_t>::verify_par_locked(); | 1203 FreeBlockDictionary<Chunk_t>::verify_par_locked(); |
1204 gclog_or_tty->print("Statistics for BinaryTreeDictionary:\n" | 1204 gclog_or_tty->print("Statistics for BinaryTreeDictionary:\n" |
1205 "------------------------------------\n"); | 1205 "------------------------------------\n"); |
1206 size_t total_size = total_chunk_size(debug_only(NULL)); | 1206 size_t total_size = total_chunk_size(debug_only(NULL)); |
1207 size_t free_blocks = num_free_blocks(); | 1207 size_t free_blocks = num_free_blocks(); |
1208 gclog_or_tty->print("Total Free Space: %d\n", total_size); | 1208 gclog_or_tty->print("Total Free Space: " SIZE_FORMAT "\n", total_size); |
1209 gclog_or_tty->print("Max Chunk Size: %d\n", max_chunk_size()); | 1209 gclog_or_tty->print("Max Chunk Size: " SIZE_FORMAT "\n", max_chunk_size()); |
1210 gclog_or_tty->print("Number of Blocks: %d\n", free_blocks); | 1210 gclog_or_tty->print("Number of Blocks: " SIZE_FORMAT "\n", free_blocks); |
1211 if (free_blocks > 0) { | 1211 if (free_blocks > 0) { |
1212 gclog_or_tty->print("Av. Block Size: %d\n", total_size/free_blocks); | 1212 gclog_or_tty->print("Av. Block Size: " SIZE_FORMAT "\n", total_size/free_blocks); |
1213 } | 1213 } |
1214 gclog_or_tty->print("Tree Height: %d\n", tree_height()); | 1214 gclog_or_tty->print("Tree Height: " SIZE_FORMAT "\n", tree_height()); |
1215 } | 1215 } |
1216 | 1216 |
1217 // Print census information - counts, births, deaths, etc. | 1217 // Print census information - counts, births, deaths, etc. |
1218 // for each list in the tree. Also print some summary | 1218 // for each list in the tree. Also print some summary |
1219 // information. | 1219 // information. |
1316 fl->print_on(gclog_or_tty); | 1316 fl->print_on(gclog_or_tty); |
1317 size_t sz = fl->size(); | 1317 size_t sz = fl->size(); |
1318 for (Chunk_t* fc = fl->head(); fc != NULL; | 1318 for (Chunk_t* fc = fl->head(); fc != NULL; |
1319 fc = fc->next()) { | 1319 fc = fc->next()) { |
1320 _st->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ") %s", | 1320 _st->print_cr("\t[" PTR_FORMAT "," PTR_FORMAT ") %s", |
1321 fc, (HeapWord*)fc + sz, | 1321 p2i(fc), p2i((HeapWord*)fc + sz), |
1322 fc->cantCoalesce() ? "\t CC" : ""); | 1322 fc->cantCoalesce() ? "\t CC" : ""); |
1323 } | 1323 } |
1324 } | 1324 } |
1325 }; | 1325 }; |
1326 | 1326 |