From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdKI-0003Wu-5u for qemu-devel@nongnu.org; Wed, 30 Nov 2011 01:07:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RVdKH-0001eL-9U for qemu-devel@nongnu.org; Wed, 30 Nov 2011 01:07:26 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:45855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RVdKG-0001dv-JA for qemu-devel@nongnu.org; Wed, 30 Nov 2011 01:07:25 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 30 Nov 2011 06:04:56 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAU63b413084432 for ; Wed, 30 Nov 2011 17:03:37 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAU672nl006254 for ; Wed, 30 Nov 2011 17:07:03 +1100 Message-ID: <4ED5C806.9050109@linux.vnet.ibm.com> Date: Wed, 30 Nov 2011 11:37:02 +0530 From: Harsh Bora MIME-Version: 1.0 References: <4ED497CC.5040607@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: "Aneesh Kumar K. V" , Markus Armbruster , qemu-devel@nongnu.org On 11/29/2011 06:26 PM, Stefan Hajnoczi wrote: > On Tue, Nov 29, 2011 at 12:35 PM, Markus Armbruster wrote: >> 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? > > You're right, it's more future-proof to use a larger type. Since I > said uint32_t length in TraceRecord, uint32_t here would work well. Makes sense to store size info only for strings as long as we rely on trace-events file to identify other meta-data about trace-events. thanks, Harsh > > Stefan >