Mercurial > hg > graal-jvmci-8
diff src/share/vm/memory/sharedHeap.hpp @ 362:f8199438385b
Merge
author | apetrusenko |
---|---|
date | Wed, 17 Sep 2008 16:49:18 +0400 |
parents | 37f87013dfd8 |
children | 7d7a7c599c17 |
line wrap: on
line diff
--- a/src/share/vm/memory/sharedHeap.hpp Thu Sep 04 18:40:43 2008 -0700 +++ b/src/share/vm/memory/sharedHeap.hpp Wed Sep 17 16:49:18 2008 +0400 @@ -44,6 +44,9 @@ class SharedHeap : public CollectedHeap { friend class VMStructs; + friend class VM_GC_Operation; + friend class VM_CGC_Operation; + private: // For claiming strong_roots tasks. SubTasksDone* _process_strong_tasks; @@ -82,6 +85,14 @@ // function. SharedHeap(CollectorPolicy* policy_); + // Returns true if the calling thread holds the heap lock, + // or the calling thread is a par gc thread and the heap_lock is held + // by the vm thread doing a gc operation. + bool heap_lock_held_for_gc(); + // True if the heap_lock is held by the a non-gc thread invoking a gc + // operation. + bool _thread_holds_heap_lock_for_gc; + public: static SharedHeap* heap() { return _sh; } @@ -97,8 +108,8 @@ void set_perm(PermGen* perm_gen) { _perm_gen = perm_gen; } - // A helper function that fills an allocated-but-not-yet-initialized - // region with a garbage object. + // A helper function that fills a region of the heap with + // with a single object. static void fill_region_with_object(MemRegion mr); // Minimum garbage fill object size @@ -214,13 +225,12 @@ // "SharedHeap" can use in the implementation of its virtual // functions. -protected: +public: // Do anything common to GC's. virtual void gc_prologue(bool full) = 0; virtual void gc_epilogue(bool full) = 0; -public: // // New methods from CollectedHeap // @@ -266,7 +276,8 @@ } // Some utilities. - void print_size_transition(size_t bytes_before, + void print_size_transition(outputStream* out, + size_t bytes_before, size_t bytes_after, size_t capacity); };