memSnapshot.hpp revision 4064
1008N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 1008N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1008N/A * This code is free software; you can redistribute it and/or modify it 1008N/A * under the terms of the GNU General Public License version 2 only, as 1008N/A * published by the Free Software Foundation. 1008N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1008N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1008N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1008N/A * version 2 for more details (a copy is included in the LICENSE file that 1008N/A * You should have received a copy of the GNU General Public License version 1008N/A * 2 along with this work; if not, write to the Free Software Foundation, 1008N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1008N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1008N/A// Snapshot pointer array iterator 1008N/A// The pointer array contains malloc-ed pointers 1008N/A // locate an existing reserved memory region that contains specified address, 1008N/A // or the reserved region just above this address, where the incoming 1008N/A // reserved region should be inserted. 1008N/A // following methods update virtual memory in the context 1008N/A // of 'current' position, which is properly positioned by 1008N/A // callers via locate method. 1008N/A // split a reserved region to create a new memory region with specified base and size 1008N/A// collapse duplicated records. Eliminating duplicated records here, is much 1008N/A// cheaper than during promotion phase. However, it does have limitation - it 1008N/A// can only eliminate duplicated records within the generation, there are 1008N/A// still chances seeing duplicated records during promotion. 1008N/A// We want to use the record with higher sequence number, because it has 1008N/A// more accurate callsite pc. 1008N/A // get next record, but skip the duplicated records 1008N/A // the following two arrays contain records of all known lived memory blocks 1008N/A // live malloc-ed memory pointers 1008N/A // live virtual memory pointers 1008N/A // the lock to protect this snapshot 1008N/A // if we are running out of native memory 1008N/A // merge a per-thread memory recorder into staging area 1008N/A // promote staged data to snapshot 1008N/A // dump all virtual memory pointers in snapshot 1008N/A // copy pointer data from src to dest 1008N/A#
endif // SHARE_VM_SERVICES_MEM_SNAPSHOT_HPP