From: tom.leiming@gmail.com (Ming Lei)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] Extending ARM perf-events for multiple PMUs
Date: Tue, 12 Apr 2011 19:12:18 +0800 [thread overview]
Message-ID: <BANLkTikK_YCu-hMH=2hD25WJS7Lu15p+7g@mail.gmail.com> (raw)
In-Reply-To: <1302604228.2035.2.camel@laptop>
Hi Peter,
2011/4/12 Peter Zijlstra <peterz@infradead.org>:
> On Tue, 2011-04-12 at 15:39 +0800, Ming Lei wrote:
>> > I just haven't figured out a way to dynamically add files/directories
>>
>> Seems not very difficult, we have pmu_bus already, so introduce the
>> .match to find driver according device name, then implement a
>> driver for the pmu device to add this needed attributes(files).
>
> It probably isn't very hard, but I'm not sysfs/driver skilled and
> haven't been able to put a lot of time in.
>
>> > in the whole struct device sysfs muck (that also pleases the
>> > driver/sysfs folks). Nor have we agreed on a sane layout for such
>> > events there.
>>
>> You mean we can find this event names here and pass them to perf -e ?
>
> That's the purpose yes. The intermediate problem is how to represent
> these events in the sysfs hierarchy such that not every pmu
> implementation does it differently.
How about the below idea?
- for each pmu device, one attribute group(directory) named as 'events'
is created to accommodate all events this pmu can handle, such as:
/sys/devices/cpu/events/ for pmu of 'cpu'
- perf_pmu_register will populate all events that this pmu can handle under
the directory of 'events' using information from the defined pmu instance
- 'perf' utility can get all events for each pmu by walking the
directory of
'events' for all pmu devices, which can be got from
'/sys/bus/event_source/devices'.
thanks,
--
Ming Lei
next prev parent reply other threads:[~2011-04-12 11:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 17:15 [RFC] Extending ARM perf-events for multiple PMUs Will Deacon
2011-04-08 18:10 ` Linus Walleij
2011-04-11 11:12 ` Will Deacon
2011-04-09 11:40 ` Peter Zijlstra
2011-04-11 11:29 ` Will Deacon
2011-04-11 12:47 ` Peter Zijlstra
2011-04-11 17:44 ` Ashwin Chaugule
2011-04-12 17:45 ` Will Deacon
2011-04-11 18:00 ` Ashwin Chaugule
2011-04-12 7:39 ` Ming Lei
2011-04-12 10:30 ` Peter Zijlstra
2011-04-12 11:12 ` Ming Lei [this message]
2011-04-11 17:29 ` Ashwin Chaugule
2011-04-11 18:00 ` Will Deacon
2011-04-11 20:46 ` Ashwin Chaugule
2011-04-12 18:08 ` Will Deacon
2011-04-13 5:09 ` Ashwin Chaugule
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='BANLkTikK_YCu-hMH=2hD25WJS7Lu15p+7g@mail.gmail.com' \
--to=tom.leiming@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).