当前位置: 首页>>代码示例>>C++>>正文


C++ PerfCounter类代码示例

本文整理汇总了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;
	}
}
开发者ID:mreyna1216,项目名称:gator,代码行数:7,代码来源:PerfDriver.cpp

示例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;
}
开发者ID:mreyna1216,项目名称:gator,代码行数:9,代码来源:PerfDriver.cpp

示例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;
}
开发者ID:mreyna1216,项目名称:gator,代码行数:10,代码来源:PerfDriver.cpp

示例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;
}
开发者ID:mreyna1216,项目名称:gator,代码行数:12,代码来源:PerfDriver.cpp

示例5: resetCounters

void PerfDriver::resetCounters() {
	for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
		counter->setEnabled(false);
	}
}
开发者ID:mreyna1216,项目名称:gator,代码行数:5,代码来源:PerfDriver.cpp

示例6: unloaded_class_bytes

 static jlong unloaded_class_bytes() {
   if (UsePerfData) {
     return _classbytes_unloaded->get_value() + _shared_classbytes_unloaded->get_value();
   } else {
     return -1;
   }
 }
开发者ID:guanxiaohua,项目名称:TransGC,代码行数:7,代码来源:classLoadingService.hpp

示例7: get_total_thread_count

 static jlong get_total_thread_count()       { return _total_threads_count->get_value(); }
开发者ID:guanxiaohua,项目名称:TransGC,代码行数:1,代码来源:threadService.hpp

示例8: unloaded_shared_class_count

 static jlong unloaded_shared_class_count() {
   return _shared_classes_unloaded_count->get_value();
 }
开发者ID:guanxiaohua,项目名称:TransGC,代码行数:3,代码来源:classLoadingService.hpp

示例9: loaded_class_count

 static jlong loaded_class_count() {
   return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
 }
开发者ID:guanxiaohua,项目名称:TransGC,代码行数:3,代码来源:classLoadingService.hpp

示例10: total_compilation_ticks

 // Return total compilation ticks
 static jlong total_compilation_ticks() {
   return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
 }
开发者ID:pombreda,项目名称:graal,代码行数:4,代码来源:compileBroker.hpp


注:本文中的PerfCounter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。