OSDN Git Service

Merge "simpleperf: add warning for `--call-graph fp` option on arm."
[android-x86/system-extras.git] / perfprofd / perfprofdcore.h
index f3b1717..2607c48 100644 (file)
 ** limitations under the License.
 */
 
+#ifndef SYSTEM_EXTRAS_PERFPROFD_PERFPROFDCORE_H_
+#define SYSTEM_EXTRAS_PERFPROFD_PERFPROFDCORE_H_
+
+class ConfigReader;
+
 // Semaphore file that indicates that the user is opting in
 #define SEMAPHORE_FILENAME "perf_profile_collection_enabled.txt"
 
@@ -28,9 +33,6 @@
 // by perfprofd within the destination directory; consumed by GmsCore.
 #define PRODUCED_FILENAME "perfprofd_produced.txt"
 
-// Maximum number of encoded perf.data files stored in destination dir
-#define MAX_UNPROCESSED_FILE 10
-
 // Main routine for perfprofd daemon
 extern int perfprofd_main(int argc, char **argv);
 
@@ -66,4 +68,16 @@ typedef enum {
 // was successful (either OK_PROFILE_COLLECTION or an error of some sort).
 //
 PROFILE_RESULT encode_to_proto(const std::string &data_file_path,
-                               const char *encoded_file_path);
+                               const char *encoded_file_path,
+                               const ConfigReader &config,
+                               unsigned cpu_utilization);
+
+//
+// Exposed for unit testing
+//
+extern unsigned collect_cpu_utilization();
+extern bool get_booting();
+extern bool get_charging();
+extern bool get_camera_active();
+
+#endif