equal
deleted
inserted
replaced
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; |
1959 chunk_size_name(i), chunk); |
1961 chunk_size_name(i), chunk); |
1960 if (chunk != NULL) { |
1962 if (chunk != NULL) { |
1961 st->print_cr(" free " SIZE_FORMAT, |
1963 st->print_cr(" free " SIZE_FORMAT, |
1962 chunk->free_word_size()); |
1964 chunk->free_word_size()); |
1963 } else { |
1965 } else { |
1964 st->print_cr(""); |
1966 st->cr(); |
1965 } |
1967 } |
1966 } |
1968 } |
1967 |
1969 |
1968 chunk_manager()->locked_print_free_chunks(st); |
1970 chunk_manager()->locked_print_free_chunks(st); |
1969 chunk_manager()->locked_print_sum_free_chunks(st); |
1971 chunk_manager()->locked_print_sum_free_chunks(st); |
2243 humongous_chunks->container()->dec_container_count(); |
2245 humongous_chunks->container()->dec_container_count(); |
2244 chunk_manager()->humongous_dictionary()->return_chunk(humongous_chunks); |
2246 chunk_manager()->humongous_dictionary()->return_chunk(humongous_chunks); |
2245 humongous_chunks = next_humongous_chunks; |
2247 humongous_chunks = next_humongous_chunks; |
2246 } |
2248 } |
2247 if (TraceMetadataChunkAllocation && Verbose) { |
2249 if (TraceMetadataChunkAllocation && Verbose) { |
2248 gclog_or_tty->print_cr(""); |
2250 gclog_or_tty->cr(); |
2249 gclog_or_tty->print_cr("updated dictionary count %d %s", |
2251 gclog_or_tty->print_cr("updated dictionary count %d %s", |
2250 chunk_manager()->humongous_dictionary()->total_count(), |
2252 chunk_manager()->humongous_dictionary()->total_count(), |
2251 chunk_size_name(HumongousIndex)); |
2253 chunk_size_name(HumongousIndex)); |
2252 } |
2254 } |
2253 chunk_manager()->slow_locked_verify(); |
2255 chunk_manager()->slow_locked_verify(); |