Skip to content

Commit

Permalink
Print Memory Stats
Browse files Browse the repository at this point in the history
Signed-off-by: Irwin D'Souza <dsouzai@ca.ibm.com>
  • Loading branch information
Irwin D'Souza committed Jun 13, 2018
1 parent ef9a7ab commit 512971b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2713,6 +2713,13 @@ void TR::CompilationInfo::stopCompilationThreads()
fprintf(stderr, "Allocated memory for profile info = %d KB\n", getJProfilerThread()->getProfileInfoFootprint()/1024);
}

static char * printPersistentMem = feGetEnv("TR_PrintPersistentMem");
if (printPersistentMem)
{
if (trPersistentMemory)
trPersistentMemory->printMemStats();
}

TR_DataCacheManager::getManager()->printStatistics();

bool aotStatsEnabled = TR::Options::getAOTCmdLineOptions()->getOption(TR_EnableAOTStats);
Expand Down
3 changes: 3 additions & 0 deletions runtime/compiler/control/HookedByTheJit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6554,6 +6554,9 @@ static int32_t J9THREAD_PROC samplerThreadProc(void * entryarg)
// number of processors might change
if (crtTime > lastProcNumCheck + 300000) // every 5 mins
{
if (trPersistentMemory && TR::Options::getCmdLineOptions()->getVerboseOption(TR_VerboseJitMemory))
trPersistentMemory->printMemStatsToVlog();

// time to reevaluate the number of processors
compInfo->computeAndCacheCpuEntitlement();
uint32_t tempProc = compInfo->getNumTargetCPUs(); // TODO is this needed?
Expand Down

0 comments on commit 512971b

Please sign in to comment.