/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "gc_implementation/shared/markSweep.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "gc_interface/collectedHeap.inline.hpp"
#include "memory/genCollectedHeap.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/interfaceSupport.hpp"
#include "runtime/threadLocalStorage.hpp"
#include "runtime/vframe.hpp"
#include "utilities/preserveException.hpp"
// Implementation of InterfaceSupport
#ifdef ASSERT
_name = elementName;
count +=1;
if ( (WarnOnStalledSpinLock > 0)
&& (count % WarnOnStalledSpinLock == 0)) {
warning("RuntimeHistogram_lock seems to be stalled");
}
}
}
if (RuntimeHistogram == NULL) {
}
RuntimeHistogram->add_element(this);
}
}
// Check for new, not quite initialized thread. A thread in new mode cannot initiate a GC.
// Short-circuit any possible re-entrant gc-a-lot attempt
if (thread->skip_gcalot()) return;
if (is_init_completed()) {
if (++_fullgc_alot_invocation < FullGCALotStart) {
return;
}
// Use this line if you want to block at a specific point,
// e.g. one number_of_calls/scavenge/gc before you got into problems
if (FullGCALot) _fullgc_alot_counter--;
// Check if we should force a full gc
if (_fullgc_alot_counter == 0) {
// Release dummy so objects are forced to move
if (!Universe::release_fullgc_alot_dummy()) {
warning("FullGCALot: Unable to release more dummies at bottom of heap");
}
// Compute new interval
if (FullGCALotInterval > 1) {
if (PrintGCDetails && Verbose) {
}
} else {
_fullgc_alot_counter = 1;
}
// Print progress message
if (invocations % 100 == 0) {
}
} else {
if (ScavengeALot) _scavenge_alot_counter--;
// Check if we should force a scavenge
if (_scavenge_alot_counter == 0) {
unsigned int invocations = Universe::heap()->total_collections() - Universe::heap()->total_full_collections();
// Compute new interval
if (ScavengeALotInterval > 1) {
if (PrintGCDetails && Verbose) {
}
} else {
}
// Print progress message
if (invocations % 1000 == 0) {
}
}
}
}
}
int walk_stack_counter = 0;
// walk
int i = 0;
if (i < 50) vframe_array[i++] = f;
}
}
if (!thread->has_last_Java_frame()) return;
}
# ifdef ENABLE_ZAP_DEAD_LOCALS
static int zap_traversals = 0;
warning("I am here");
}
}
# endif
int deoptimizeAllCounter = 0;
int zombieAllCounter = 0;
zombieAllCounter = 0;
} else {
}
}
}
if (is_init_completed() ) {
deoptimizeAllCounter = 0;
}
}
}
#ifdef COMPILER2
if (!is_init_completed()) return;
bool found = false;
// Find oopmap for current method
}
}
if (found) {
// $$$ Not sure what to do here.
/*
Scavenge::invoke(0);
*/
}
#endif
}
// disabled because it throws warnings that oop maps should only be accessed
// in VM thread or during debugging
if (!thread->has_pending_exception()) {
// verification does not work if there are pending exceptions
// In case of exceptions we might not have a runtime_stub on
// top of stack, hence, all callee-saved registers are not going
// to be setup correctly, hence, we cannot do stack verify
}
}
}
}
#endif // ASSERT
void InterfaceSupport_init() {
#ifdef ASSERT
if (ScavengeALot || FullGCALot) {
}
#endif
}