mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: Nilay Vaish <nilayvaish@gmail.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 00/13] Add support for perf_arch_regs
Date: Thu, 1 Sep 2016 08:38:56 +0530	[thread overview]
Message-ID: <dff96585-7f0e-5b81-e318-902f5c03bfb8@linux.vnet.ibm.com> (raw)
In-Reply-To: <CACbG3094rSX9qfngBPSzetG21_=yW1pdxcAeVZOyNj=AJmdL6Q@mail.gmail.com>



On Tuesday 30 August 2016 09:31 PM, Nilay Vaish wrote:
> On 28 August 2016 at 16:00, Madhavan Srinivasan
> <maddy@linux.vnet.ibm.com> wrote:
>> Patchset to extend PERF_SAMPLE_REGS_INTR to include
>> platform specific PMU registers.
>>
>> Patchset applies cleanly on tip:perf/core branch
>>
>> It's a perennial request from hardware folks to be able to
>> see the raw values of the pmu registers. Partly it's so that
>> they can verify perf is doing what they want, and some
>> of it is that they're interested in some of the more obscure
>> info that isn't plumbed out through other perf interfaces.
>>
>> Over the years internally we have used various hack to get
>> the requested data out but this is an attempt to use a
>> somewhat standard mechanism (using PERF_SAMPLE_REGS_INTR).
>>
>> This would also be helpful for those of us working on the perf
>> hardware backends, to be able to verify that we're programming
>> things correctly, without resorting to debug printks etc.
>>
>> Mechanism proposed:
>>
>> 1)perf_regs structure is extended with a perf_arch_regs structure
>> which each arch/ can populate with their specific platform
>> registers to sample on each perf interrupt and an arch_regs_mask
>> variable, which is for perf tool to know about the perf_arch_regs
>> that are supported.
>>
>> 2)perf/core func perf_sample_regs_intr() extended to update
>> the perf_arch_regs structure and the perf_arch_reg_mask. Set of new
>> support functions added perf_get_arch_regs_mask() and
>> perf_get_arch_reg() to aid the updates from arch/ side.
>>
>> 3) perf/core funcs perf_prepare_sample() and perf_output_sample()
>> are extended to support the update for the perf_arch_regs_mask and
>> perf_arch_regs in the sample
>>
>> 4)perf/core func perf_output_sample_regs() extended to dump
>> the arch_regs to the output sample.
>>
>> 5)Finally, perf tool side is updated to include a new element
>> "arch_regs_mask" in the "struct regs_dump", event sample funcs
>> and print functions are updated to support perf_arch_regs.
>>
> I read the patch series and I have one suggestion to make.  I think we
> should not use 'arch regs' to refer to these pmu registers.  I think
Reason is that they are arch specific pmu regs. But I guess we can go with
pmu_regs also. And having a "pregs" as option to list in -I? will be fine?
(patch 13 in the patch series)


Maddy

> architectural registers typically refer to the ones that hold the
> state of the process.  Can we replace arch_regs by pmu_regs, or some
> other choice?
>
> Thanks
> Nilay
>

      reply	other threads:[~2016-09-01  3:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 21:00 Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 01/13] perf/core: Add perf_arch_regs and mask to perf_regs structure Madhavan Srinivasan
2016-08-28 21:22   ` kbuild test robot
2016-08-28 23:41   ` kbuild test robot
2016-08-29  0:21   ` kbuild test robot
2016-09-01  7:26   ` Peter Zijlstra
2016-09-06  4:25     ` Madhavan Srinivasan
2016-09-06  9:10       ` Peter Zijlstra
2016-09-09  0:44         ` Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 02/13] perf/core: Extend perf_sample_regs_intr() to include perf_arch_regs update Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 03/13] perf/core: Update perf_*_sample() to include perf_arch_regs Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 04/13] perf/core: Extend perf_output_sample_regs() " Madhavan Srinivasan
2016-08-30 16:11   ` Nilay Vaish
2016-09-01  3:42     ` Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 05/13] powerpc/perf: Define enums for perf_arch_regs registers Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 06/13] powerpc/perf: Add support for perf_arch_regs in powerpc Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 07/13] powerpc/perf: Add support for perf_arch_regs for Power7 processor Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 08/13] powerpc/perf: Add support for perf_arch_regs for newer Power processor Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 09/13] powerpc/perf: Add support for perf_arch_regs for PPC970 processor Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 10/13] tool/perf: Add support for perf_arch_regs Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 11/13] tools/perf: Fix the mask in regs_dump__printf and print_sample_iregs Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 12/13] tool/perf: Add perf_arch_reg mask and arch_reg_names structure Madhavan Srinivasan
2016-08-28 21:00 ` [PATCH 13/13] powerpc/perf: Add support to dump only arch_regs Madhavan Srinivasan
2016-08-30 16:01 ` [PATCH 00/13] Add support for perf_arch_regs Nilay Vaish
2016-09-01  3:08   ` Madhavan Srinivasan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dff96585-7f0e-5b81-e318-902f5c03bfb8@linux.vnet.ibm.com \
    --to=maddy@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nilayvaish@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®