Diff of /libperf_events/operf_stats.h [d3a2c6] .. [b2c445]  Maximize  Restore

  Switch to side-by-side view

--- a/libperf_events/operf_stats.h
+++ b/libperf_events/operf_stats.h
@@ -11,6 +11,7 @@
  */
 
 #include <string>
+#include "operf_counter.h"
 
 #ifndef OPERF_STATS_H
 #define OPERF_STATS_H
@@ -39,5 +40,35 @@
 #define OPERF_WARN_LOST_SAMPLES_THRESHOLD   0.0001
 
 void operf_print_stats(std::string sampledir, char * starttime, bool throttled);
+void warn_if_kern_multiplexing(std::string const & session_samples_dir);
+void warn_if_kern_throttling(std::string const & session_samples_dir);
 
+class operf_stats_recorder {
+
+public:
+	static std::string create_stats_dir(std::string const & sample_dir);
+	/* The checking and writing of the throttled and multiplexing
+	 * stats is done by two different processes: 1) 'operf_record_pid'
+	 * process, which retrieves sample data from the kernel and
+	 * writes it either to a pipe or (with --lazy-conversion) to a file;
+	 * and 2) the 'sample data conversion' process, which reads the data
+	 * written by operf_record_pid.  The operf_record_pid process checks
+	 * for multiplexing and writes the multiplexed event names. The
+	 * sample data conversion process processes the data read from the pipe
+	 * or file and checks for throttling of the event by the kernel and
+	 * prints the throttled data.  The check_for_multiplexing() function
+	 * writes its data to a temporary directory.  When the sample data
+	 * conversion process has setup the directory "current" to store all
+	 * of the data, the multiplexed data is moved from its temporary
+	 * location to the "current" directory.
+	 */
+	static void mv_multiplexed_data_dir(std::string const & session_dir,
+					    std::string const & sample_dir);
+	static void check_for_multiplexing(std::vector< std::vector<operf_counter> > const & perfCounters,
+					   int num_cpus, int system_wide,
+					   int evt);
+
+	static void write_throttled_event_files(std::vector< operf_event_t> const & events,
+						std::string const & current_sampledir);
+};
 #endif /* OPERF_STATS_H */

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks