From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [PATCH v2 1/8] PERFv2
Date: Thu, 7 Feb 2019 18:11:47 -0500 [thread overview]
Message-ID: <20190207231147.GA19131@char.us.oracle.com> (raw)
In-Reply-To: <3c5756531a45ca9791a9c4bca295e92e063957ac.1549416008.git.ak@linux.intel.com>
On Tue, Feb 05, 2019 at 05:23:55PM -0800, speck for Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
> Subject: x86/pmu/intel: Export number of counters in caps
>
> Export the number of generic and fixed counters in the core PMU in caps/
> This helps users and tools with constructing groups. Will be also more
> important with upcoming patches that can change the number of counters.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> arch/x86/events/core.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
> index 374a19712e20..58e659bfc2d9 100644
> --- a/arch/x86/events/core.c
> +++ b/arch/x86/events/core.c
> @@ -2248,8 +2248,28 @@ static ssize_t max_precise_show(struct device *cdev,
>
> static DEVICE_ATTR_RO(max_precise);
>
> +static ssize_t num_counter_show(struct device *cdev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + return snprintf(buf, PAGE_SIZE, "%d\n", x86_pmu.num_counters);
> +}
> +
> +static DEVICE_ATTR_RO(num_counter);
> +
> +static ssize_t num_counter_fixed_show(struct device *cdev,
> + struct device_attribute *attr,
> + char *buf)
> +{
> + return snprintf(buf, PAGE_SIZE, "%d\n", x86_pmu.num_counters_fixed);
> +}
> +
> +static DEVICE_ATTR_RO(num_counter_fixed);
> +
> static struct attribute *x86_pmu_caps_attrs[] = {
> &dev_attr_max_precise.attr,
> + &dev_attr_num_counter.attr,
> + &dev_attr_num_counter_fixed.attr,
> NULL
> };
>
> --
> 2.17.2
next prev parent reply other threads:[~2019-02-07 23:12 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 1:23 [MODERATED] [PATCH v2 0/8] PERFv2 Andi Kleen
2019-02-06 1:23 ` [MODERATED] [PATCH v2 1/8] PERFv2 Andi Kleen
2019-02-07 23:11 ` Konrad Rzeszutek Wilk [this message]
2019-02-06 1:23 ` [MODERATED] [PATCH v2 2/8] PERFv2 Andi Kleen
2019-02-06 1:23 ` [MODERATED] [PATCH v2 3/8] PERFv2 Andi Kleen
2019-02-06 19:07 ` [MODERATED] " Andi Kleen
2019-02-06 1:23 ` [MODERATED] [PATCH v2 4/8] PERFv2 Andi Kleen
2019-02-06 3:55 ` [MODERATED] " Andi Kleen
2019-02-06 1:23 ` [MODERATED] [PATCH v2 5/8] PERFv2 Andi Kleen
2019-02-06 1:24 ` [MODERATED] [PATCH v2 6/8] PERFv2 Andi Kleen
2019-02-06 1:24 ` [MODERATED] [PATCH v2 7/8] PERFv2 Andi Kleen
2019-02-06 1:24 ` [MODERATED] [PATCH v2 8/8] PERFv2 Andi Kleen
2019-02-06 19:10 ` [MODERATED] Re: [PATCH v2 0/8] PERFv2 Andi Kleen
2019-02-07 13:27 ` Peter Zijlstra
2019-02-07 13:33 ` Peter Zijlstra
2019-02-07 13:48 ` Peter Zijlstra
2019-02-07 14:39 ` Andi Kleen
2019-02-07 14:37 ` Andi Kleen
2019-02-07 15:33 ` Peter Zijlstra
2019-02-07 15:51 ` Andrew Cooper
2019-02-07 16:35 ` Andi Kleen
2019-02-07 15:37 ` Peter Zijlstra
2019-02-07 16:20 ` Andi Kleen
2019-02-07 16:49 ` Peter Zijlstra
2019-02-07 21:55 ` Andi Kleen
2019-02-07 16:35 ` Andrew Cooper
2019-02-07 17:00 ` Peter Zijlstra
2019-02-07 17:55 ` Andrew Cooper
2019-02-07 22:04 ` Andi Kleen
2019-02-07 22:45 ` Andrew Cooper
2019-02-07 16:01 ` Peter Zijlstra
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=20190207231147.GA19131@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=speck@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).