From: Tony Breeds Subject: Re: LTTng Xen port Date: Wed, 13 Dec 2006 13:25:57 +1100 Message-ID: <20061213022557.GT27551@bakeyournoodle.com> References: <20061212172923.GA24883@Krystal> <8A87A9A84C201449A0C56B728ACF491E04EE80@liverpoolst.ad.cl.cam.ac.uk> <20061212221401.GA18277@Krystal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20061212221401.GA18277@Krystal> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Mathieu Desnoyers Cc: Jimi Xenidis , Ian Pratt , xen-devel@lists.xensource.com, Robert Wisniewski , michel.dagenais@polymtl.ca, Rob Gardner List-Id: xen-devel@lists.xenproject.org On Tue, Dec 12, 2006 at 05:14:02PM -0500, Mathieu Desnoyers wrote: > As from the current mercurial tree : > http://lxr.xensource.com/lxr/source/tools/xentrace/xentrace.c > > int monitor_tbufs(FILE *logfile) > 310 /* now, scan buffers for events */ > 311 while ( !interrupted ) > 312 { > 313 for ( i = 0; (i < num) && !interrupted; i++ ) > 314 { > 315 while ( meta[i]->cons != meta[i]->prod ) > 316 { > 317 rmb(); /* read prod, then read item. */ > 318 write_rec(i, data[i] + meta[i]->cons % size_in_recs, logfile); > 319 mb(); /* read item, then update cons. */ > 320 meta[i]->cons++; > 321 } > 322 } > 323 > 324 nanosleep(&opts.poll_sleep, NULL); > 325 } > > So it seems like the implementation must be hiding either in someone's head or > in his mercurial tree. :) I suspect that xenbaked uses it, http://lxr.xensource.com/lxr/source/tools/xenmon/xenbaked.c --- 262 int eventchn_init(void) 263 { 264 int rc; 265 266 // to revert to old way: 267 if (0) 268 return -1; 269 270 xce_handle = xc_evtchn_open(); 271 272 if (xce_handle < 0) 273 perror("Failed to open evtchn device"); 274 275 if ((rc = xc_evtchn_bind_virq(xce_handle, VIRQ_TBUF)) == -1) 276 perror("Failed to bind to domain exception virq port"); 277 virq_port = rc; 278 279 return xce_handle; 280 } --- With appropriate triggering, in xen/common/trace.c Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference!