From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0bEw-0004qU-8s for qemu-devel@nongnu.org; Mon, 05 Sep 2011 11:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0bEv-0005Ff-8j for qemu-devel@nongnu.org; Mon, 05 Sep 2011 11:37:38 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:54253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0bEv-0005FO-0s for qemu-devel@nongnu.org; Mon, 05 Sep 2011 11:37:37 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p85FbYhr030428 for ; Mon, 5 Sep 2011 15:37:34 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p85FbYhB2515164 for ; Mon, 5 Sep 2011 16:37:34 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p85FbYPL007888 for ; Mon, 5 Sep 2011 09:37:34 -0600 From: Stefan Hajnoczi Date: Mon, 5 Sep 2011 16:37:27 +0100 Message-Id: <1315237048-3498-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/2] trace: allow trace events with string arguments List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi 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 --- 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