comparison src/share/vm/runtime/perfMemory.cpp @ 14187:e89b54bf4e51

8030955: assert(_prologue != NULL) failed: prologue pointer must be initialized Summary: Allow multiple calls to PerfMemory::destroy() Reviewed-by: zgu, coleenp
author hseigel
date Mon, 06 Jan 2014 08:44:24 -0500
parents b9a9ed0f8eeb
children 4ca6dc0799b6 78bbf4d43a14
comparison
equal deleted inserted replaced
14186:23c27f9ae1e8 14187:e89b54bf4e51
1 /* 1 /*
2 * Copyright (c) 2001, 2012, 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.
153 OrderAccess::release_store(&_initialized, 1); 153 OrderAccess::release_store(&_initialized, 1);
154 } 154 }
155 155
156 void PerfMemory::destroy() { 156 void PerfMemory::destroy() {
157 157
158 assert(_prologue != NULL, "prologue pointer must be initialized"); 158 if (_prologue == NULL) return;
159 159
160 if (_start != NULL && _prologue->overflow != 0) { 160 if (_start != NULL && _prologue->overflow != 0) {
161 161
162 // This state indicates that the contiguous memory region exists and 162 // This state indicates that the contiguous memory region exists and
163 // that it wasn't large enough to hold all the counters. In this case, 163 // that it wasn't large enough to hold all the counters. In this case,