This patch adds a user tool, "trace agent" for sending trace data of a guest to a Host in low overhead. This agent has the following functions: - splice a page of ring-buffer to read_pipe without memory copying - splice the page from write_pipe to virtio-console without memory copying - write trace data to stdout by using -o option - controlled by start/stop orders from a Host Changes in v2: - Cleanup (change fprintf() to pr_err() and an include guard) Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
15 lines
238 B
Makefile
15 lines
238 B
Makefile
CC = gcc
|
|
CFLAGS = -O2 -Wall
|
|
LFLAG = -lpthread
|
|
|
|
all: trace-agent
|
|
|
|
.c.o:
|
|
$(CC) $(CFLAGS) $(LFLAG) -c $^ -o $@
|
|
|
|
trace-agent: trace-agent.o trace-agent-ctl.o trace-agent-rw.o
|
|
$(CC) $(CFLAGS) $(LFLAG) -o $@ $^
|
|
|
|
clean:
|
|
rm -f *.o trace-agent
|