From: tip-bot for David Ahern <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de,
dsahern@gmail.com, mingo@kernel.org, peterz@infradead.org
Subject: [tip:perf/core] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able()
Date: Fri, 27 Mar 2015 04:46:06 -0700 [thread overview]
Message-ID: <tip-9332d250b4b4f67c633894b311e022e3cf943bd5@git.kernel.org> (raw)
In-Reply-To: <1424281543-67335-1-git-send-email-dsahern@gmail.com>
Commit-ID: 9332d250b4b4f67c633894b311e022e3cf943bd5
Gitweb: http://git.kernel.org/tip/9332d250b4b4f67c633894b311e022e3cf943bd5
Author: David Ahern <dsahern@gmail.com>
AuthorDate: Wed, 18 Feb 2015 10:45:43 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 27 Mar 2015 09:49:44 +0100
perf/x86: Remove redundant calls to perf_pmu_{dis|en}able()
perf_pmu_disable() is called before pmu->add() and perf_pmu_enable() is called
afterwards. No need to call these inside of x86_pmu_add() as well.
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1424281543-67335-1-git-send-email-dsahern@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/perf_event.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index ec6e982..ac41b3a 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1044,7 +1044,6 @@ static int x86_pmu_add(struct perf_event *event, int flags)
hwc = &event->hw;
- perf_pmu_disable(event->pmu);
n0 = cpuc->n_events;
ret = n = collect_events(cpuc, event, false);
if (ret < 0)
@@ -1082,7 +1081,6 @@ done_collect:
ret = 0;
out:
- perf_pmu_enable(event->pmu);
return ret;
}
prev parent reply other threads:[~2015-03-27 11:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-18 17:45 [PATCH] perf/x86: Remove redundant calls to perf_pmu_{dis|en}able David Ahern
2015-02-23 16:49 ` David Ahern
2015-02-23 17:09 ` Peter Zijlstra
2015-03-27 11:46 ` tip-bot for David Ahern [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=tip-9332d250b4b4f67c633894b311e022e3cf943bd5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome