--- old/src/share/vm/gc_implementation/g1/heapRegionManager.cpp 2015-03-03 18:32:35.971598055 +0300 +++ new/src/share/vm/gc_implementation/g1/heapRegionManager.cpp 2015-03-03 18:32:35.811595414 +0300 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -145,6 +145,24 @@ } } +MemoryUsage HeapRegionManager::get_auxiliary_data_memory_usage() const { + size_t used_sz = + _prev_bitmap_mapper->committed_size() + + _next_bitmap_mapper->committed_size() + + _bot_mapper->committed_size() + + _cardtable_mapper->committed_size() + + _card_counts_mapper->committed_size(); + + size_t committed_sz = + _prev_bitmap_mapper->reserved_size() + + _next_bitmap_mapper->reserved_size() + + _bot_mapper->reserved_size() + + _cardtable_mapper->reserved_size() + + _card_counts_mapper->reserved_size(); + + return MemoryUsage(0, used_sz, committed_sz, committed_sz); +} + uint HeapRegionManager::expand_by(uint num_regions) { return expand_at(0, num_regions); }