From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace"
Date: Fri, 5 Aug 2016 18:59:34 +0200 [thread overview]
Message-ID: <147041637432.2523.7105228834091669652.stgit@fimbulvetr.bsc.es> (raw)
In-Reply-To: <147041636348.2523.2954972609232949598.stgit@fimbulvetr.bsc.es>
Generates the "guest_hypertrace" event with a user-configurable number
of arguments.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
Makefile.objs | 2 ++
configure | 36 ++++++++++++++++++++++++++++++++++++
trace/Makefile.objs | 2 +-
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/Makefile.objs b/Makefile.objs
index 7f1f0a3..1c1b03c 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -158,3 +158,5 @@ trace-events-y += target-s390x/trace-events
trace-events-y += target-ppc/trace-events
trace-events-y += qom/trace-events
trace-events-y += linux-user/trace-events
+
+trace-events-gen-y = hypertrace/trace-events
diff --git a/configure b/configure
index 5ada56d..e80fde4 100755
--- a/configure
+++ b/configure
@@ -273,6 +273,7 @@ pie=""
qom_cast_debug="yes"
trace_backends="log"
trace_file="trace"
+hypertrace="disabled"
spice=""
rbd=""
smartcard=""
@@ -782,6 +783,8 @@ for opt do
;;
--with-trace-file=*) trace_file="$optarg"
;;
+ --with-hypertrace-args=*) hypertrace="$optarg"
+ ;;
--enable-gprof) gprof="yes"
;;
--enable-gcov) gcov="yes"
@@ -1300,6 +1303,8 @@ Advanced options (experts only):
Available backends: $($python $source_path/scripts/tracetool.py --list-backends)
--with-trace-file=NAME Full PATH,NAME of file to store traces
Default:trace-<pid>
+ --with-hypertrace-args=NUMBER
+ number of hypertrace arguments (default: disabled)
--disable-slirp disable SLIRP userspace network connectivity
--enable-tcg-interpreter enable TCG with bytecode interpreter (TCI)
--oss-lib path to OSS library
@@ -4197,6 +4202,14 @@ if test "$?" -ne 0 ; then
fi
##########################################
+# check hypertrace arguments
+case "$hypertrace" in
+ disabled) ;;
+ ''|*[!0-9]*) error_exit "invalid number of hypertrace arguments" ;;
+ *) ;;
+esac
+
+##########################################
# For 'ust' backend, test if ust headers are present
if have_backend "ust"; then
cat > $TMPC << EOF
@@ -4862,6 +4875,7 @@ echo "Trace backends $trace_backends"
if have_backend "simple"; then
echo "Trace output file $trace_file-<pid>"
fi
+echo "Hypertrace arguments $hypertrace"
echo "spice support $spice $(echo_version $spice $spice_protocol_version/$spice_server_version)"
echo "rbd support $rbd"
echo "xfsctl support $xfs"
@@ -5490,6 +5504,28 @@ else
fi
QEMU_INCLUDES="-I\$(SRC_PATH)/tcg $QEMU_INCLUDES"
+# hypertrace
+hyperargs=$hypertrace
+if test $hypertrace = "disabled"; then
+ hyperargs=0
+fi
+echo "CONFIG_HYPERTRACE_ARGS=$hyperargs" >> $config_host_mak
+hypertrace_events=hypertrace/trace-events
+mkdir -p $(dirname $hypertrace_events)
+echo "# See docs/trace-events.txt for syntax documentation." >$hypertrace_events
+echo -n 'vcpu guest_hypertrace(' >>$hypertrace_events
+for i in `seq $hypertrace`; do
+ if test $i != 1; then
+ echo -n ", " >>$hypertrace_events
+ fi
+ echo -n "uint64_t arg$i" >>$hypertrace_events
+done
+echo -n ') ' >>$hypertrace_events
+for i in `seq $hypertrace`; do
+ echo -n "\" arg$i=0x%016\"PRIx64" >>$hypertrace_events
+done
+echo >>$hypertrace_events
+
echo "TOOLS=$tools" >> $config_host_mak
echo "ROMS=$roms" >> $config_host_mak
echo "MAKE=$make" >> $config_host_mak
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 4d91b3b..b71ec54 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -8,7 +8,7 @@
tracetool-y = $(SRC_PATH)/scripts/tracetool.py
tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py")
-$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%)
+$(BUILD_DIR)/trace-events-all: $(trace-events-y:%=$(SRC_PATH)/%) $(trace-events-gen-y:%=$(BUILD_DIR)/%)
$(call quiet-command,cat $^ > $@)
######################################################################
next prev parent reply other threads:[~2016-08-05 16:59 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 16:59 [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 1/6] hypertrace: Add documentation Lluís Vilanova
2016-08-05 17:17 ` Eric Blake
2016-08-08 13:02 ` Lluís Vilanova
2016-08-05 16:59 ` Lluís Vilanova [this message]
2016-08-18 9:59 ` [Qemu-devel] [PATCH 2/6] hypertrace: Add tracing event "guest_hypertrace" Stefan Hajnoczi
2016-08-18 10:32 ` Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 3/6] hypertrace: [*-user] Add QEMU-side proxy to "guest_hypertrace" event Lluís Vilanova
2016-08-05 17:23 ` Eric Blake
2016-08-08 13:08 ` Lluís Vilanova
2016-08-18 10:17 ` Stefan Hajnoczi
2016-08-21 12:15 ` Lluís Vilanova
2016-08-23 15:52 ` Stefan Hajnoczi
2016-08-05 16:59 ` [Qemu-devel] [PATCH 4/6] hypertrace: [softmmu] " Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 5/6] hypertrace: Add guest-side user-level library Lluís Vilanova
2016-08-05 16:59 ` [Qemu-devel] [PATCH 6/6] hypertrace: Add guest-side Linux module Lluís Vilanova
2016-08-18 9:47 ` [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel Stefan Hajnoczi
2016-08-18 9:47 ` Stefan Hajnoczi
2016-08-18 10:22 ` [Qemu-devel] " Lluís Vilanova
2016-08-18 13:53 ` Stefan Hajnoczi
2016-08-18 14:21 ` Luiz Capitulino
2016-08-21 12:17 ` Lluís Vilanova
2016-08-21 12:17 ` Lluís Vilanova
2016-08-18 14:21 ` Luiz Capitulino
2016-08-18 13:53 ` Stefan Hajnoczi
2016-08-18 10:22 ` Lluís Vilanova
2016-08-18 10:54 ` Stefan Hajnoczi
2016-08-18 10:54 ` Stefan Hajnoczi
2016-08-18 13:37 ` [Qemu-devel] " Luiz Capitulino
2016-08-19 4:45 ` Masami Hiramatsu
2016-08-19 4:45 ` Masami Hiramatsu
2016-08-18 13:37 ` [Qemu-devel] " Luiz Capitulino
2016-08-18 16:19 ` Steven Rostedt
2016-08-19 10:02 ` Stefan Hajnoczi
2016-08-19 13:30 ` Steven Rostedt
2016-08-19 13:30 ` Steven Rostedt
2016-08-19 10:02 ` Stefan Hajnoczi
2016-08-18 16:19 ` Steven Rostedt
2016-08-21 12:32 ` Lluís Vilanova
2016-08-23 15:54 ` Stefan Hajnoczi
2016-08-23 15:54 ` Stefan Hajnoczi
2016-08-24 10:25 ` Lluís Vilanova
2016-08-29 13:45 ` Stefan Hajnoczi
2016-08-29 13:45 ` Stefan Hajnoczi
2016-08-29 18:46 ` [Qemu-devel] " Lluís Vilanova
2016-08-29 18:46 ` Lluís Vilanova
2016-08-31 16:35 ` Stefan Hajnoczi
2016-08-31 16:35 ` Stefan Hajnoczi
2016-09-05 14:37 ` Lluís Vilanova
2016-09-05 14:37 ` Lluís Vilanova
2016-09-05 19:20 ` Masami Hiramatsu
2016-09-05 19:20 ` Masami Hiramatsu
2016-09-06 12:59 ` [Qemu-devel] " Lluís Vilanova
2016-09-06 12:59 ` Lluís Vilanova
2016-09-13 13:52 ` Stefan Hajnoczi
2016-09-13 13:52 ` Stefan Hajnoczi
2016-09-13 16:50 ` [Qemu-devel] " Lluís Vilanova
2016-09-13 16:50 ` Lluís Vilanova
2016-09-05 14:59 ` Daniel P. Berrange
2016-09-05 14:59 ` Daniel P. Berrange
2016-09-05 18:29 ` [Qemu-devel] " Lluís Vilanova
2016-09-05 18:59 ` Daniel P. Berrange
2016-09-06 8:54 ` Lluís Vilanova
2016-09-06 8:54 ` Lluís Vilanova
2016-09-05 18:59 ` Daniel P. Berrange
2016-09-05 18:29 ` Lluís Vilanova
2016-08-24 10:25 ` Lluís Vilanova
2016-08-21 12:32 ` Lluís Vilanova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=147041637432.2523.7105228834091669652.stgit@fimbulvetr.bsc.es \
--to=vilanova@ac.upc.edu \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.