WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fieldsfor

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fieldsfor exported xentrace data.
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Dec 2006 16:29:10 +1100
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxxxxxxxx>, George Dunlap <gdunlap@xxxxxxxxxxxxx>
Delivery-date: Wed, 06 Dec 2006 21:29:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200612070243.59109.mark.williamson@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Mark Williamson <mark.williamson@xxxxxxxxxxxx>, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, George Dunlap <gdunlap@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxxxxxxxx>, ian.pratt@xxxxxxxxxxxx
References: <C19626E8.52B8%keir@xxxxxxxxxxxxx> <de76405a0612051205scc62a75hbcb1c38ec3524fe@xxxxxxxxxxxxxx> <8A87A9A84C201449A0C56B728ACF491E04EDD5@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <200612070243.59109.mark.williamson@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Thu, Dec 07, 2006 at 02:43:58AM +0000, Mark Williamson wrote:
> > The ultimate best way of doing it would be to have trace functions that
> > took a format string and a variable number of arguments.
> 
> Agreed.
> 
> > The actual 
> > trace record written in the buffer would just contain the record type
> > and the length of the record, followed by the variable data. The format
> > string would be written out in an a separate segment, enabling it to be
> > extracted and used by the trace post-process tool to pretty print the
> > records.
> 
> Cool.
> 
> It would be fairly trivial to declare a name for each "type" and allow 
> userspace to query the type name <-> type ID mapping.  This then removes all 
> responsibility for determining output formatting from userspace, and should 
> make everything neater.
> 
> Nice.  All we need is a coder - anyone interested?

I'll hack something together. to match /my/ understanding of the current
proposals.  We can go from there.

Briefly I think we're talking about using a variable length structure,
with tracepoints looking like a printf() style function.

so
--
        TRACE_4D(TRC_SCHED_SWITCH,
                 prev->domain->domain_id, prev->vcpu_id,
                 next->domain->domain_id, next->vcpu_id);
--
would become something like:
--
        trace(TRC_SCHED_SWITCH, "%d%d%d%d", 
              prev->domain->domain_id, prev->vcpu_id,
              next->domain->domain_id, next->vcpu_id);
--

Trace would store a lookup table for TRC_SCHED_SWITCH => "%d%d%d%d".
The data would get stored in a fashion similar to Mark's suggestion in
http://lists.xensource.com/archives/html/xen-devel/2006-12/msg00179.html

The xentrace tool would write the record and format specifier to disk,
in network byte order (until then data remains in native byte order).
There would fo course be implicit 64bit tsc and 32bit event-type
prefixed to each record.

xentrace_format will pretty print the datafile.

I like the idea of stepping away from printf codes and using explicit
size args (%8, %16, %32 and %64), does anyone disagree?

Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007      The Australian Linux Technical Conference!


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>