本文整理汇总了C++中PerfCounter::getNext方法的典型用法代码示例。如果您正苦于以下问题:C++ PerfCounter::getNext方法的具体用法?C++ PerfCounter::getNext怎么用?C++ PerfCounter::getNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PerfCounter
的用法示例。
在下文中一共展示了PerfCounter::getNext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
PerfDriver::~PerfDriver() {
while (mCounters != NULL) {
PerfCounter *counter = mCounters;
mCounters = counter->getNext();
delete counter;
}
}
示例2: writeCounters
int PerfDriver::writeCounters(mxml_node_t *root) const {
int count = 0;
for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
mxml_node_t *node = mxmlNewElement(root, "counter");
mxmlElementSetAttr(node, "name", counter->getName());
++count;
}
return count;
}
示例3: enable
bool PerfDriver::enable(PerfGroup *const group, Buffer *const buffer) const {
for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
if (counter->isEnabled() && (counter->getType() != TYPE_DERIVED)) {
if (!group->add(buffer, counter->getKey(), counter->getType(), counter->getConfig(), counter->getCount(), counter->getCount() > 0 ? PERF_SAMPLE_TID | PERF_SAMPLE_IP : 0, counter->isPerCpu() ? PERF_GROUP_PER_CPU : 0)) {
logg->logMessage("%s(%s:%i): PerfGroup::add failed", __FUNCTION__, __FILE__, __LINE__);
return false;
}
}
}
return true;
}
示例4: resetCounters
void PerfDriver::resetCounters() {
for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
counter->setEnabled(false);
}
}