From: Jiri Olsa <jolsa@redhat.com>
To: "Sudarikov, Roman" <roman.sudarikov@linux.intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
namhyung@kernel.org, linux-kernel@vger.kernel.org,
eranian@google.com, bgregg@netflix.com, ak@linux.intel.com,
kan.liang@linux.intel.com, alexander.antonov@intel.com
Subject: Re: [PATCH v3 1/2] perf x86: Infrastructure for exposing an Uncore unit to PMON mapping
Date: Tue, 14 Jan 2020 14:39:58 +0100 [thread overview]
Message-ID: <20200114133958.GE170376@krava> (raw)
In-Reply-To: <9bfcc058-8fde-9b24-3d82-255004e7f057@linux.intel.com>
On Tue, Jan 14, 2020 at 04:24:34PM +0300, Sudarikov, Roman wrote:
SNIP
> > > {
> > > struct intel_uncore_pmu *pmus;
> > > @@ -950,10 +976,19 @@ static int __init uncore_type_init(struct intel_uncore_type *type, bool setid)
> > > attr_group->attrs[j] = &type->event_descs[j].attr.attr;
> > > type->events_group = &attr_group->group;
> > > - }
> > > + } else
> > > + type->events_group = &empty_group;
> > Why???
> Hi Greg,
>
> Technically, what I'm trying to do is to add an attribute which depends on
> the uncore pmu type and BIOS support. New attribute is added to the end of
> the attribute groups array. It appears that the events attribute group is
> optional for most of the uncore pmus for x86/intel, i.e. events_group =
> NULL.
>
> NULL element in the middle of the attribute groups array "hides" all others
> attribute groups which follows that element.
>
> To work around it, embedded NULL elements should be either removed from
> the attribute groups array [1] or replaced with empty attribute; see
> implementation above.
>
> If both approaches are incorrect then please advice what would be correct
> solution for that case.
hi,
I think Greg is reffering to the recent cleanup where we used attribute
groups with is_vissible callbacks, you can check changes below:
b7c9b3927337 perf/x86/intel: Use ->is_visible callback for default group
6a9f4efe78af perf/x86: Use update attribute groups for default attributes
b657688069a2 perf/x86/intel: Use update attributes for skylake format
3ea40ac77261 perf/x86: Use update attribute groups for extra format
1f157286829c perf/x86: Use update attribute groups for caps
baa0c83363c7 perf/x86: Use the new pmu::update_attrs attribute group
jirka
>
> [1] https://lore.kernel.org/lkml/20191210091451.6054-3-roman.sudarikov@linux.intel.com/
>
> Thanks,
> Roman
> > Didn't we fix up the x86 attributes to work properly and not mess around
> > with trying to merge groups and the like? Please don't perpetuate that
> > more...
> >
> > thanks,
> >
> > greg k-h
>
>
next prev parent reply other threads:[~2020-01-14 13:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 13:54 [PATCH v3 0/2][RESEND] perf x86: Exposing IO stack to IO PMON mapping through sysfs roman.sudarikov
2020-01-13 13:54 ` [PATCH v3 1/2] perf x86: Infrastructure for exposing an Uncore unit to PMON mapping roman.sudarikov
2020-01-13 14:34 ` Greg KH
2020-01-14 13:24 ` Sudarikov, Roman
2020-01-14 13:39 ` Jiri Olsa [this message]
2020-01-14 14:04 ` Greg KH
2020-01-13 13:54 ` [PATCH v3 2/2] perf x86: Exposing an Uncore unit to PMON for Intel Xeon® server platform roman.sudarikov
2020-01-13 14:38 ` Greg KH
2020-01-14 13:55 ` Sudarikov, Roman
2020-01-14 14:20 ` Greg KH
2020-01-14 14:21 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2019-12-12 15:04 [PATCH v3 0/2] perf x86: Exposing IO stack to IO PMON mapping through sysfs roman.sudarikov
2019-12-12 15:04 ` [PATCH v3 1/2] perf x86: Infrastructure for exposing an Uncore unit to PMON mapping roman.sudarikov
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=20200114133958.GE170376@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.antonov@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bgregg@netflix.com \
--cc=eranian@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=roman.sudarikov@linux.intel.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