8006498: #if <symbol> is wrong in the code.
authorjprovino
Wed, 06 Mar 2013 13:46:55 -0500
changeset 15937 fd3d2d0175f9
parent 15936 4fda1079e8a3
child 15938 fb5f9016ddbc
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
hotspot/src/cpu/x86/vm/frame_x86.cpp
hotspot/src/cpu/x86/vm/frame_x86.hpp
hotspot/src/share/vm/c1/c1_LIR.hpp
hotspot/src/share/vm/ci/ciTypeFlow.cpp
hotspot/src/share/vm/code/compressedStream.cpp
hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
hotspot/src/share/vm/prims/jvmtiImpl.cpp
hotspot/src/share/vm/prims/jvmtiTrace.hpp
--- a/hotspot/src/cpu/x86/vm/frame_x86.cpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/cpu/x86/vm/frame_x86.cpp	Wed Mar 06 13:46:55 2013 -0500
@@ -356,7 +356,7 @@
 // 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;
 
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp	Wed Mar 06 13:46:55 2013 -0500
@@ -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) {
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp	Wed Mar 06 13:46:55 2013 -0500
@@ -2375,7 +2375,7 @@
   // 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
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Wed Mar 06 13:46:55 2013 -0500
@@ -2540,7 +2540,7 @@
   } 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());
--- a/hotspot/src/share/vm/code/compressedStream.cpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/code/compressedStream.cpp	Wed Mar 06 13:46:55 2013 -0500
@@ -195,7 +195,7 @@
 // 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 @@
   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
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Wed Mar 06 13:46:55 2013 -0500
@@ -1310,11 +1310,6 @@
     _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 @@
   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
--- a/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.cpp	Wed Mar 06 13:46:55 2013 -0500
@@ -890,7 +890,7 @@
 
   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   = "";
--- a/hotspot/src/share/vm/prims/jvmtiTrace.hpp	Wed Mar 06 13:38:17 2013 -0500
+++ b/hotspot/src/share/vm/prims/jvmtiTrace.hpp	Wed Mar 06 13:46:55 2013 -0500
@@ -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