From patchwork Fri Apr 15 11:03:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 91352 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A42A0B6FD4 for ; Fri, 15 Apr 2011 21:04:25 +1000 (EST) Received: from localhost ([::1]:34285 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAgp4-0008AE-SD for incoming@patchwork.ozlabs.org; Fri, 15 Apr 2011 07:04:22 -0400 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 Received: from stefanha-thinkpad.manchester-maybrook.uk.ibm.com (dyn-9-174-219-27.manchester-maybrook.uk.ibm.com [9.174.219.27]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p3FB3xdf032010; Fri, 15 Apr 2011 05:04:01 -0600 From: Stefan Hajnoczi To: Date: Fri, 15 Apr 2011 12:03:53 +0100 Message-Id: <1302865433-5309-2-git-send-email-stefanha@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 194.196.100.166 Cc: Stefan Hajnoczi , Fabien Chouteau Subject: [Qemu-devel] [PATCH 2/2] docs: Trace events must not expect pointer dereferencing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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.