summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2010-05-22 17:52:39 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-09-09 16:22:44 -0500
commit94a420b170b3e997a185a4148accc87bdcd18156 (patch)
treea0237cc71a1b12f65ab477c17a1059040f50ece2 /configure
parentef9d48da598691ca97bb3588f8bf625717f65418 (diff)
downloadqemu-94a420b170b3e997a185a4148accc87bdcd18156.tar.gz
trace: Add trace-events file for declaring trace events
This patch introduces the trace-events file where trace events can be declared like so: qemu_malloc(size_t size) "size %zu" qemu_free(void *ptr) "ptr %p" These trace event declarations are processed by a new tool called tracetool to generate code for the trace events. Trace event declarations are independent of the backend tracing system (LTTng User Space Tracing, ftrace markers, DTrace). The default "nop" backend generates empty trace event functions. Therefore trace events are disabled by default. The trace-events file serves two purposes: 1. Adding trace events is easy. It is not necessary to understand the details of a backend tracing system. The trace-events file is a single location where trace events can be declared without code duplication. 2. QEMU is not tightly coupled to one particular backend tracing system. In order to support tracing across QEMU host platforms and to anticipate new backend tracing systems that are currently maturing, it is important to be flexible and not tied to one system. This commit includes fixes from Prerna Saxena <prerna@linux.vnet.ibm.com> and Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index 146dac02a7..38613c350d 100755
--- a/configure
+++ b/configure
@@ -317,6 +317,7 @@ pkgversion=""
check_utests="no"
user_pie="no"
zero_malloc=""
+trace_backend="nop"
# OS specific
if check_define __linux__ ; then
@@ -519,6 +520,8 @@ for opt do
;;
--target-list=*) target_list="$optarg"
;;
+ --trace-backend=*) trace_backend="$optarg"
+ ;;
--enable-gprof) gprof="yes"
;;
--static)
@@ -897,6 +900,7 @@ echo " --enable-docs enable documentation build"
echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
echo " --enable-vhost-net enable vhost-net acceleration support"
+echo " --trace-backend=B Trace backend nop"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
@@ -2059,6 +2063,18 @@ if compile_prog "" "" ; then
fdatasync=yes
fi
+##########################################
+# check if trace backend exists
+
+sh "$source_path/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
+if test "$?" -ne 0 ; then
+ echo
+ echo "Error: invalid trace backend"
+ echo "Please choose a supported trace backend."
+ echo
+ exit 1
+fi
+
# End of CC checks
# After here, no more $cc or $ld runs
@@ -2189,6 +2205,7 @@ echo "preadv support $preadv"
echo "fdatasync $fdatasync"
echo "uuid support $uuid"
echo "vhost-net support $vhost_net"
+echo "Trace backend $trace_backend"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -2450,6 +2467,7 @@ bsd)
;;
esac
+echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
echo "TOOLS=$tools" >> $config_host_mak
echo "ROMS=$roms" >> $config_host_mak
echo "MAKE=$make" >> $config_host_mak