From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/2] trace: allow trace events with string arguments
Date: Mon, 5 Sep 2011 16:37:27 +0100 [thread overview]
Message-ID: <1315237048-3498-1-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
String arguments are useful for producing human-readable traces without
post-processing (e.g. stderr backend). Although the simple backend
cannot handles strings all others can. Strings should be allowed and
the simple backend can be extended to support them.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
docs/tracing.txt | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/docs/tracing.txt b/docs/tracing.txt
index 4b27ab0..e130a61 100644
--- a/docs/tracing.txt
+++ b/docs/tracing.txt
@@ -70,11 +70,6 @@ Trace events should use types as follows:
cannot include all user-defined struct declarations and it is therefore
necessary to use void * for pointers to structs.
- Pointers (including char *) cannot be dereferenced easily (or at all) in
- some trace backends. If pointers are used, ensure they are meaningful by
- themselves and do not assume the data they point to will be traced. Do
- not pass in string arguments.
-
* For everything else, use primitive scalar types (char, int, long) with the
appropriate signedness.
@@ -185,6 +180,9 @@ source tree. It may not be as powerful as platform-specific or third-party
trace backends but it is portable. This is the recommended trace backend
unless you have specific needs for more advanced backends.
+The "simple" backend currently does not capture string arguments, it simply
+records the char* pointer value instead of the string that is pointed to.
+
==== Monitor commands ====
* info trace
--
1.7.5.4
next reply other threads:[~2011-09-05 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 15:37 Stefan Hajnoczi [this message]
2011-09-05 15:37 ` [Qemu-devel] [PATCH 2/2] MAINTAINERS: add tracing subsystem Stefan Hajnoczi
2011-09-05 19:45 ` [Qemu-devel] [PATCH 1/2] trace: allow trace events with string arguments Blue Swirl
2011-09-05 21:17 ` Jan Kiszka
2011-09-06 14:24 ` Stefan Hajnoczi
2011-09-07 19:21 ` Blue Swirl
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=1315237048-3498-1-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).