aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjprovino <none@none>2013-03-06 13:46:55 -0500
committerjprovino <none@none>2013-03-06 13:46:55 -0500
commit155f73153e983c8dd6b5683f989fd96089b5c822 (patch)
tree2bba5c5ad26f2a514f9a9366db4e2c3340a63cc6
parente208de896ce659d8173e5bb8204bd6eaaf7d989d (diff)
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
-rw-r--r--src/cpu/x86/vm/frame_x86.cpp2
-rw-r--r--src/cpu/x86/vm/frame_x86.hpp2
-rw-r--r--src/share/vm/c1/c1_LIR.hpp2
-rw-r--r--src/share/vm/ci/ciTypeFlow.cpp2
-rw-r--r--src/share/vm/code/compressedStream.cpp4
-rw-r--r--src/share/vm/gc_implementation/g1/concurrentMark.cpp16
-rw-r--r--src/share/vm/prims/jvmtiImpl.cpp2
-rw-r--r--src/share/vm/prims/jvmtiTrace.hpp4
8 files changed, 9 insertions, 25 deletions
diff --git a/src/cpu/x86/vm/frame_x86.cpp b/src/cpu/x86/vm/frame_x86.cpp
index fa0855c45..93180c8e3 100644
--- a/src/cpu/x86/vm/frame_x86.cpp
+++ b/src/cpu/x86/vm/frame_x86.cpp
@@ -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;
diff --git a/src/cpu/x86/vm/frame_x86.hpp b/src/cpu/x86/vm/frame_x86.hpp
index b3c3f416c..0033077dd 100644
--- a/src/cpu/x86/vm/frame_x86.hpp
+++ b/src/cpu/x86/vm/frame_x86.hpp
@@ -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) {
diff --git a/src/share/vm/c1/c1_LIR.hpp b/src/share/vm/c1/c1_LIR.hpp
index cec92f78c..72051f19f 100644
--- a/src/share/vm/c1/c1_LIR.hpp
+++ b/src/share/vm/c1/c1_LIR.hpp
@@ -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
diff --git a/src/share/vm/ci/ciTypeFlow.cpp b/src/share/vm/ci/ciTypeFlow.cpp
index bdbeeaf93..b76dd3d0f 100644
--- a/src/share/vm/ci/ciTypeFlow.cpp
+++ b/src/share/vm/ci/ciTypeFlow.cpp
@@ -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());
diff --git a/src/share/vm/code/compressedStream.cpp b/src/share/vm/code/compressedStream.cpp
index 1d5cb3413..82b05fc03 100644
--- a/src/share/vm/code/compressedStream.cpp
+++ b/src/share/vm/code/compressedStream.cpp
@@ -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
diff --git a/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index cc2a611f0..b6a8cac6f 100644
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -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
diff --git a/src/share/vm/prims/jvmtiImpl.cpp b/src/share/vm/prims/jvmtiImpl.cpp
index 4a1747e1b..c569b8fdc 100644
--- a/src/share/vm/prims/jvmtiImpl.cpp
+++ b/src/share/vm/prims/jvmtiImpl.cpp
@@ -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 = "";
diff --git a/src/share/vm/prims/jvmtiTrace.hpp b/src/share/vm/prims/jvmtiTrace.hpp
index b6d422497..6be50d8ad 100644
--- a/src/share/vm/prims/jvmtiTrace.hpp
+++ b/src/share/vm/prims/jvmtiTrace.hpp
@@ -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