static jlong unloaded_class_bytes() {
   if (UsePerfData) {
     return _classbytes_unloaded->get_value() + _shared_classbytes_unloaded->get_value();
   } else {
     return -1;
   }
 }
Beispiel #2
0
PerfDriver::~PerfDriver() {
	while (mCounters != NULL) {
		PerfCounter *counter = mCounters;
		mCounters = counter->getNext();
		delete counter;
	}
}
Beispiel #3
0
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;
}
Beispiel #4
0
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;
}
Beispiel #5
0
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;
}
Beispiel #6
0
 static jlong get_total_thread_count()       { return _total_threads_count->get_value(); }
 static jlong unloaded_shared_class_count() {
   return _shared_classes_unloaded_count->get_value();
 }
 static jlong loaded_class_count() {
   return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
 }
Beispiel #9
0
 // Return total compilation ticks
 static jlong total_compilation_ticks() {
   return _perf_total_compilation != NULL ? _perf_total_compilation->get_value() : 0;
 }
Beispiel #10
0
void PerfDriver::resetCounters() {
	for (PerfCounter * counter = mCounters; counter != NULL; counter = counter->getNext()) {
		counter->setEnabled(false);
	}
}