collectedHeap.inline.hpp revision 3643
1999N/A * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1324N/A// Inline allocation implementations. 0N/A // May be bootstrapping 0N/A // These asserts are kind of complicated because of klassKlass 0N/A // and the beginning of the world. 0N/A "missing blueprint");
0N/A// Support for jvmti and dtrace 0N/A // support low memory notifications (no-op if not enabled) 0N/A // support for JVMTI VMObjectAlloc event (no-op if not enabled) 0N/A // support for Dtrace object alloc event (no-op most of the time) 0N/A // notify jvmti and dtrace 0N/A // Set array length before setting the _klass field 0N/A // in post_allocation_setup_common() because the klass field 0N/A // indicates that the object is parsable by concurrent GC. 0N/A // notify jvmti and dtrace (must be after length is set for dtrace) 0N/A // Clear unhandled oops for memory allocation. Memory allocation might 0N/A // not take out a lock if from tlab, so clear here. 0N/A return NULL;
// caller does a CHECK_0 too 0N/A "Unexpected exception, will result in uninitialized storage");
0N/A "Unexpected exception, will result in uninitialized storage");
0N/A // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support 0N/A // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support 113N/A "GC overhead limit exceeded");
113N/A// Need to investigate, do we really want to throw OOM exception here? 113N/A return NULL;
// caller does a CHECK_NULL too 0N/A // For testing of OOM handling in the CI throw an OOM and see how 0N/A // it does. Historically improper handling of these has resulted 113N/A // in crashes which we really don't want to have in the CI. 2346N/A "Unexpected exception, will result in uninitialized storage");
2346N/A // -XX:+HeapDumpOnOutOfMemoryError and -XX:OnOutOfMemoryError support 113N/A// Returns "TRUE" if "p" is a method oop in the 1999N/A// current heap with high probability. NOTE: The main 113N/A// current consumers of this interface are Forte:: 1999N/A// and ThreadProfiler::. In these cases, the 113N/A// interpreter frame from which "p" came, may be 0N/A// under construction when sampled asynchronously, so 0N/A// the clients want to check that it represents a 0N/A// valid method before using it. Nonetheless since 1999N/A// the clients do not typically lock out GC, the 1999N/A// predicate is_valid_method() is not stable, so 1999N/A// it is possible that by the time "p" is used, it 0N/A // Check whether it is aligned at a HeapWord boundary. 0N/A // Check whether "method" is in the allocated part of the 0N/A // permanent generation -- this needs to be checked before 0N/A // p->klass() below to avoid a SEGV (but see below 0N/A // for a potential window of vulnerability). 0N/A // See if GC is active; however, there is still an 0N/A // apparently unavoidable window after this call 0N/A // and before the client of this interface uses "p". 0N/A // If the client chooses not to lock out GC, then 0N/A // it's a risk the client must accept. 0N/A // Check that p is a methodOop. 0N/A // Access to count is not atomic; the value does not have to be exact. 0N/A // Test for unsigned arithmetic wrap-around. 0N/A#
endif // #ifndef PRODUCT 0N/A#
endif // SHARE_VM_GC_INTERFACE_COLLECTEDHEAP_INLINE_HPP