linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: mikey@neuling.org
Subject: [PATCH V3 2/2] powerpc, perf: BHRB filter configuration should follow the task
Date: Mon, 10 Jun 2013 10:55:10 +0530	[thread overview]
Message-ID: <1370841910-28695-3-git-send-email-khandual@linux.vnet.ibm.com> (raw)
In-Reply-To: <1370841910-28695-1-git-send-email-khandual@linux.vnet.ibm.com>

When the task moves around the system, the corresponding cpuhw
per cpu strcuture should be popullated with the BHRB filter
request value so that PMU could be configured appropriately with
that during the next call into power_pmu_enable().

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
 arch/powerpc/perf/core-book3s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 426180b..48c68a8 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -1122,8 +1122,11 @@ nocheck:
 
 	ret = 0;
  out:
-	if (has_branch_stack(event))
+	if (has_branch_stack(event)) {
 		power_pmu_bhrb_enable(event);
+		cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
+					event->attr.branch_sample_type);
+	}
 
 	perf_pmu_enable(event->pmu);
 	local_irq_restore(flags);
-- 
1.7.11.7

  parent reply	other threads:[~2013-06-10  5:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10  5:25 [PATCH V3 0/2] Improvement and fixes for BHRB Anshuman Khandual
2013-06-10  5:25 ` [PATCH V3 1/2] powerpc, perf: Ignore separate BHRB privilege state filter request Anshuman Khandual
2013-06-10  5:25 ` Anshuman Khandual [this message]
2013-06-10  5:53 [PATCH V3 0/2] Improvement and fixes for BHRB Anshuman Khandual
2013-06-10  5:53 ` [PATCH V3 2/2] powerpc, perf: BHRB filter configuration should follow the task Anshuman Khandual
2013-06-24  7:20   ` Michael Neuling
2013-07-22  6:39     ` Anshuman Khandual
2013-07-22  6:48       ` Benjamin Herrenschmidt
2013-07-23 13:20         ` Michael Ellerman

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=1370841910-28695-3-git-send-email-khandual@linux.vnet.ibm.com \
    --to=khandual@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --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).