< prev index next >

src/share/vm/gc/parallel/objectStartArray.hpp

Print this page
rev 9978 : 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
Summary: Fix remaining issues after 8146401. Also fix windows VS2010 linkage problem (g1OopClosures.hpp).
Reviewed-by: stefank, mgerdin

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, 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.

@@ -137,37 +137,20 @@
 
   // Optimized for finding the first object that crosses into
   // a given block. The blocks contain the offset of the last
   // object in that block. Scroll backwards by one, and the first
   // object hit should be at the beginning of the block
-  HeapWord* object_start(HeapWord* addr) const {
-    assert_covered_region_contains(addr);
-    jbyte* block = block_for_addr(addr);
-    HeapWord* scroll_forward = offset_addr_for_block(block--);
-    while (scroll_forward > addr) {
-      scroll_forward = offset_addr_for_block(block--);
-    }
-
-    HeapWord* next = scroll_forward;
-    while (next <= addr) {
-      scroll_forward = next;
-      next += oop(next)->size();
-    }
-    assert(scroll_forward <= addr, "wrong order for current and arg");
-    assert(addr <= next, "wrong order for arg and next");
-    return scroll_forward;
-  }
+  inline HeapWord* object_start(HeapWord* addr) const;
 
   bool is_block_allocated(HeapWord* addr) {
     assert_covered_region_contains(addr);
     jbyte* block = block_for_addr(addr);
     if (*block == clean_block)
       return false;
 
     return true;
   }
-#undef assert_covered_region_contains
 
   // Return true if an object starts in the range of heap addresses.
   // If an object starts at an address corresponding to
   // "start", the method will return true.
   bool object_starts_in_range(HeapWord* start_addr, HeapWord* end_addr) const;
< prev index next >