本文整理汇总了C++中PerfCounter类的典型用法代码示例。如果您正苦于以下问题:C++ PerfCounter类的具体用法?C++ PerfCounter怎么用?C++ PerfCounter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PerfCounter类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
PerfDriver::~PerfDriver() {
while (mCounters != NULL) {
PerfCounter *counter = mCounters;
mCounters = counter->getNext();
delete counter;
}
}
示例2:
PerfCounter *PerfDriver::findCounter(const Counter &counter) const {
for (PerfCounter * perfCounter = mCounters; perfCounter != NULL; perfCounter = perfCounter->getNext()) {
if (strcmp(perfCounter->getName(), counter.getType()) == 0) {
return perfCounter;
}
}
return NULL;
}
示例3: 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;
}
示例4: 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;
}
示例5: resetCounters
void PerfDriver::resetCounters() {
for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
counter->setEnabled(false);
}
}
示例6: unloaded_class_bytes
static jlong unloaded_class_bytes() {
if (UsePerfData) {
return _classbytes_unloaded->get_value() + _shared_classbytes_unloaded->get_value();
} else {
return -1;
}
}
示例7: get_total_thread_count
static jlong get_total_thread_count() { return _total_threads_count->get_value(); }
示例8: unloaded_shared_class_count
static jlong unloaded_shared_class_count() {
return _shared_classes_unloaded_count->get_value();
}
示例9: loaded_class_count
static jlong loaded_class_count() {
return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
}
示例10: total_compilation_ticks
// Return total compilation ticks
static jlong total_compilation_ticks() {
return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
}