From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linuxppc-dev@ozlabs.org, mikey@neuling.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB
Date: Wed, 17 Apr 2013 17:37:50 +0530 [thread overview]
Message-ID: <516E9096.70906@linux.vnet.ibm.com> (raw)
In-Reply-To: <20130417070852.GA29203@concordia>
On 04/17/2013 12:38 PM, Michael Ellerman wrote:
> On Tue, Apr 16, 2013 at 09:24:10PM +0530, Anshuman Khandual wrote:
>> This patch provides basic enablement for perf branch stack sampling framework
>> on POWER8 processor with a new PMU feature called BHRB (Branch History Rolling
>> Buffer).
>>
>> Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/perf/core-book3s.c | 96 +++++++++++++++++++++++++++++++++++--
>> arch/powerpc/perf/perf_event_bhrb.c | 85 ++++++++++++++++++++++++++++++++
>> 2 files changed, 178 insertions(+), 3 deletions(-)
>> create mode 100644 arch/powerpc/perf/perf_event_bhrb.c
>>
>> diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
>> index 4ac6e64..f4d1347 100644
>> --- a/arch/powerpc/perf/core-book3s.c
>> +++ b/arch/powerpc/perf/core-book3s.c
>> @@ -19,6 +19,8 @@
>> #include <asm/firmware.h>
>> #include <asm/ptrace.h>
>>
>> +#define BHRB_MAX_ENTRIES 32
>> +
>> struct cpu_hw_events {
>> int n_events;
>> int n_percpu;
>> @@ -38,11 +40,21 @@ struct cpu_hw_events {
>>
>> unsigned int group_flag;
>> int n_txn_start;
>> +
>> + /* BHRB bits */
>> + u64 bhrb_filter; /* BHRB HW branch filter */
>> + int bhrb_users;
>> + void *bhrb_context;
>> + struct perf_branch_stack bhrb_stack;
>> + struct perf_branch_entry bhrb_entries[BHRB_MAX_ENTRIES];
>> };
>> +
>> DEFINE_PER_CPU(struct cpu_hw_events, cpu_hw_events);
>>
>> struct power_pmu *ppmu;
>>
>> +#include "perf_event_bhrb.c"
>> +
>
> Um, why are you doing that?
>
There was no specific reason for that.
> If it's code that should be in a header, put it in a header. If it's C
> code, add it to the Makefile.
Sure I would get the new code in the Makefile. Thanks!
Regards
Anshuman
>
> cheers
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
next prev parent reply other threads:[~2013-04-17 12:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 15:54 [PATCH V2 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8 Anshuman Khandual
2013-04-16 15:54 ` [PATCH V2 1/5] powerpc, perf: Add new BHRB related instructions " Anshuman Khandual
2013-04-16 15:54 ` [PATCH V2 2/5] powerpc, perf: Add basic assembly code to read BHRB entries " Anshuman Khandual
2013-04-16 17:23 ` Segher Boessenkool
2013-04-17 4:00 ` Anshuman Khandual
2013-04-16 15:54 ` [PATCH V2 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags Anshuman Khandual
2013-04-16 15:54 ` [PATCH V2 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8 Anshuman Khandual
2013-04-16 15:54 ` [PATCH V2 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB Anshuman Khandual
2013-04-17 7:08 ` Michael Ellerman
2013-04-17 12:07 ` Anshuman Khandual [this message]
2013-04-18 2:58 ` Anshuman Khandual
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=516E9096.70906@linux.vnet.ibm.com \
--to=khandual@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=mikey@neuling.org \
/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;
as well as URLs for NNTP newsgroup(s).