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

libbpf-tools: add cpu filter for hardirqs/softirqs #5107

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

ZhangYet
Copy link
Contributor

Since tools/hardirqs and tools/softirqs supports a --cpu option, it's reasonable to support a same option in libbpf version.

libbpf-tools/softirqs.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@yonghong-song yonghong-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to avoid unnecessary code format churns.

@ZhangYet ZhangYet force-pushed the dante-dev branch 10 times, most recently from cee19ff to 6bb7124 Compare September 28, 2024 12:17
libbpf-tools/hardirqs.c Outdated Show resolved Hide resolved
libbpf-tools/hardirqs.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.c Outdated Show resolved Hide resolved
@ZhangYet ZhangYet force-pushed the dante-dev branch 3 times, most recently from e44323a to 9812c9b Compare September 30, 2024 09:28
libbpf-tools/softirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.c Outdated Show resolved Hide resolved
libbpf-tools/hardirqs.bpf.c Outdated Show resolved Hide resolved
@ZhangYet ZhangYet force-pushed the dante-dev branch 2 times, most recently from cfe636f to 4159296 Compare October 1, 2024 03:04
Copy link
Collaborator

@yonghong-song yonghong-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a lot of format issues as well. Please check

  • leading 'tab' instead of 'space'.
  • some places having trailing spaces.
    Please fix.

libbpf-tools/hardirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.c Outdated Show resolved Hide resolved
@ZhangYet ZhangYet force-pushed the dante-dev branch 2 times, most recently from 4e1875c to 30ee67e Compare October 2, 2024 08:58
@ZhangYet
Copy link
Contributor Author

ZhangYet commented Oct 2, 2024

There are a lot of format issues as well. Please check

  • leading 'tab' instead of 'space'.
  • some places having trailing spaces.
    Please fix.

Sorry for the format issues. I kept switching development env between office and home, sometimes the fix was forget to push(like the space between { and cpu). I have replace all 8 space with tabs now.

Maybe we should provide a tool like checkpatch.el to do the format work?

Copy link
Collaborator

@yonghong-song yonghong-song left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still a few format issues. Otherwise, looks good.

libbpf-tools/softirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.bpf.c Outdated Show resolved Hide resolved
libbpf-tools/softirqs.c Outdated Show resolved Hide resolved
@yonghong-song
Copy link
Collaborator

There are a lot of format issues as well. Please check

  • leading 'tab' instead of 'space'.
  • some places having trailing spaces.
    Please fix.

Sorry for the format issues. I kept switching development env between office and home, sometimes the fix was forget to push(like the space between { and cpu). I have replace all 8 space with tabs now.

Maybe we should provide a tool like checkpatch.el to do the format work?

Yes, it would be good if we have a checkpatch tool for all codes under libbpf-tools directory.

tools/softirqs.py supports `-c/--cpu` otption to filter cpu,
It's reasonable to support a same otption for libbpf-tools/softirqs.

Add `-mcpu=v3` in Makefile for softirqs or the shift op will lead
to verifier errors.

Reported-by: Tang Yizhou <[email protected]>
Signed-off-by: Dantezy <[email protected]>
@yonghong-song yonghong-song merged commit 321f8b1 into iovisor:master Oct 20, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants