From a197ff12dd336a9945ad1164402980296f9c235c Mon Sep 17 00:00:00 2001 From: Yongqin Liu Date: Fri, 5 Dec 2014 13:45:02 +0800 Subject: bootchart: fix bootchart can not be triggered problem bootchart uses a file on the data partition to decide if it should collect data for bootchart, but the data partition will be mounted by the mount_all command in the "on fs" section, and it will be only added into the action queue when command "trigger fs" is executed, but that's after the bootchart_init action (late_init). This change makes bootchart_init a builtin command of init, and make it executed as the first command of "on post-fs" section which will be triggered after the "on fs" section. This change also refactors the bootchart code to all be in bootchart.cpp. Change-Id: Ia74aa34ca5b785f51fcffdd383075a549b2a99d9 Signed-off-by: Yongqin Liu --- init/bootchart.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'init/bootchart.h') diff --git a/init/bootchart.h b/init/bootchart.h index 9ba3c40c2..784295056 100644 --- a/init/bootchart.h +++ b/init/bootchart.h @@ -17,13 +17,8 @@ #ifndef _BOOTCHART_H #define _BOOTCHART_H -extern int bootchart_init(void); -extern int bootchart_step(void); -extern void bootchart_finish(void); -extern long long bootchart_gettime(void); - -#define BOOTCHART_POLLING_MS 200 /* polling period in ms */ -#define BOOTCHART_DEFAULT_TIME_SEC (2*60) /* default polling time in seconds */ -#define BOOTCHART_MAX_TIME_SEC (10*60) /* max polling time in seconds */ +int bootchart_init(); +void bootchart_sample(int* timeout); +void bootchart_finish(); #endif /* _BOOTCHART_H */ -- cgit v1.2.3