< prev index next >

src/hotspot/share/memory/metaspace/testHelpers.hpp

Print this page
*** 73,11 ***
    const size_t _reserve_limit;
    const size_t _commit_limit;
  
    MetaspaceContext* _context;
    CommitLimiter _commit_limiter;
-   SizeAtomicCounter _used_words_counter;
  
    // For non-expandable contexts we keep track of the space
    // and delete it at destruction time.
    ReservedSpace _rs;
  
--- 73,10 ---

*** 96,19 ***
  
    // Accessors
    const CommitLimiter& commit_limiter() const { return _commit_limiter; }
    const VirtualSpaceList& vslist() const      { return *(_context->vslist()); }
    ChunkManager& cm()                          { return *(_context->cm()); }
  
    // Returns reserve- and commit limit we run the test with (in the real world,
    // these would be equivalent to CompressedClassSpaceSize resp MaxMetaspaceSize)
    size_t reserve_limit() const    { return _reserve_limit == 0 ? max_uintx : 0; }
    size_t commit_limit() const     { return _commit_limit == 0 ? max_uintx : 0; }
  
!   // Convenience function to retrieve total committed/used words
!   size_t used_words() const       { return _used_words_counter.get(); }
!   size_t committed_words() const  { return _commit_limiter.committed_words(); }
  
    DEBUG_ONLY(void verify() const;)
  
    void print_on(outputStream* st) const;
  
--- 95,20 ---
  
    // Accessors
    const CommitLimiter& commit_limiter() const { return _commit_limiter; }
    const VirtualSpaceList& vslist() const      { return *(_context->vslist()); }
    ChunkManager& cm()                          { return *(_context->cm()); }
+   MetaspaceContext* context() const           { return _context; }
  
    // Returns reserve- and commit limit we run the test with (in the real world,
    // these would be equivalent to CompressedClassSpaceSize resp MaxMetaspaceSize)
    size_t reserve_limit() const    { return _reserve_limit == 0 ? max_uintx : 0; }
    size_t commit_limit() const     { return _commit_limit == 0 ? max_uintx : 0; }
  
!   size_t used_words() const;
!   size_t committed_words() const;
!   size_t reserved_words() const;
  
    DEBUG_ONLY(void verify() const;)
  
    void print_on(outputStream* st) const;
  
< prev index next >