From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajHOD-0005nv-6b for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajHO8-0000qB-8J for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:22:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajHO8-0000q7-31 for qemu-devel@nongnu.org; Thu, 24 Mar 2016 22:22:12 -0400 Date: Fri, 25 Mar 2016 10:22:03 +0800 From: Peter Xu 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 Content-Disposition: inline In-Reply-To: <20160324101317.GB21069@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [RFC] host and guest kernel trace merging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kvm@vger.kernel.org, Stefan Hajnoczi , yoshihiro.yunomae.ez@hitachi.com, mtosatti@redhat.com, qemu-devel@nongnu.org, rostedt@goodmis.org, Luiz Capitulino , linux-trace-users@vger.kernel.org, pbonzini@redhat.com 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