Skip to content

Commit

Permalink
Merge pull request sched-ext#1180 from hodgesds/scxtop-attach-fixes
Browse files Browse the repository at this point in the history
scxtop: Fix attach on newer kernels
  • Loading branch information
hodgesds authored Jan 11, 2025
2 parents d935c7d + 764d1d7 commit a878d8b
Showing 1 changed file with 10 additions and 50 deletions.
60 changes: 10 additions & 50 deletions tools/scxtop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,74 +77,34 @@ async fn run() -> Result<()> {
links.push(skel.progs.on_sched_switch.attach()?);

// 6.13 compatability
if let Ok(link) = skel
.progs
.scx_insert_vtime
.attach_kprobe(false, "scx_bpf_dsq_insert_vtime")
{
if let Ok(link) = skel.progs.scx_insert_vtime.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dispatch_vtime
.attach_kprobe(false, "scx_bpf_dispatch_vtime")
{
if let Ok(link) = skel.progs.scx_dispatch_vtime.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_insert
.attach_kprobe(false, "scx_bpf_dsq_insert")
{
if let Ok(link) = skel.progs.scx_insert.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dispatch
.attach_kprobe(false, "scx_bpf_dispatch")
{
if let Ok(link) = skel.progs.scx_dispatch.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dispatch_from_dsq_set_vtime
.attach_kprobe(false, "scx_bpf_dispatch_from_dsq_set_vtime")
{
if let Ok(link) = skel.progs.scx_dispatch_from_dsq_set_vtime.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dsq_move_set_vtime
.attach_kprobe(false, "scx_bpf_dsq_move_set_vtime")
{
if let Ok(link) = skel.progs.scx_dsq_move_set_vtime.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dsq_move_set_slice
.attach_kprobe(false, "scx_bpf_dsq_move_set_slice")
{
if let Ok(link) = skel.progs.scx_dsq_move_set_slice.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dispatch_from_dsq_set_slice
.attach_kprobe(false, "scx_bpf_dispatch_from_dsq_set_slice")
{
if let Ok(link) = skel.progs.scx_dispatch_from_dsq_set_slice.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dispatch_from_dsq
.attach_kprobe(false, "scx_bpf_dispatch_from_dsq")
{
if let Ok(link) = skel.progs.scx_dispatch_from_dsq.attach() {
links.push(link);
}
if let Ok(link) = skel
.progs
.scx_dsq_move
.attach_kprobe(false, "scx_bpf_dsq_move")
{
if let Ok(link) = skel.progs.scx_dsq_move.attach() {
links.push(link);
}

Expand Down

0 comments on commit a878d8b

Please sign in to comment.