core: softirq: change hook point to account_process_tick()

scheduler_tick() was renamed in upstream kernel. We can change the
hook point to account_process_tick() which exists in most of the
distributions.

Change-Id: I80a9a6fabbf87a4ec660f79ff3a568cd6842b167
Signed-off-by: Honglei Wang <jameshongleiwang@126.com>
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
This commit is contained in:
Honglei Wang 2025-07-15 07:10:05 -04:00 committed by Tonghao Zhang
parent 72516b8d42
commit beb02323c6
2 changed files with 4 additions and 4 deletions

View File

@ -58,8 +58,8 @@ struct {
__uint(value_size, sizeof(u32));
} irqoff_event_map SEC(".maps");
SEC("kprobe/scheduler_tick")
void probe_scheduler_tick(struct pt_regs *ctx)
SEC("kprobe/account_process_tick")
void probe_account_process_tick(struct pt_regs *ctx)
{
// verify bpf-ratelimit
if (bpf_ratelimited(&rate))

View File

@ -169,8 +169,8 @@ func attachIrqAndEventPipe(ctx context.Context, b bpf.BPF) (bpf.PerfEventReader,
*/
if err := b.AttachWithOptions([]bpf.AttachOption{
{
ProgramName: "probe_scheduler_tick",
Symbol: "scheduler_tick",
ProgramName: "probe_account_process_tick",
Symbol: "account_process_tick",
},
{
ProgramName: "probe_tick_nohz_restart_sched_tick",