summaryrefslogtreecommitdiffstats
path: root/tools/virtio/virtio-trace/Makefile
diff options
context:
space:
mode:
authorYoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>2012-08-09 21:31:30 +0900
committerRusty Russell <rusty@rustcorp.com.au>2012-09-28 15:05:13 +0930
commit108fc82596e3b66b819df9d28c1ebbc9ab5de14c (patch)
tree66c051fac35849764818a47aa278d073af72b182 /tools/virtio/virtio-trace/Makefile
parent8ca84a50e5b39487ea1de8809d0ee1c8474f6a5c (diff)
downloadop-kernel-dev-108fc82596e3b66b819df9d28c1ebbc9ab5de14c.zip
op-kernel-dev-108fc82596e3b66b819df9d28c1ebbc9ab5de14c.tar.gz
tools: Add guest trace agent as a user tool
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>
Diffstat (limited to 'tools/virtio/virtio-trace/Makefile')
-rw-r--r--tools/virtio/virtio-trace/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/virtio/virtio-trace/Makefile b/tools/virtio/virtio-trace/Makefile
new file mode 100644
index 0000000..ef3adfc
--- /dev/null
+++ b/tools/virtio/virtio-trace/Makefile
@@ -0,0 +1,14 @@
+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
OpenPOWER on IntegriCloud