Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /libperf_events/operf_counter.cpp [d3a2c6] .. [b2c445] Maximize Restore

  Switch to side-by-side view

--- a/libperf_events/operf_counter.cpp
+++ b/libperf_events/operf_counter.cpp
@@ -180,7 +180,8 @@
 	attr.exclude_idle = 0;
 	attr.exclude_kernel = evt.no_kernel;
 	attr.exclude_hv = evt.no_hv;
-	attr.read_format = PERF_FORMAT_ID;
+	attr.read_format = PERF_FORMAT_ID | PERF_FORMAT_TOTAL_TIME_RUNNING |
+		PERF_FORMAT_TOTAL_TIME_ENABLED;
 	event_name = evt.name;
 	fd = id = -1;
 }
@@ -193,6 +194,8 @@
 {
 	struct {
 		u64 count;
+		u64 time_enabled;
+		u64 time_running;
 		u64 id;
 	} read_data;
 
@@ -590,6 +593,13 @@
 			cverb << vrecord << "operf_record::recordPerfData received signal to quit." << endl;
 		}
 	}
+
+	for (unsigned int evt = 0; evt < evts.size(); evt++)
+               operf_stats_recorder::check_for_multiplexing(perfCounters,
+							    num_cpus,
+							    system_wide,
+							    evt);
+
 	cverb << vdebug << "operf recording finished." << endl;
 }