Skip to content

Commit

Permalink
Update cpu_watcher.bpf.c
Browse files Browse the repository at this point in the history
  • Loading branch information
albertxu216 authored Nov 30, 2023
1 parent b5d5124 commit 9610268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eBPF_Supermarket/CPU_Subsystem/cpu_watcher/cpu_watcher.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ int BPF_KRETPROBE(schedule_exit)
/* sar跟踪函数 */
/*----------------------------------------------*/
// 统计fork数
SEC("kprobe/finish_task_switch")
SEC("kprobe/finish_task_switch.isra.0")
int kprobe__finish_task_switch(struct pt_regs *ctx)
{
u32 key = 0;
Expand Down Expand Up @@ -239,7 +239,7 @@ int trace_sched_switch2(struct cswch_args *info) {
return 0;
}

SEC("kprobe/finish_task_switch")
SEC("kprobe/finish_task_switch.isra.0")
int BPF_KPROBE(finish_task_switch,struct task_struct *prev){
pid_t pid=BPF_CORE_READ(prev,pid);
u64 *val, time = bpf_ktime_get_ns();
Expand Down

0 comments on commit 9610268

Please sign in to comment.