Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932945Ab2JWN6I (ORCPT ); Tue, 23 Oct 2012 09:58:08 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:60630 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932291Ab2JWN6G (ORCPT ); Tue, 23 Oct 2012 09:58:06 -0400 MIME-Version: 1.0 In-Reply-To: <20121023134505.GD16230@one.firstfloor.org> References: <1350602382-12771-1-git-send-email-andi@firstfloor.org> <1350602382-12771-6-git-send-email-andi@firstfloor.org> <1350995474.13456.12.camel@twins> <20121023134505.GD16230@one.firstfloor.org> Date: Tue, 23 Oct 2012 15:58:03 +0200 Message-ID: Subject: Re: [PATCH 05/34] perf, x86: Report PEBS event in a raw format From: Stephane Eranian To: Andi Kleen Cc: Peter Zijlstra , x86 , LKML , Arnaldo Carvalho de Melo , Andi Kleen Content-Type: text/plain; charset=UTF-8 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 30 On Tue, Oct 23, 2012 at 3:45 PM, Andi Kleen wrote: >> I believe we can use a similar approach to PERF_SAMPLE_REGS to expose >> the PEBS machine state. We need to add PERF_SAMPLE_IREGS and then >> return interrupt machine registers with regular sampling and the PEBS machine >> registers in precise mode. A while back I wrote a patch to do just this. Once my >> PEBS-LL patch is out, I will get back to it. > > But why not just use raw? That's far simpler and works fine and is > already supported by perf script. > I have not looked at the scripts. But I am guessing they dump the content of the PEBS records for further postprocessing by other scripts or programs. If you do this inside perf, you have access to more infrastructure code, e.g., dwarf. For instance, I am interested in getting a value profiling mode. That means sampling the values of function arguments. That needs some dwarf support and the PEBS machine state. With that you can produce a per function histogram of the 6 integer register args. You can certainly build anything in Python, but I don't see the point of this. Especially given that there is already some infrastructure (and abstraction) provided by Jiri's patch for PERF_SAMPLE_REGS. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/