Received: from eggs.gnu.org ([140.186.70.92]:45174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVMuq-0002aY-VN for qemu-devel@nongnu.org; Tue, 29 Nov 2011 07:36:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVMul-0004cY-AG for qemu-devel@nongnu.org; Tue, 29 Nov 2011 07:36:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVMul-0004cO-2B for qemu-devel@nongnu.org; Tue, 29 Nov 2011 07:35:59 -0500 From: Markus Armbruster References: <4ED497CC.5040607@linux.vnet.ibm.com> Date: Tue, 29 Nov 2011 13:35:50 +0100 In-Reply-To: (Stefan Hajnoczi's message of "Tue, 29 Nov 2011 11:47:41 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] RFC: Design Doc for a new trace format (to support variable number/size of args per event) simpletrace-v2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Harsh Bora , qemu-devel@nongnu.org, "Aneesh Kumar K. V" Stefan Hajnoczi writes: [...] > So forget I said "self-describing" :). I think the only changes from > the v1 format we need are: > > 1. New magic number to mark v2 format. > > 2. Trace records are no longer fixed-length, they include a size field: > > typedef struct { > uint32_t length; /* in bytes */ > uint32_t reserved; /* unused */ > uint64_t event; > uint64_t timestamp_ns; > uint8_t arguments[]; > } TraceRecord; > > 3. Strings are serialized like this: > > uint16_t length; > char chars[length]; 16 bit length? Sure you want that? > These changes enable: > > 1. Variable number of trace event arguments. > > 2. Variable-length strings. Byte strings, i.e. zero bytes not special.