tools:acrn-crashlog: check the folder size by calculating the increment

This patch refines the process of log space check.
Check a folder's size need to traverse all nodes of files and subdirs,
in the case of extreme memory strain, accessing these log file nodes
frequently will increase the IO pressure on the eMMC.
Previously, all log files will be accessed and counted in each space
check, this patch refines it by only calculating the increment of new logs.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
This commit is contained in:
Liu, Xinwu
2019-04-19 14:12:13 +08:00
committed by ACRN System Integration
parent 38cd3f74bd
commit ae11bd403d
3 changed files with 31 additions and 9 deletions

View File

@@ -137,6 +137,7 @@ struct sender_t {
void (*send)(struct event_t *);
struct vmrecord_t vmrecord;
size_t outdir_blocks_size;
int sw_updated; /* each sender has their own record */
};