From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6KAZ-0004AX-4X for qemu-devel@nongnu.org; Wed, 21 Sep 2011 06:36:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R6KAX-0008LU-Uh for qemu-devel@nongnu.org; Wed, 21 Sep 2011 06:36:47 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:34666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R6KAX-0008LF-Nc for qemu-devel@nongnu.org; Wed, 21 Sep 2011 06:36:45 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p8LAai1s024187 for ; Wed, 21 Sep 2011 10:36:44 GMT Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8LAai322289878 for ; Wed, 21 Sep 2011 11:36:44 +0100 Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8LAagib003074 for ; Wed, 21 Sep 2011 04:36:43 -0600 From: Stefan Hajnoczi Date: Wed, 21 Sep 2011 11:36:33 +0100 Message-Id: <1316601397-19287-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1316601397-19287-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1316601397-19287-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/5] 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: Anthony Liguori , 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 d0171aa..2c33a62 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. @@ -182,6 +177,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