本文整理汇总了C++中PerformanceCounter::getInvertCntMask方法的典型用法代码示例。如果您正苦于以下问题:C++ PerformanceCounter::getInvertCntMask方法的具体用法?C++ PerformanceCounter::getInvertCntMask怎么用?C++ PerformanceCounter::getInvertCntMask使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerformanceCounter
的用法示例。
在下文中一共展示了PerformanceCounter::getInvertCntMask方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mask
void Processor::K10PerformanceCounters::perfCounterGetInfo (class Processor *p) {
PerformanceCounter *performanceCounter;
DWORD node, core, slot;
printf ("Caption:\n");
printf ("Evt:\tperformance counter event\n");
printf ("En:\tperformance counter is enabled\n");
printf ("U:\tperformance counter will count usermode instructions\n");
printf ("OS:\tperformance counter will counter Os/kernel instructions\n");
printf ("cMsk:\tperformance counter mask (see processor manual reference)\n");
printf ("ED:\tcounting on edge detect, else counting on level detect\n");
printf ("APIC:\tif set, an APIC interrupt will be issued on counter overflow\n");
printf ("icMsk:\tif set, mask is inversed (see processor manual reference)\n");
printf ("uMsk:\tunit mask (see processor manual reference)\n\n");
for (node = 0; node < p->getProcessorNodes(); node++)
{
printf ("--- Node %d\n", node);
p->setNode(node);
p->setCore(ALL_CORES);
for (slot = 0; slot < p->getMaxSlots(); slot++)
{
performanceCounter = new PerformanceCounter(p->getMask(), slot, p->getMaxSlots());
for (core = 0; core < p->getProcessorCores(); core++)
{
if (!performanceCounter->fetch (core))
{
printf ("K10PerformanceCounters.cpp::perfCounterGetInfo - unable to read performance counter register\n");
free (performanceCounter);
return;
}
printf ("Slot %d core %d - evt:0x%x En:%d U:%d OS:%d cMsk:%x ED:%d APIC:%d icMsk:%x uMsk:%x\n",
slot,
core,
performanceCounter->getEventSelect(),
performanceCounter->getEnabled(),
performanceCounter->getCountUserMode(),
performanceCounter->getCountOsMode(),
performanceCounter->getCounterMask(),
performanceCounter->getEdgeDetect(),
performanceCounter->getEnableAPICInterrupt(),
performanceCounter->getInvertCntMask(),
performanceCounter->getUnitMask()
);
}
free (performanceCounter);
}
}
}