8006498: #if <symbol> is wrong in the code

ASSERT and other symbols used incorrectly with #if are supposed to be defined or not.

Reviewed-by: dholmes, mikael
This commit is contained in:
Joseph Provino 2013-03-06 13:46:55 -05:00
parent a6be16446d
commit e1f180f82e
8 changed files with 9 additions and 25 deletions

View File

@ -356,7 +356,7 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
// Verifies the calculated original PC of a deoptimization PC for the
// given unextended SP. The unextended SP might also be the saved SP
// for MethodHandle call sites.
#if ASSERT
#ifdef ASSERT
void frame::verify_deopt_original_pc(nmethod* nm, intptr_t* unextended_sp, bool is_method_handle_return) {
frame fr;

View File

@ -170,7 +170,7 @@
return (intptr_t*) addr_at(offset);
}
#if ASSERT
#ifdef ASSERT
// Used in frame::sender_for_{interpreter,compiled}_frame
static void verify_deopt_original_pc( nmethod* nm, intptr_t* unextended_sp, bool is_method_handle_return = false);
static void verify_deopt_mh_original_pc(nmethod* nm, intptr_t* unextended_sp) {

View File

@ -2375,7 +2375,7 @@ class LIR_OpVisitState: public StackObj {
// collects all register operands of the instruction
void visit(LIR_Op* op);
#if ASSERT
#ifdef ASSERT
// check that an operation has no operands
bool no_operands(LIR_Op* op);
#endif

View File

@ -2540,7 +2540,7 @@ void ciTypeFlow::build_loop_tree(Block* blk) {
} else if (innermost->head() == blk) {
// If loop header, complete the tree pointers
if (blk->loop() != innermost) {
#if ASSERT
#ifdef ASSERT
assert(blk->loop()->head() == innermost->head(), "same head");
Loop* dl;
for (dl = innermost; dl != NULL && dl != blk->loop(); dl = dl->parent());

View File

@ -195,7 +195,7 @@ void CompressedWriteStream::write_int_mb(jint value) {
// for this block (a matching directive turns it back on later).
// These directives can be removed once the MS VS.NET 2005
// compiler stack overflow is fixed.
#if _MSC_VER >=1400 && !defined(_WIN64)
#if defined(_MSC_VER) && _MSC_VER >=1400 && !defined(_WIN64)
#pragma optimize("", off)
#pragma warning(disable: 4748)
#endif
@ -276,7 +276,7 @@ void test_compressed_stream(int trace) {
guarantee(fails == 0, "test failures");
}
#if _MSC_VER >=1400 && !defined(_WIN64)
#if defined(_MSC_VER) &&_MSC_VER >=1400 && !defined(_WIN64)
#pragma warning(default: 4748)
#pragma optimize("", on)
#endif

View File

@ -1310,11 +1310,6 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
_markStack.expand();
}
#if VERIFY_OBJS_PROCESSED
_scan_obj_cl.objs_processed = 0;
ThreadLocalObjQueue::objs_enqueued = 0;
#endif
// Statistics
double now = os::elapsedTime();
_remark_mark_times.add((mark_work_end - start) * 1000.0);
@ -2555,17 +2550,6 @@ void ConcurrentMark::checkpointRootsFinalWork() {
guarantee(satb_mq_set.completed_buffers_num() == 0, "invariant");
print_stats();
#if VERIFY_OBJS_PROCESSED
if (_scan_obj_cl.objs_processed != ThreadLocalObjQueue::objs_enqueued) {
gclog_or_tty->print_cr("Processed = %d, enqueued = %d.",
_scan_obj_cl.objs_processed,
ThreadLocalObjQueue::objs_enqueued);
guarantee(_scan_obj_cl.objs_processed ==
ThreadLocalObjQueue::objs_enqueued,
"Different number of objs processed and enqueued.");
}
#endif
}
#ifndef PRODUCT

View File

@ -890,7 +890,7 @@ void JvmtiSuspendControl::print() {
tty->print("Suspended Threads: [");
for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) {
#if JVMTI_TRACE
#ifdef JVMTI_TRACE
const char *name = JvmtiTrace::safe_get_thread_name(thread);
#else
const char *name = "";

View File

@ -43,10 +43,10 @@
// Support tracing except in product build on the client compiler
#ifndef PRODUCT
#define JVMTI_TRACE 1
#define JVMTI_TRACE
#else
#ifdef COMPILER2
#define JVMTI_TRACE 1
#define JVMTI_TRACE
#endif
#endif