-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add perf event grouping. #2578
Add perf event grouping. #2578
Conversation
Hi @Creatone. Thanks for your PR. I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
dfd25a8
to
c6eef8a
Compare
let me know when this is ready for review, and remove the WIP tag. |
c6eef8a
to
ba8040c
Compare
@dashpole I need to add grouping uncore events. In a couple of days, it'll be finished. |
ba8040c
to
30ca286
Compare
@dashpole There is a small change in the configuration file. Now you can pass a single event name or an array with event names if you want to group. Single elements can be read in a group format so I did also some refactoring. Grouping doesn't work for multiple PMUs. |
This looks reasonable to me, but i'd like @katarzyna-z or @iwankgb to take a look as well |
I think that it is worth to change this line and replace fmt.Printf with klog error in this pull request. |
0b3e42d
to
520dd7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but please squash commits
@katarzyna-z after |
I will review during the weekend. |
f6cd930
to
7770120
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it took me more than it should have. I'm sorry.
if ok { | ||
if customEvent.Type != 0 { | ||
pmuPrefix = uncorePMUPrefix | ||
// CPUs file descriptors of group leader needed for perf_event_open. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are uncore metrics. Why they are CPU dependent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of perf_event_open
arguments. There is an abstraction that one CPU corresponds to one socket.
For example CPU range in /sys/device/uncore_imc_0/cpumask
of 2 socket machine:
$ cat /sys/devices/uncore_imc_0/cpumask
0-1
Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
4ac826f
to
54ac157
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @iwankgb and @katarzyna-z for the reviews. This looks really good.
It provides support for grouping core perf events.
Part of #2483