mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
trace: Add LTTng Userspace Tracer backend
This patch adds LTTng Userspace Tracer (UST) backend support. The UST system requires no kernel support but libust and liburcu must be installed. $ ./configure --trace-backend ust $ make Start the UST daemon: $ ustd & List available tracepoints and enable some: $ ustctl --list-markers $(pgrep qemu) [...] {PID: 5458, channel/marker: ust/paio_submit, state: 0, fmt: "acb %p opaque %p sector_num %lu nb_sectors %lu type %lu" 0x4b32ba} $ ustctl --enable-marker "ust/paio_submit" $(pgrep qemu) Run the trace: $ ustctl --create-trace $(pgrep qemu) $ ustctl --start-trace $(pgrep qemu) [...] $ ustctl --stop-trace $(pgrep qemu) $ ustctl --destroy-trace $(pgrep qemu) Trace results can be viewed using lttv-gui. More information about UST: http://lttng.org/ust Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Check for LTTng Userspace Tracer headers When using the 'ust' backend, check if the relevant headers are available at host. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
ab6540d55e
commit
7e24e92a06
2 changed files with 102 additions and 3 deletions
20
configure
vendored
20
configure
vendored
|
@ -903,7 +903,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 simple"
|
||||
echo " --trace-backend=B Trace backend nop simple ust"
|
||||
echo " --trace-file=NAME Full PATH,NAME of file to store traces"
|
||||
echo " Default:trace-<pid>"
|
||||
echo ""
|
||||
|
@ -2080,6 +2080,24 @@ if test "$?" -ne 0 ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# For 'ust' backend, test if ust headers are present
|
||||
if test "$trace_backend" = "ust"; then
|
||||
cat > $TMPC << EOF
|
||||
#include <ust/tracepoint.h>
|
||||
#include <ust/marker.h>
|
||||
int main(void) { return 0; }
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
LIBS="-lust $LIBS"
|
||||
else
|
||||
echo
|
||||
echo "Error: Trace backend 'ust' missing libust header files"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
##########################################
|
||||
# End of CC checks
|
||||
# After here, no more $cc or $ld runs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue