hotspot/src/share/vm/gc/shared/strongRootsScope.hpp
changeset 30868 c1b24f26deed
parent 30764 fec48bf5a827
equal deleted inserted replaced
30867:1c87147477bd 30868:c1b24f26deed
    27 
    27 
    28 #include "memory/allocation.hpp"
    28 #include "memory/allocation.hpp"
    29 
    29 
    30 class MarkScope : public StackObj {
    30 class MarkScope : public StackObj {
    31  protected:
    31  protected:
    32   bool _active;
    32   MarkScope();
    33  public:
       
    34   MarkScope(bool activate = true);
       
    35   ~MarkScope();
    33   ~MarkScope();
    36 };
    34 };
    37 
    35 
    38 // Sets up and tears down the required state for parallel root processing.
    36 // Sets up and tears down the required state for parallel root processing.
    39 
    37 
    40 class StrongRootsScope : public MarkScope {
    38 class StrongRootsScope : public MarkScope {
       
    39   // Number of threads participating in the roots processing.
       
    40   const uint _n_threads;
       
    41 
    41  public:
    42  public:
    42   StrongRootsScope(bool activate = true);
    43   StrongRootsScope(uint n_threads);
    43   ~StrongRootsScope();
    44   ~StrongRootsScope();
       
    45 
       
    46   uint n_threads() const { return _n_threads; }
    44 };
    47 };
    45 
    48 
    46 #endif // SHARE_VM_GC_SHARED_STRONGROOTSSCOPE_HPP
    49 #endif // SHARE_VM_GC_SHARED_STRONGROOTSSCOPE_HPP