src/share/vm/gc_implementation/shared/vmGCOperations.cpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -85,10 +85,12 @@
   return skip;
 }
 
 bool VM_GC_Operation::doit_prologue() {
   assert(Thread::current()->is_Java_thread(), "just checking");
+  assert(((_gc_cause != GCCause::_no_gc) &&
+          (_gc_cause != GCCause::_no_cause_specified)), "Illegal GCCause");
 
   acquire_pending_list_lock();
   // If the GC count has changed someone beat us to the collection
   // Get the Heap_lock after the pending_list_lock.
   Heap_lock->lock();