本文整理汇总了C++中MM_VerboseWriterChain::formatAndOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ MM_VerboseWriterChain::formatAndOutput方法的具体用法?C++ MM_VerboseWriterChain::formatAndOutput怎么用?C++ MM_VerboseWriterChain::formatAndOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MM_VerboseWriterChain
的用法示例。
在下文中一共展示了MM_VerboseWriterChain::formatAndOutput方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getManager
void
MM_VerboseHandlerOutputStandard::handleConcurrentHalted(J9HookInterface** hook, uintptr_t eventNum, void* eventData)
{
MM_ConcurrentHaltedEvent* event = (MM_ConcurrentHaltedEvent*)eventData;
MM_VerboseManager* manager = getManager();
MM_VerboseWriterChain* writer = manager->getWriterChain();
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(event->currentThread);
OMRPORT_ACCESS_FROM_ENVIRONMENT(env);
char tagTemplate[200];
enterAtomicReportingBlock();
getTagTemplate(tagTemplate, sizeof(tagTemplate), manager->getIdAndIncrement(), omrtime_current_time_millis());
writer->formatAndOutput(env, 0, "<concurrent-halted %s>", tagTemplate);
handleConcurrentHaltedInternal(env, eventData);
writer->formatAndOutput(env, 1,
"<traced "
"bytesTarget=\"%zu\" bytesTotal=\"%zu\" "
"bytesByMutator=\"%zu\" bytesByHelper=\"%zu\" "
"percent=\"%zu\" />",
event->traceTarget, event->tracedTotal,
event->tracedByMutators, event->tracedByHelpers,
event->traceTarget == 0 ? 0 : (uintptr_t)(((uint64_t)event->tracedTotal * 100) / (uint64_t)event->traceTarget));
writer->formatAndOutput(env, 1, "<cards cleaned=\"%zu\" thresholdBytes=\"%zu\" />", event->cardsCleaned, event->cardCleaningThreshold);
writer->formatAndOutput(env, 0, "</concurrent-halted>");
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: 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>");
}
示例5:
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))));
}