From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756332AbaAGAwe (ORCPT ); Mon, 6 Jan 2014 19:52:34 -0500 Received: from one.firstfloor.org ([193.170.194.197]:33954 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755044AbaAGAwd (ORCPT ); Mon, 6 Jan 2014 19:52:33 -0500 Date: Tue, 7 Jan 2014 01:52:31 +0100 From: Andi Kleen To: Peter Zijlstra Cc: Andi Kleen , Alexander Shishkin , Ingo Molnar , Arnaldo Carvalho de Melo , Ingo Molnar , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Stephane Eranian Subject: Re: [PATCH v0 04/71] itrace: Infrastructure for instruction flow tracing units Message-ID: <20140107005231.GZ20765@two.firstfloor.org> References: <20131218150900.GU21999@twins.programming.kicks-ass.net> <87wqj1s2d3.fsf@ashishki-desk.ger.corp.intel.com> <20131219103134.GD30183@twins.programming.kicks-ass.net> <87ob4drsww.fsf@ashishki-desk.ger.corp.intel.com> <20131219112812.GY21999@twins.programming.kicks-ass.net> <20131219123955.GA18186@gmail.com> <87haa4kj4y.fsf@ashishki-desk.ger.corp.intel.com> <20131219151024.GI16438@laptop.programming.kicks-ass.net> <87iotw6bwx.fsf@tassilo.jf.intel.com> <20140106220509.GI30183@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140106220509.GI30183@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Also of course it requires disabling/enabling PT explicitly for > > every perf message, which is slow. So you add at least 2*WRMSR cost > > (thousands of cycles). > > That's just dumb, no flush the entire PT buffer into a few large > records. How would that work? You mean a separate buffer and then copy or map? ------ Also here are some more problems with interleaving: A common PT config is to just run it as a ring buffer in the background and only take the data out when something happens (sample, crash etc.) But the side band still needs to be logged and at arbitary times. So the PT wrapping will happen much more often than the perf wrapping. If you interleave you may actually end up with lots of small rings in a single buffer, unless you stop every time the buffer fills up (which would add a lot more overhead) I suppose it could be somehow parsed, but it would very different from what perf does today. -Andi -- ak@linux.intel.com -- Speaking for myself only.