From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Subject: Re: [Qemu-devel] [RFC] host and guest kernel trace merging Date: Fri, 25 Mar 2016 10:22:03 +0800 Message-ID: <20160325022203.GG28183@pxdev.xzpeter.org> References: <20160303143501.0edf21a2@redhat.com> <20160304111933.GB626@stefanha-x1.localdomain> <20160324084242.GD28183@pxdev.xzpeter.org> <20160324101317.GB21069@stefanha-x1.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Stefan Hajnoczi , Luiz Capitulino , kvm@vger.kernel.org, yoshihiro.yunomae.ez@hitachi.com, mtosatti@redhat.com, qemu-devel@nongnu.org, rostedt@goodmis.org, linux-trace-users@vger.kernel.org, pbonzini@redhat.com To: Stefan Hajnoczi Return-path: Content-Disposition: inline In-Reply-To: <20160324101317.GB21069@stefanha-x1.localdomain> Sender: linux-trace-users-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Thu, Mar 24, 2016 at 10:13:17AM +0000, Stefan Hajnoczi wrote: > There are probably race conditions if the tsc offset is queried > independently from the trace collection. For example, imagine the host > is suspend right when tracing begins. I think the TSC could be adjusted > when the host wakes up again. Right... So maybe we should never allow tsc-offset change (e.g. suspend) happen during host-guest tracing? It seems more like a question about "whether we can do a merge", rather than "read a correct offset"... If it changes, we cannot do the merge any more (only if we record the offset for each guest entry)... > > Ideally the TSC information would be part of the trace data so that > there are no race conditions when interpeting time stamps. Agree. We should keep the tsc-offset in the trace data. Thanks. -- peterx