All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Breeds <tony@bakeyournoodle.com>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com, Keir Fraser <keir@xensource.com>,
	George Dunlap <gdunlap@xensource.com>
Subject: Re: [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fieldsfor exported xentrace data.
Date: Thu, 7 Dec 2006 16:29:10 +1100	[thread overview]
Message-ID: <20061207052910.GF27551@bakeyournoodle.com> (raw)
In-Reply-To: <200612070243.59109.mark.williamson@cl.cam.ac.uk>

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!

  reply	other threads:[~2006-12-07  5:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30  5:59 [RFC][PATCH] 0/3] [V2] Update xentrace to be compatable with PPC Tony Breeds
2006-11-30  5:59 ` [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fields for exported xentrace data Tony Breeds
2006-11-30 13:02   ` Mark Williamson
2006-11-30 16:58   ` George Dunlap 
2006-11-30 17:03     ` Keir Fraser
2006-12-01  2:29       ` Mark Williamson
2006-12-01 11:32         ` Jimi Xenidis
2006-12-01 17:54         ` George Dunlap 
2006-12-01 18:37           ` Keir Fraser
2006-12-05 16:54             ` Mark Williamson
2006-12-05 20:05               ` George Dunlap
2006-12-06 16:10                 ` [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fieldsfor " Ian Pratt
2006-12-07  2:43                   ` Mark Williamson
2006-12-07  5:29                     ` Tony Breeds [this message]
2006-12-07 10:32                   ` Keir Fraser
2006-12-07 14:21                     ` Ian Pratt
2006-12-07 18:25                       ` George Dunlap
2006-12-08 10:52                         ` [RFC][PATCH] 1/3] [XEN] Use explicit bit sizedfieldsfor " Ian Pratt
2006-12-08 20:28                           ` George Dunlap 
2006-12-04 18:20           ` [RFC][PATCH] 1/3] [XEN] Use explicit bit sized fields for " Mark Williamson
2006-12-12 17:29         ` LTTng Xen port Mathieu Desnoyers
2006-12-12 21:20           ` Ian Pratt
2006-12-12 22:14             ` Mathieu Desnoyers
2006-12-13  2:25               ` Tony Breeds
2006-12-15  5:02                 ` Mark Williamson
2006-12-28  3:08           ` M.A. Williamson
2007-03-09  1:20           ` LTTng Xen port : finally in a repository near you Mathieu Desnoyers
2007-06-25  8:43             ` INAKOSHI Hiroya
2007-06-27  0:37               ` Mark Williamson
2007-06-27 16:22                 ` Mathieu Desnoyers
2007-06-27 16:25                   ` Keir Fraser
2007-06-27 16:14               ` Mathieu Desnoyers
2007-06-28  5:07                 ` INAKOSHI Hiroya
2007-06-28  6:58                   ` Mathieu Desnoyers
2007-06-28 12:32                     ` INAKOSHI Hiroya
2007-06-28 15:08                       ` Mathieu Desnoyers
2007-06-29  0:19                         ` INAKOSHI Hiroya
2006-11-30  5:59 ` [RFC][PATCH] 2/3] [TOOLS][XENTRACE] Update tools to write data to disk in a known endian'ness Tony Breeds
2006-11-30 13:12   ` Mark Williamson
2006-12-01  5:23     ` Tony Breeds
2006-12-04 18:22       ` Mark Williamson
2006-11-30 16:27   ` George Dunlap 
2006-12-01  5:43     ` Tony Breeds
2006-11-30  5:59 ` [RFC][PATCH] 3/3] [TOOLS][XENTRACE] Various tidyups to xentrace tools Tony Breeds
2006-11-30 12:57   ` Mark Williamson
2006-12-01  5:39     ` Tony Breeds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061207052910.GF27551@bakeyournoodle.com \
    --to=tony@bakeyournoodle.com \
    --cc=gdunlap@xensource.com \
    --cc=keir@xensource.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.