< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahMarkingContext.hpp

Print this page
@@ -1,7 +1,8 @@
  /*
   * Copyright (c) 2018, 2021, Red Hat, Inc. All rights reserved.
+  * Copyright Amazon.com Inc. 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.

@@ -45,50 +46,48 @@
    HeapWord** const _top_at_mark_starts_base;
    HeapWord** const _top_at_mark_starts;
  
    ShenandoahSharedFlag _is_complete;
  
-   // Marking task queues
-   ShenandoahObjToScanQueueSet* _task_queues;
- 
  public:
-   ShenandoahMarkingContext(MemRegion heap_region, MemRegion bitmap_region, size_t num_regions, uint max_queues);
-   ~ShenandoahMarkingContext();
+   ShenandoahMarkingContext(MemRegion heap_region, MemRegion bitmap_region, size_t num_regions);
  
    /*
     * Marks the object. Returns true if the object has not been marked before and has
     * been marked by this thread. Returns false if the object has already been marked,
     * or if a competing thread succeeded in marking this object.
     */
    inline bool mark_strong(oop obj, bool& was_upgraded);
    inline bool mark_weak(oop obj);
  
    // Simple versions of marking accessors, to be used outside of marking (e.g. no possible concurrent updates)
-   inline bool is_marked(oop) const;
-   inline bool is_marked_strong(oop obj) const;
-   inline bool is_marked_weak(oop obj) const;
+   // TODO: Do these really need to be const?
+   inline bool is_marked(const oop) const;
+   inline bool is_marked_strong(const oop obj) const;
+   inline bool is_marked_weak(const oop obj) const;
+   inline bool is_marked_or_old(const oop obj) const;
+   inline bool is_marked_strong_or_old(const oop obj) const;
  
-   inline HeapWord* get_next_marked_addr(HeapWord* addr, HeapWord* limit) const;
+   inline HeapWord* get_next_marked_addr(const HeapWord* addr, const HeapWord* limit) const;
  
-   inline bool allocated_after_mark_start(oop obj) const;
-   inline bool allocated_after_mark_start(HeapWord* addr) const;
+   inline bool allocated_after_mark_start(const oop obj) const;
+   inline bool allocated_after_mark_start(const HeapWord* addr) const;
  
-   inline HeapWord* top_at_mark_start(ShenandoahHeapRegion* r) const;
+   inline HeapWord* top_at_mark_start(const ShenandoahHeapRegion* r) const;
    inline void capture_top_at_mark_start(ShenandoahHeapRegion* r);
    inline void reset_top_at_mark_start(ShenandoahHeapRegion* r);
    void initialize_top_at_mark_start(ShenandoahHeapRegion* r);
  
+   HeapWord* top_bitmap(ShenandoahHeapRegion* r);
+ 
    inline void reset_top_bitmap(ShenandoahHeapRegion *r);
    void clear_bitmap(ShenandoahHeapRegion *r);
  
    bool is_bitmap_clear() const;
-   bool is_bitmap_clear_range(HeapWord* start, HeapWord* end) const;
+   bool is_bitmap_clear_range(const HeapWord* start, const HeapWord* end) const;
  
    bool is_complete();
    void mark_complete();
    void mark_incomplete();
- 
-   // Task queues
-   ShenandoahObjToScanQueueSet* task_queues() const { return _task_queues; }
  };
  
  #endif // SHARE_GC_SHENANDOAH_SHENANDOAHMARKINGCONTEXT_HPP
< prev index next >