提交 f993d166 编写于 作者: J jprovino

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

Summary: ASSERT and other symbols used incorrectly with #if are supposed to be defined or not.
Reviewed-by: dholmes, mikael
上级 5ba703d7
...@@ -356,7 +356,7 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const { ...@@ -356,7 +356,7 @@ frame frame::sender_for_entry_frame(RegisterMap* map) const {
// Verifies the calculated original PC of a deoptimization PC for the // Verifies the calculated original PC of a deoptimization PC for the
// given unextended SP. The unextended SP might also be the saved SP // given unextended SP. The unextended SP might also be the saved SP
// for MethodHandle call sites. // 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) { void frame::verify_deopt_original_pc(nmethod* nm, intptr_t* unextended_sp, bool is_method_handle_return) {
frame fr; frame fr;
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
return (intptr_t*) addr_at(offset); return (intptr_t*) addr_at(offset);
} }
#if ASSERT #ifdef ASSERT
// Used in frame::sender_for_{interpreter,compiled}_frame // 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_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) { static void verify_deopt_mh_original_pc(nmethod* nm, intptr_t* unextended_sp) {
......
...@@ -2375,7 +2375,7 @@ class LIR_OpVisitState: public StackObj { ...@@ -2375,7 +2375,7 @@ class LIR_OpVisitState: public StackObj {
// collects all register operands of the instruction // collects all register operands of the instruction
void visit(LIR_Op* op); void visit(LIR_Op* op);
#if ASSERT #ifdef ASSERT
// check that an operation has no operands // check that an operation has no operands
bool no_operands(LIR_Op* op); bool no_operands(LIR_Op* op);
#endif #endif
......
...@@ -2540,7 +2540,7 @@ void ciTypeFlow::build_loop_tree(Block* blk) { ...@@ -2540,7 +2540,7 @@ void ciTypeFlow::build_loop_tree(Block* blk) {
} else if (innermost->head() == blk) { } else if (innermost->head() == blk) {
// If loop header, complete the tree pointers // If loop header, complete the tree pointers
if (blk->loop() != innermost) { if (blk->loop() != innermost) {
#if ASSERT #ifdef ASSERT
assert(blk->loop()->head() == innermost->head(), "same head"); assert(blk->loop()->head() == innermost->head(), "same head");
Loop* dl; Loop* dl;
for (dl = innermost; dl != NULL && dl != blk->loop(); dl = dl->parent()); for (dl = innermost; dl != NULL && dl != blk->loop(); dl = dl->parent());
......
...@@ -195,7 +195,7 @@ void CompressedWriteStream::write_int_mb(jint value) { ...@@ -195,7 +195,7 @@ void CompressedWriteStream::write_int_mb(jint value) {
// for this block (a matching directive turns it back on later). // for this block (a matching directive turns it back on later).
// These directives can be removed once the MS VS.NET 2005 // These directives can be removed once the MS VS.NET 2005
// compiler stack overflow is fixed. // compiler stack overflow is fixed.
#if _MSC_VER >=1400 && !defined(_WIN64) #if defined(_MSC_VER) && _MSC_VER >=1400 && !defined(_WIN64)
#pragma optimize("", off) #pragma optimize("", off)
#pragma warning(disable: 4748) #pragma warning(disable: 4748)
#endif #endif
...@@ -276,7 +276,7 @@ void test_compressed_stream(int trace) { ...@@ -276,7 +276,7 @@ void test_compressed_stream(int trace) {
guarantee(fails == 0, "test failures"); 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 warning(default: 4748)
#pragma optimize("", on) #pragma optimize("", on)
#endif #endif
......
...@@ -1310,11 +1310,6 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) { ...@@ -1310,11 +1310,6 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
_markStack.expand(); _markStack.expand();
} }
#if VERIFY_OBJS_PROCESSED
_scan_obj_cl.objs_processed = 0;
ThreadLocalObjQueue::objs_enqueued = 0;
#endif
// Statistics // Statistics
double now = os::elapsedTime(); double now = os::elapsedTime();
_remark_mark_times.add((mark_work_end - start) * 1000.0); _remark_mark_times.add((mark_work_end - start) * 1000.0);
...@@ -2555,17 +2550,6 @@ void ConcurrentMark::checkpointRootsFinalWork() { ...@@ -2555,17 +2550,6 @@ void ConcurrentMark::checkpointRootsFinalWork() {
guarantee(satb_mq_set.completed_buffers_num() == 0, "invariant"); guarantee(satb_mq_set.completed_buffers_num() == 0, "invariant");
print_stats(); 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 #ifndef PRODUCT
......
...@@ -890,7 +890,7 @@ void JvmtiSuspendControl::print() { ...@@ -890,7 +890,7 @@ void JvmtiSuspendControl::print() {
tty->print("Suspended Threads: ["); tty->print("Suspended Threads: [");
for (JavaThread *thread = Threads::first(); thread != NULL; thread = thread->next()) { 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); const char *name = JvmtiTrace::safe_get_thread_name(thread);
#else #else
const char *name = ""; const char *name = "";
......
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
// Support tracing except in product build on the client compiler // Support tracing except in product build on the client compiler
#ifndef PRODUCT #ifndef PRODUCT
#define JVMTI_TRACE 1 #define JVMTI_TRACE
#else #else
#ifdef COMPILER2 #ifdef COMPILER2
#define JVMTI_TRACE 1 #define JVMTI_TRACE
#endif #endif
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册