本文整理汇总了C++中MM_VerboseWriterChain类的典型用法代码示例。如果您正苦于以下问题:C++ MM_VerboseWriterChain类的具体用法?C++ MM_VerboseWriterChain怎么用?C++ MM_VerboseWriterChain使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MM_VerboseWriterChain类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getManager
void
MM_VerboseHandlerOutputStandard::handleCompactEnd(J9HookInterface** hook, uintptr_t eventNum, void* eventData)
{
MM_CompactEndEvent* event = (MM_CompactEndEvent*)eventData;
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(event->omrVMThread);
MM_VerboseManager* manager = getManager();
MM_VerboseWriterChain* writer = manager->getWriterChain();
MM_CompactStats *compactStats = &MM_GCExtensionsBase::getExtensions(env->getOmrVM())->globalGCStats.compactStats;
uint64_t duration = 0;
bool deltaTimeSuccess = getTimeDeltaInMicroSeconds(&duration, compactStats->_startTime, compactStats->_endTime);
enterAtomicReportingBlock();
handleGCOPOuterStanzaStart(env, "compact", env->_cycleState->_verboseContextID, duration, deltaTimeSuccess);
if(COMPACT_PREVENTED_NONE == compactStats->_compactPreventedReason) {
writer->formatAndOutput(env, 1, "<compact-info movecount=\"%zu\" movebytes=\"%zu\" reason=\"%s\" />",
compactStats->_movedObjects, compactStats->_movedBytes, getCompactionReasonAsString(compactStats->_compactReason));
} else {
writer->formatAndOutput(env, 1, "<compact-info reason=\"%s\" />", getCompactionReasonAsString(compactStats->_compactReason));
writer->formatAndOutput(env, 1, "<warning details=\"compaction prevented due to %s\" />", getCompactionPreventedReasonAsString(compactStats->_compactPreventedReason));
}
handleCompactEndInternal(env, eventData);
handleGCOPOuterStanzaEnd(env);
writer->flush(env);
exitAtomicReportingBlock();
}
示例2: sizeof
void
MM_VerboseHandlerOutput::handleInitialized(J9HookInterface** hook, uintptr_t eventNum, void* eventData)
{
MM_InitializedEvent* event = (MM_InitializedEvent*)eventData;
MM_VerboseWriterChain* writer = _manager->getWriterChain();
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(event->currentThread);
OMRPORT_ACCESS_FROM_ENVIRONMENT(env);
char tagTemplate[200];
_manager->setInitializedTime(event->timestamp);
getTagTemplate(tagTemplate, sizeof(tagTemplate), _manager->getIdAndIncrement(), omrtime_current_time_millis());
enterAtomicReportingBlock();
writer->formatAndOutput(env, 0, "<initialized %s>", tagTemplate);
writer->formatAndOutput(env, 1, "<attribute name=\"gcPolicy\" value=\"%s\" />", event->gcPolicy);
#if defined(OMR_GC_CONCURRENT_SCAVENGER)
if (_extensions->isConcurrentScavengerEnabled()) {
writer->formatAndOutput(env, 1, "<attribute name=\"concurrentScavenger\" value=\"%s\" />",
#if defined(S390)
_extensions->concurrentScavengerHWSupport ?
"enabled, with H/W assistance" :
"enabled, without H/W assistance");
#else /* defined(S390) */
"enabled");
#endif /* defined(S390) */
}
示例3:
void
MM_VerboseHandlerOutput::writeVmArgs(MM_EnvironmentBase* env)
{
/* TODO (stefanbu) OMR does not support argument parsing yet, but we should repsect schema.*/
MM_VerboseWriterChain* writer = _manager->getWriterChain();
writer->formatAndOutput(env, 1, "<vmargs>");
writer->formatAndOutput(env, 1, "</vmargs>");
}
示例4:
void
MM_VerboseHandlerOutputStandard::outputMemType(MM_EnvironmentBase* env, uintptr_t indent, const char* type, uintptr_t free, uintptr_t total)
{
MM_VerboseWriterChain* writer = _manager->getWriterChain();
writer->formatAndOutput(
env,
indent,
"<mem type=\"%s\" free=\"%zu\" total=\"%zu\" percent=\"%zu\" />",
type, free, total,
((total == 0) ? 0 : ((uintptr_t)(((uint64_t)free*100) / (uint64_t)total))));
}
示例5: OMRPORT_ACCESS_FROM_OMRPORT
void
MM_VerboseHandlerOutputStandard::handleScavengePercolate(J9HookInterface** hook, uintptr_t eventNum, void* eventData)
{
MM_PercolateCollectEvent *event = (MM_PercolateCollectEvent *)eventData;
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(event->currentThread);
OMRPORT_ACCESS_FROM_OMRPORT(env->getPortLibrary());
MM_VerboseManager* manager = getManager();
MM_VerboseWriterChain* writer = manager->getWriterChain();
char tagTemplate[200];
getTagTemplate(tagTemplate, sizeof(tagTemplate), omrtime_current_time_millis());
enterAtomicReportingBlock();
writer->formatAndOutput(env, 0, "<percolate-collect id=\"%zu\" from=\"%s\" to=\"%s\" reason=\"%s\" %s/>", manager->getIdAndIncrement(), "nursery", "global", getPercolateReasonAsString((PercolateReason)event->reason), tagTemplate);
writer->flush(env);
handleScavengePercolateInternal(env, eventData);
exitAtomicReportingBlock();
}
示例6: defined
void
MM_VerboseHandlerOutput::handleInitializedRegion(J9HookInterface** hook, uintptr_t eventNum, void* eventData)
{
MM_InitializedEvent* event = (MM_InitializedEvent*)eventData;
MM_VerboseWriterChain* writer = _manager->getWriterChain();
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(event->currentThread);
writer->formatAndOutput(env, 1, "<region>");
writer->formatAndOutput(env, 2, "<attribute name=\"regionSize\" value=\"%zu\" />", event->regionSize);
writer->formatAndOutput(env, 2, "<attribute name=\"regionCount\" value=\"%zu\" />", event->regionCount);
#if defined(OMR_GC_ARRAYLETS)
writer->formatAndOutput(env, 2, "<attribute name=\"arrayletLeafSize\" value=\"%zu\" />", event->arrayletLeafSize);
#endif
writer->formatAndOutput(env, 1, "</region>");
}