< prev index next >
src/share/vm/gc_implementation/shenandoah/shenandoahHeapRegion.hpp
Print this page
rev 10654 : [backport] Disable ShHeapUncommit on too-large large-pages
rev 10660 : [backport] Refactor bitmap cleaning
rev 10673 : [backport] Homogenize unimplemented stubs handling
rev 10674 : [backport] Move ShenandoahAllocType and ShenandoahAllocRequest to separate file
rev 10690 : [backport] Cleanup header files and forward declarations
rev 10740 : [backport] Protect more internal code from false sharing
rev 10772 : [backport] Update copyrights
*** 1,7 ****
/*
! * Copyright (c) 2013, 2017, Red Hat, Inc. and/or its affiliates.
*
* 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.
*
--- 1,7 ----
/*
! * Copyright (c) 2013, 2018, Red Hat, Inc. All rights reserved.
*
* 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.
*
*** 23,32 ****
--- 23,36 ----
#ifndef SHARE_VM_GC_SHENANDOAH_SHENANDOAHHEAPREGION_HPP
#define SHARE_VM_GC_SHENANDOAH_SHENANDOAHHEAPREGION_HPP
#include "memory/space.hpp"
+ #include "gc_implementation/shenandoah/shenandoahAllocRequest.hpp"
+ #include "gc_implementation/shenandoah/shenandoahAsserts.hpp"
+ #include "gc_implementation/shenandoah/shenandoahHeap.hpp"
+ #include "gc_implementation/shenandoah/shenandoahPacer.hpp"
class VMStructs;
class ShenandoahHeapRegion : public ContiguousSpace {
friend class VMStructs;
*** 161,170 ****
--- 165,175 ----
void make_humongous_cont_bypass();
void make_pinned();
void make_unpinned();
void make_cset();
void make_trash();
+ void make_trash_immediate();
void make_empty();
void make_uncommitted();
void make_committed_bypass();
// Individual states:
*** 201,232 ****
static size_t HumongousThresholdBytes;
static size_t HumongousThresholdWords;
static size_t MaxTLABSizeBytes;
static size_t MaxTLABSizeWords;
! private:
ShenandoahHeap* _heap;
! size_t _region_number;
! volatile jint _live_data;
MemRegion _reserved;
! size_t _tlab_allocs;
! size_t _gclab_allocs;
! size_t _shared_allocs;
!
HeapWord* _new_top;
-
size_t _critical_pins;
RegionState _state;
- double _empty_time;
! ShenandoahPacer* _pacer;
public:
ShenandoahHeapRegion(ShenandoahHeap* heap, HeapWord* start, size_t size_words, size_t index, bool committed);
static void setup_sizes(size_t initial_heap_size, size_t max_heap_size);
double empty_time() {
return _empty_time;
}
--- 206,244 ----
static size_t HumongousThresholdBytes;
static size_t HumongousThresholdWords;
static size_t MaxTLABSizeBytes;
static size_t MaxTLABSizeWords;
! // Never updated fields
ShenandoahHeap* _heap;
! ShenandoahPacer* _pacer;
MemRegion _reserved;
+ size_t _region_number;
! // Rarely updated fields
HeapWord* _new_top;
size_t _critical_pins;
+ double _empty_time;
+ // Seldom updated fields
RegionState _state;
! // Frequently updated fields
! size_t _tlab_allocs;
! size_t _gclab_allocs;
! size_t _shared_allocs;
!
! volatile jint _live_data;
!
! // Claim some space at the end to protect next region
! char _pad0[DEFAULT_CACHE_LINE_SIZE];
public:
ShenandoahHeapRegion(ShenandoahHeap* heap, HeapWord* start, size_t size_words, size_t index, bool committed);
+ static const size_t MIN_NUM_REGIONS = 10;
+
static void setup_sizes(size_t initial_heap_size, size_t max_heap_size);
double empty_time() {
return _empty_time;
}
*** 304,323 ****
}
size_t region_number() const;
// Allocation (return NULL if full)
! inline HeapWord* allocate(size_t word_size, ShenandoahHeap::AllocType type);
! HeapWord* allocate(size_t word_size) {
! // ContiguousSpace wants us to have this method. But it is an error to call this with Shenandoah.
! ShouldNotCallThis();
! return NULL;
! }
! // Roll back the previous allocation of an object with specified size.
! // Returns TRUE when successful, FALSE if not successful or not supported.
! bool rollback_allocation(uint size);
void clear_live_data();
void set_live_data(size_t s);
// Increase live data for newly allocated region
--- 316,328 ----
}
size_t region_number() const;
// Allocation (return NULL if full)
! inline HeapWord* allocate(size_t word_size, ShenandoahAllocRequest::Type type);
! HeapWord* allocate(size_t word_size) shenandoah_not_implemented_return(NULL)
void clear_live_data();
void set_live_data(size_t s);
// Increase live data for newly allocated region
*** 334,361 ****
size_t garbage() const;
void recycle();
! void oop_iterate_skip_unreachable(ExtendedOopClosure* cl, bool skip_unreachable_objects);
!
! HeapWord* object_iterate_careful(ObjectClosureCareful* cl);
HeapWord* block_start_const(const void* p) const;
- // Just before GC we need to fill the current region.
- void fill_region();
-
bool in_collection_set() const;
// Find humongous start region that this region belongs to
ShenandoahHeapRegion* humongous_start_region() const;
void set_new_top(HeapWord* new_top) { _new_top = new_top; }
HeapWord* new_top() const { return _new_top; }
! inline void adjust_alloc_metadata(ShenandoahHeap::AllocType type, size_t);
void reset_alloc_metadata_to_shared();
void reset_alloc_metadata();
size_t get_shared_allocs() const;
size_t get_tlab_allocs() const;
size_t get_gclab_allocs() const;
--- 339,362 ----
size_t garbage() const;
void recycle();
! void oop_iterate_skip_unreachable(ExtendedOopClosure* cl, bool skip_unreachable_objects) shenandoah_not_implemented;
! HeapWord* object_iterate_careful(ObjectClosureCareful* cl) shenandoah_not_implemented_return(NULL);
HeapWord* block_start_const(const void* p) const;
bool in_collection_set() const;
// Find humongous start region that this region belongs to
ShenandoahHeapRegion* humongous_start_region() const;
void set_new_top(HeapWord* new_top) { _new_top = new_top; }
HeapWord* new_top() const { return _new_top; }
! inline void adjust_alloc_metadata(ShenandoahAllocRequest::Type type, size_t);
void reset_alloc_metadata_to_shared();
void reset_alloc_metadata();
size_t get_shared_allocs() const;
size_t get_tlab_allocs() const;
size_t get_gclab_allocs() const;
< prev index next >