-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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 cpuunclaimed.py with cfs_rq structure change #2164
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Similar to runqlen.py, make proper adjustment for cfs_rq_partial structure so it can align with what the kernel expects. Signed-off-by: Yonghong Song <yhs@fb.com>
Thanks, works for me! We really need BTF for this in the future, right? |
Right. With BTF which is able to resolve to correct offset, we do not need to define |
[buildbot, test this please] |
navytux
added a commit
to navytux/bcc
that referenced
this pull request
Feb 7, 2019
* master: (609 commits) docs: references_guide.md: add/fix search examples/tools links (iovisor#2186) Fix misc file permissions (iovisor#2185) sync with latest bpf (iovisor#2184) sync with latest libbpf repo (iovisor#2183) docs: fix broken link of bpf_log2l(iovisor#2176) examples/tracing: some minor fixes Fix tools/syscount -l (iovisor#2180) examples/tracing/bitehist.py: add example of linear histogram (iovisor#2177) cachestat: bring back HITRATIO column Fix debuginfo search on Ubuntu Add installation instructions for Amazon Linux 1 AMI Sign-Off-By Travis Davies <trdavies@amazon.com> [iovisor/bcc] trace: Incorrect symbol offsets when using build_id (iovisor#2161) (iovisor#2162) profile: exclude CPU idle stacks by default (iovisor#2166) fix cpuunclaimed.py with cfs_rq structure change (iovisor#2164) tools: rename "deadlock_detector" to "deadlock" (iovisor#2152) (iovisor#2160) use libbpf api in bpf_attach_xdp (iovisor#2158) support symbol resolution of short-lived process. (iovisor#2144) profile.py: return kernel annotations for folded stacks use libbpf APIs from libbpf.c (iovisor#2156) ddos_detector.py to monitor DDOS attacks (iovisor#2140) ...
palexster
pushed a commit
to palexster/bcc
that referenced
this pull request
Jul 7, 2019
Similar to runqlen.py, make proper adjustment for cfs_rq_partial structure so it can align with what the kernel expects. Signed-off-by: Yonghong Song <yhs@fb.com>
ismhong
pushed a commit
to ismhong/bcc
that referenced
this pull request
May 8, 2023
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR iovisor#1510 and iovisor#2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/20200214152729.6059-4-vincent.guittot@linaro.org/ - https://yhbt.net/lore/all/20200214152729.6059-5-vincent.guittot@linaro.org/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in iovisor#4602. Signed-off-by: Ism Hong <ism.hong@realtek.com>
ismhong
pushed a commit
to ismhong/bcc
that referenced
this pull request
May 8, 2023
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR iovisor#1510 and iovisor#2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/20200214152729.6059-4-vincent.guittot@linaro.org/ - https://yhbt.net/lore/all/20200214152729.6059-5-vincent.guittot@linaro.org/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in iovisor#4602. Signed-off-by: Ism Hong <ism.hong@realtek.com>
ismhong
pushed a commit
to ismhong/bcc
that referenced
this pull request
May 16, 2023
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR iovisor#1510 and iovisor#2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/20200214152729.6059-4-vincent.guittot@linaro.org/ - https://yhbt.net/lore/all/20200214152729.6059-5-vincent.guittot@linaro.org/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in iovisor#4602. Signed-off-by: Ism Hong <ism.hong@realtek.com>
yonghong-song
pushed a commit
that referenced
this pull request
May 19, 2023
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR #1510 and #2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/20200214152729.6059-4-vincent.guittot@linaro.org/ - https://yhbt.net/lore/all/20200214152729.6059-5-vincent.guittot@linaro.org/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in #4602. Signed-off-by: Ism Hong <ism.hong@realtek.com>
captain5050
pushed a commit
to captain5050/bcc
that referenced
this pull request
Oct 12, 2023
runqlen / cpuunclaimed add check_runnable_weight_field() as workaround to check runnable_weight presents in struct cfs_rq in kernel/sched/sched.h by trying to access runnable_weight field of struct sched_entity in include/linux/sched.h. Please check more details in PR iovisor#1510 and iovisor#2164. Unfortunately, the runnable_weight field of struct cfs_rq is removed, but the runnable_weight field of struct sched_entity is remained by following patchset series from Linux version 5.7.0. - https://yhbt.net/lore/all/20200214152729.6059-4-vincent.guittot@linaro.org/ - https://yhbt.net/lore/all/20200214152729.6059-5-vincent.guittot@linaro.org/ Please also check the source of Linux below. - include/linux/sched.h - https://elixir.bootlin.com/linux/v5.7/source/include/linux/sched.h#L475 - kernel/sched/sched.h - https://elixir.bootlin.com/linux/v5.7/source/kernel/sched/sched.h#L502 This PR checks runnable_weight field exists by using kernel_struct_has_field() if target system with BTF enabled, otherwise fallback to legacy on-the-fly compiling check. In the meantime, add Linux version 5.7.0 check in structure definition cfs_rq_partial to prevent issue if target system w/o BTF enabled and Linux version > 5.7. Please check more details in iovisor#4602. Signed-off-by: Ism Hong <ism.hong@realtek.com>
CrackerCat
pushed a commit
to CrackerCat/bcc
that referenced
this pull request
Jul 31, 2024
Similar to runqlen.py, make proper adjustment for cfs_rq_partial structure so it can align with what the kernel expects. Signed-off-by: Yonghong Song <yhs@fb.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to runqlen.py, make proper adjustment for
cfs_rq_partial structure so it can align with
what the kernel expects.
Signed-off-by: Yonghong Song yhs@fb.com