tools: acrn-crashlog: new file to count all events happened in system

Since "history_event" file records limited events (5000 lines by default),
a new file named "all events" to count all kind of events.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
This commit is contained in:
Liu, Xinwu
2019-02-21 10:21:19 +08:00
committed by Eddie Dong
parent 73e5323261
commit e299553896
2 changed files with 143 additions and 4 deletions

View File

@@ -283,9 +283,9 @@ int str_split_ere(const char *str, size_t slen,
va_start(v, flen);
/* supports %[regex..] and %*[regex..] */
exp_s = fmt;
while (str_off < flen && *exp_s) {
exp_e = exp_end(fmt, flen, exp_s);
exp_s = _fmt;
while (str_off < slen && *exp_s) {
exp_e = exp_end(_fmt, flen, exp_s);
if (!exp_e) {
LOGE("invalid exp - failed to find the end of exp\n");
goto out;
@@ -304,7 +304,8 @@ int str_split_ere(const char *str, size_t slen,
sreqsize = va_arg(v, size_t);
}
if (reg_match(str + str_off, reg, sreq, sreqsize, &off) == -1) {
if (reg_match(_str + str_off, reg, sreq, sreqsize,
&off) == -1) {
LOGE("failed to match reg\n");
free(reg);
goto out;