Skip to content

Commit

Permalink
rss_report: PR comments 1
Browse files Browse the repository at this point in the history
  • Loading branch information
gita-omr committed Jun 12, 2024
1 parent f4cb190 commit baa1dbd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 1 addition & 4 deletions runtime/compiler/runtime/DataCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ TR_DataCache* TR_DataCacheManager::allocateNewDataCache(uint32_t minimumSize)
dataCache->_vmThread = NULL;
dataCache->_allocationMark = dataCacheSeg->heapAlloc;

#ifdef LINUX
if (OMR::RSSReport::instance())
{
J9JavaVM * javaVM = jitConfig->javaVM;
Expand All @@ -304,7 +303,6 @@ TR_DataCache* TR_DataCacheManager::allocateNewDataCache(uint32_t minimumSize)
j9vmem_supported_page_sizes()[0]);
OMR::RSSReport::instance()->addRegion(dataCache->_rssRegion);
}
#endif

_numAllocatedCaches++;
_totalSegmentMemoryAllocated += (uint32_t)allocatedSize;
Expand Down Expand Up @@ -755,7 +753,7 @@ extern "C" {
#endif
}

#define DEBUG_DISCLAIM // GITA
#define DEBUG_DISCLAIM
//----------------------------- disclaimSegment -----------------------------
// Disclaim memory for the given segment
// Return 1 if the memory segment was disclaimed, or 0 otherwise
Expand Down Expand Up @@ -1200,4 +1198,3 @@ TR_InstrumentedDataCacheManager::calculatePoolSize()
}
return poolSize;
}

4 changes: 3 additions & 1 deletion runtime/compiler/runtime/DataCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,16 @@ class TR_DataCache
uint8_t *_allocationMark; // used if we want to give back memory up to previously set mark
//TR::Monitor *_mutex; // Is this needed?
int32_t _status; // mostly RAS at this point
OMR::RSSRegion *_rssRegion;
OMR::RSSRegion *_rssRegion; // to report footprint
public:
enum {
RESERVED=1,
ACTIVE,
ALMOST_FULL,
FULL,
};

TR_DataCache() : _rssRegion(NULL) {}
friend class TR_DataCacheManager;
// The following methods need to be called on a reserved DataCache
uint8_t *allocateDataCacheSpace(int32_t size);
Expand Down
1 change: 0 additions & 1 deletion runtime/compiler/runtime/J9CodeCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace J9 { typedef CodeCache CodeCacheConnector; }
#include "env/IO.hpp"
#include "env/VMJ9.h"


struct J9MemorySegment;
struct J9ClassLoader;

Expand Down

0 comments on commit baa1dbd

Please sign in to comment.