From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59741) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAgoo-00085u-Qu for qemu-devel@nongnu.org; Fri, 15 Apr 2011 07:04:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAgon-0005rQ-PD for qemu-devel@nongnu.org; Fri, 15 Apr 2011 07:04:06 -0400 Received: from mtagate6.uk.ibm.com ([194.196.100.166]:36913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAgon-0005r7-He for qemu-devel@nongnu.org; Fri, 15 Apr 2011 07:04:05 -0400 Received: from d06nrmr1507.portsmouth.uk.ibm.com (d06nrmr1507.portsmouth.uk.ibm.com [9.149.38.233]) by mtagate6.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p3FB425R004073 for ; Fri, 15 Apr 2011 11:04:02 GMT Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by d06nrmr1507.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p3FB4rqX1208464 for ; Fri, 15 Apr 2011 12:04:53 +0100 Received: from d06av01.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p3FB41sd032510 for ; Fri, 15 Apr 2011 05:04:01 -0600 From: Stefan Hajnoczi Date: Fri, 15 Apr 2011 12:03:53 +0100 Message-Id: <1302865433-5309-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1302865433-5309-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1302865433-5309-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] docs: Trace events must not expect pointer dereferencing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Fabien Chouteau Signed-off-by: Stefan Hajnoczi --- docs/tracing.txt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/docs/tracing.txt b/docs/tracing.txt index f15069c..905a083 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -69,6 +69,11 @@ 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. -- 1.7.4.1