comparison src/share/vm/memory/metaspace.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 7384f6a12fc1
children e204777ac770
comparison
equal deleted inserted replaced
17935:7384f6a12fc1 17937:78bbf4d43a14
1 /* 1 /*
2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2011, 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.
46 #include "services/memTracker.hpp" 46 #include "services/memTracker.hpp"
47 #include "services/memoryService.hpp" 47 #include "services/memoryService.hpp"
48 #include "utilities/copy.hpp" 48 #include "utilities/copy.hpp"
49 #include "utilities/debug.hpp" 49 #include "utilities/debug.hpp"
50 50
51 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
52
51 typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary; 53 typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > BlockTreeDictionary;
52 typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary; 54 typedef BinaryTreeDictionary<Metachunk, FreeList<Metachunk> > ChunkTreeDictionary;
53 55
54 // Set this constant to enable slow integrity checking of the free chunk lists 56 // Set this constant to enable slow integrity checking of the free chunk lists
55 const bool metaspace_slow_verify = false; 57 const bool metaspace_slow_verify = false;
1978 chunk_size_name(i), chunk); 1980 chunk_size_name(i), chunk);
1979 if (chunk != NULL) { 1981 if (chunk != NULL) {
1980 st->print_cr(" free " SIZE_FORMAT, 1982 st->print_cr(" free " SIZE_FORMAT,
1981 chunk->free_word_size()); 1983 chunk->free_word_size());
1982 } else { 1984 } else {
1983 st->print_cr(""); 1985 st->cr();
1984 } 1986 }
1985 } 1987 }
1986 1988
1987 chunk_manager()->locked_print_free_chunks(st); 1989 chunk_manager()->locked_print_free_chunks(st);
1988 chunk_manager()->locked_print_sum_free_chunks(st); 1990 chunk_manager()->locked_print_sum_free_chunks(st);
2262 humongous_chunks->container()->dec_container_count(); 2264 humongous_chunks->container()->dec_container_count();
2263 chunk_manager()->humongous_dictionary()->return_chunk(humongous_chunks); 2265 chunk_manager()->humongous_dictionary()->return_chunk(humongous_chunks);
2264 humongous_chunks = next_humongous_chunks; 2266 humongous_chunks = next_humongous_chunks;
2265 } 2267 }
2266 if (TraceMetadataChunkAllocation && Verbose) { 2268 if (TraceMetadataChunkAllocation && Verbose) {
2267 gclog_or_tty->print_cr(""); 2269 gclog_or_tty->cr();
2268 gclog_or_tty->print_cr("updated dictionary count %d %s", 2270 gclog_or_tty->print_cr("updated dictionary count %d %s",
2269 chunk_manager()->humongous_dictionary()->total_count(), 2271 chunk_manager()->humongous_dictionary()->total_count(),
2270 chunk_size_name(HumongousIndex)); 2272 chunk_size_name(HumongousIndex));
2271 } 2273 }
2272 chunk_manager()->slow_locked_verify(); 2274 chunk_manager()->slow_locked_verify();