From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEhLX-0002tW-41 for qemu-devel@nongnu.org; Tue, 26 Apr 2011 08:26:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEhLL-000376-Gv for qemu-devel@nongnu.org; Tue, 26 Apr 2011 08:26:27 -0400 Received: from mtagate5.uk.ibm.com ([194.196.100.165]:42600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEhLL-00036P-7B for qemu-devel@nongnu.org; Tue, 26 Apr 2011 08:26:15 -0400 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate5.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p3QCQDro025595 for ; Tue, 26 Apr 2011 12:26:13 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 p3QCREND1601594 for ; Tue, 26 Apr 2011 13:27:16 +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 p3QCQAAE031746 for ; Tue, 26 Apr 2011 06:26:10 -0600 From: Stefan Hajnoczi Date: Tue, 26 Apr 2011 13:26:00 +0100 Message-Id: <1303820763-6720-4-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1303820763-6720-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1303820763-6720-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 3/6] docs: Trace events must not expect pointer dereferencing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Stefan Hajnoczi 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