From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Gardner Subject: Re: Hi,something about the xentrace tool Date: Tue, 13 Jun 2006 11:25:20 -0600 Message-ID: <448EF500.7070506@hp.com> References: <8061f8830606110617x1ebaf6bo17b61b854ceda6ce@mail.gmail.com> <20060612153032.GB1694@us.ibm.com> <8061f8830606131011w732d1501x6fb81c37e1239553@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <8061f8830606131011w732d1501x6fb81c37e1239553@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: rickey berkeley Cc: xen-tools@lists.xensource.com, ryanh@us.ibm.com, xen-devel@lists.xensource.com, xen-users@lists.xensource.com List-Id: xen-devel@lists.xenproject.org rickey berkeley wrote: > Based on trace source code(xen/common/trace.c),dom0 tracing the event > which are enabled. > > xen initialize tracing buffer for each cpu,trace buffer size (in > pages) in kenel space is defined by opt_tbuf_size. > The tracing buf use loop structure. > > I guess when the tracing data increase rapidly ,and xentrace tool in > user space does not take them immediately. > Some tracing data will lost.Maybe relayfs or something else can solve > this problem. > I added a basic flow control mechanism to the trace buffer system a few months ago. You can see an example of how to use it in tools/xenmon. The way it works is that as trace records are generated, a software interrupt is generated when the trace buffer gets filled to a certain point. The user space tools can use select() on an event channel to find out about these interrupts. See tools/xenmon/xenbaked.c for exact programming details. This code has not been copied into xentrace yet; Feel free to do so yourself if you think it's necessary. Rob