From: stefanha@redhat.com (Stefan Hajnoczi)
Subject: [lttng-dev] [Qemu-devel] [PATCH 0/6] hypertrace: Lightweight guest-to-QEMU trace channel
Date: Wed, 31 Aug 2016 12:35:47 -0400 [thread overview]
Message-ID: <20160831163547.GD18281@stefanha-x1.localdomain> (raw)
In-Reply-To: <87a8fvjtw5.fsf@fimbulvetr.bsc.es>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1876 bytes --]
On Mon, Aug 29, 2016 at 08:46:02PM +0200, Lluís Vilanova wrote:
> >> Also, I'm still not sure how to interact with QEMU's monitor interface from
> >> within the probe code (probes execute in kernel mode, including "guru mode"
> >> code).
>
> > When SystemTap is used the QEMU monitor interface does nothing.
>
> That's not what I've experienced. I was able to use a stap script to change the
> tracing state of events:
>
> #!/usr/bin/env stap
>
> %{
> #include </home/lluis/Projects/qemu-dbi-test/test.h>
> %}
>
> function event:long(cpu:long, addr:long, info:long)
> %{
> char *argv[4] = {"/bin/sh", "-c", "echo 'trace-event * off' | telnet localhost 1234", NULL};
> call_usermodehelper(argv[0], argv, NULL, UMH_WAIT_EXEC);
> STAP_RETURN(0);
> %}
>
> probe begin {
> printf("hello\n")
> }
> probe process("./install/vanilla/bin/qemu-system-i386").mark("guest_mem_before_exec")
> {
> printf("%x %d %d\n", $arg1, $arg2, $arg3)
> event($arg1, $arg2, $arg3)
> exit()
> }
>
> The only caveat is that you must pass the "-g" argument to stap.
>
> Also, for some reason the printf in the probe always prints zeros, no matter
> what the actual event receives (I've debugged QEMU down to the call to the
> auto-generated stap functions). Could this be an error in systemtap?
It's strange that arguments do not have valid values. Debugging the
stap functions is the next step if you want to figure out what happened.
I've never had this issue before so maybe something with Debian
SystemTap userspace probes is broken.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20160831/b8d7c90c/attachment.sig>
prev parent reply other threads:[~2016-08-31 16:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <147041636348.2523.2954972609232949598.stgit@fimbulvetr.bsc.es>
2016-08-18 9:47 ` Stefan Hajnoczi
2016-08-18 10:22 ` 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-18 10:54 ` Stefan Hajnoczi
2016-08-18 13:37 ` Luiz Capitulino
2016-08-19 4:45 ` Masami Hiramatsu
2016-08-18 16:19 ` Steven Rostedt
2016-08-19 10:02 ` Stefan Hajnoczi
2016-08-19 13:30 ` Steven Rostedt
2016-08-21 12:32 ` Lluís Vilanova
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 18:46 ` Lluís Vilanova
2016-08-31 16:35 ` Stefan Hajnoczi [this message]
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=20160831163547.GD18281@stefanha-x1.localdomain \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox