tools: acrn-crashlog: main thread of acrn-crashlog/acrnprobe

This patch implements the main thread of acrnprobe.

As a log collection mechanism to record critical events on the
platform, acrnprobe provides the following features:
1. detect event.
2. analyze event and determine the event type.
3. collect information for the detected events.
4. archive these information as logs, and generate records.

Signed-off-by: Liu Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
Liu Xinwu
2018-05-09 16:56:15 +08:00
committed by lijinxia
parent 6e656dfd3c
commit e86da09974
14 changed files with 268 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
BASEDIR := $(shell pwd)
LIBS = -lpthread -lxml2 -lcrypto -lrt -lsystemd -ltelemetry
INCLUDE += -I $(BASEDIR)/include
CFLAGS += $(INCLUDE)
CFLAGS += -g -O0 -std=gnu11
CFLAGS += -ffunction-sections -fdata-sections
@@ -14,7 +15,17 @@ all: check_dirs $(TARGET)
$(BUILDDIR)/acrnprobe/obj/%.o:%.c
$(CC) -c $(CFLAGS) $< -o $@
$(BUILDDIR)/acrnprobe/bin/acrnprobe: $(BUILDDIR)/acrnprobe/obj/main.o
$(BUILDDIR)/acrnprobe/bin/acrnprobe: $(BUILDDIR)/acrnprobe/obj/main.o \
$(BUILDDIR)/common/obj/log_sys.o \
$(BUILDDIR)/common/obj/cmdutils.o \
$(BUILDDIR)/common/obj/fsutils.o \
$(BUILDDIR)/common/obj/strutils.o \
$(BUILDDIR)/acrnprobe/obj/load_conf.o \
$(BUILDDIR)/acrnprobe/obj/channels.o \
$(BUILDDIR)/acrnprobe/obj/event_queue.o \
$(BUILDDIR)/acrnprobe/obj/event_handler.o \
$(BUILDDIR)/acrnprobe/obj/crash_reclassify.o \
$(BUILDDIR)/acrnprobe/obj/sender.o
$(CC) -o $@ $^ $(LDFLAGS)
clean: