[go: nahoru, domu]

Skip to content
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

fix: fix bug in perf module #3371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix: fix bug in perf module #3371

wants to merge 1 commit into from

Conversation

Rouzip
Copy link
Contributor
@Rouzip Rouzip commented Aug 10, 2023

Fix: #3360

  1. Fix ioctl enable flag since we use perf group context
  2. Group leader and other events use same pid(cgroup fd).

@k8s-ci-robot
Copy link
Collaborator

Hi @Rouzip. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@Rouzip
Copy link
Contributor Author
Rouzip commented Aug 10, 2023

Any ideas and comment is welcome😀 @iwankgb

@iwankgb
Copy link
Collaborator
iwankgb commented Aug 21, 2023

@Rouzip have you come across an issue with perf in cAdvisor?

@iwankgb
Copy link
Collaborator
iwankgb commented Aug 21, 2023

/ok-to-test

@Rouzip
Copy link
Contributor Author
Rouzip commented Aug 29, 2023

@Rouzip have you come across an issue with perf in cAdvisor?

Sorry for the late response. I am developing a similar tool like cAdvisor perf module. In this document, it says:

pid == -1 and cpu >= 0
This measures all processes/threads on the specified CPU.
This requires CAP_PERFMON (since Linux 5.8) or
CAP_SYS_ADMIN capability or a
/proc/sys/kernel/perf_event_paranoid value of less than 1.

PERF_EVENT_IOC_ENABLE
This enables the individual event or event group specified
by the file descriptor argument.
If the PERF_IOC_FLAG_GROUP bit is set in the ioctl
argument, then all events in a group are enabled, even if
the event specified is not the group leader (but see
BUGS).

So I think we need to change it in cAdvisor.

@Rouzip
Copy link
Contributor Author
Rouzip commented Sep 14, 2023

hello, anything I can do there? @iwankgb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

perf_event_open PerfEventAttr pid and flag issue
3 participants