tools:acrn-crashlog: separate the detection and collection of vm events

Push the recorded vm events to event_queue, and let senders do the
collecting job in the event_handler thread.

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-18 16:44:16 +08:00
committed by ACRN System Integration
parent 84cf7156ae
commit fa1216325b
6 changed files with 173 additions and 162 deletions

View File

@@ -11,7 +11,12 @@ extern char *loop_dev;
#define VMEVT_HANDLED 0
#define VMEVT_DEFER -1
#define VMEVT_MISSLOG -2
struct vm_event_t {
char *vm_msg;
size_t vm_msg_len;
const struct vm_t *vm;
};
#define ANDROID_LOGS_DIR "/logs/"
#define IGN_SPACES "%*[[[:space:]]*]"

View File

@@ -48,7 +48,7 @@ struct vm_t {
ext2_filsys datafs;
unsigned long history_size[SENDER_MAX];
char *history_data;
char last_synced_line_key[SENDER_MAX][SHORT_KEY_LENGTH + 1];
char last_evt_detected[SENDER_MAX][SHORT_KEY_LENGTH + 1];
};
struct log_t {