changeset 4300:1f3354851c91

Merge
author stefank
date Mon, 11 Mar 2013 08:49:53 +0100
parents 8196357e95b5 (current diff) 209f8ba5020b (diff)
children 71f619500f9b
files
diffstat 5 files changed, 19 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp	Mon Mar 11 08:49:53 2013 +0100
@@ -4111,7 +4111,7 @@
         // bitmap knows by how much we need to move it as it knows its
         // granularity).
         assert(_finger < _region_limit, "invariant");
-        HeapWord* new_finger = _nextMarkBitMap->nextWord(_finger);
+        HeapWord* new_finger = _nextMarkBitMap->nextObject(_finger);
         // Check if bitmap iteration was aborted while scanning the last object
         if (new_finger >= _region_limit) {
           giveup_current_region();
--- a/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.hpp	Mon Mar 11 08:49:53 2013 +0100
@@ -97,7 +97,6 @@
                                        HeapWord* limit = NULL) const;
 
   // conversion utilities
-  // XXX Fix these so that offsets are size_t's...
   HeapWord* offsetToHeapWord(size_t offset) const {
     return _bmStartWord + (offset << _shifter);
   }
@@ -105,8 +104,13 @@
     return pointer_delta(addr, _bmStartWord) >> _shifter;
   }
   int heapWordDiffToOffsetDiff(size_t diff) const;
-  HeapWord* nextWord(HeapWord* addr) {
-    return offsetToHeapWord(heapWordToOffset(addr) + 1);
+
+  // The argument addr should be the start address of a valid object
+  HeapWord* nextObject(HeapWord* addr) {
+    oop obj = (oop) addr;
+    HeapWord* res =  addr + obj->size();
+    assert(offsetToHeapWord(heapWordToOffset(res)) == res, "sanity");
+    return res;
   }
 
   // debugging
--- a/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp	Mon Mar 11 08:49:53 2013 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2013, 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
@@ -252,12 +252,10 @@
 
     start_offset = _bm.get_next_one_offset(start_offset, end_offset);
     while (start_offset < end_offset) {
-      HeapWord* obj_addr = offsetToHeapWord(start_offset);
-      oop obj = (oop) obj_addr;
       if (!cl->do_bit(start_offset)) {
         return false;
       }
-      HeapWord* next_addr = MIN2(obj_addr + obj->size(), end_addr);
+      HeapWord* next_addr = MIN2(nextObject(offsetToHeapWord(start_offset)), end_addr);
       BitMap::idx_t next_offset = heapWordToOffset(next_addr);
       start_offset = _bm.get_next_one_offset(next_offset, end_offset);
     }
--- a/src/share/vm/runtime/arguments.cpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/src/share/vm/runtime/arguments.cpp	Mon Mar 11 08:49:53 2013 +0100
@@ -1813,6 +1813,13 @@
   }
 }
 
+void Arguments::check_deprecated_gc_flags() {
+  if (FLAG_IS_CMDLINE(MaxGCMinorPauseMillis)) {
+    warning("Using MaxGCMinorPauseMillis as minor pause goal is deprecated"
+            "and will likely be removed in future release");
+  }
+}
+
 // Check stack pages settings
 bool Arguments::check_stack_pages()
 {
@@ -3292,6 +3299,7 @@
     set_g1_gc_flags();
   }
   check_deprecated_gcs();
+  check_deprecated_gc_flags();
 #else // INCLUDE_ALL_GCS
   assert(verify_serial_gc_flags(), "SerialGC unset");
 #endif // INCLUDE_ALL_GCS
--- a/src/share/vm/runtime/arguments.hpp	Fri Mar 08 08:22:18 2013 -0800
+++ b/src/share/vm/runtime/arguments.hpp	Mon Mar 11 08:49:53 2013 +0100
@@ -414,6 +414,7 @@
   // Check for consistency in the selection of the garbage collector.
   static bool check_gc_consistency();
   static void check_deprecated_gcs();
+  static void check_deprecated_gc_flags();
   // Check consistecy or otherwise of VM argument settings
   static bool check_vm_args_consistency();
   // Check stack pages settings