Skip to content

Commit

Permalink
Update libbpf_sar.c
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzihengya authored Sep 26, 2023
1 parent 33363cf commit 8260551
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions eBPF_Supermarket/CPU_Subsystem/libbpf_sar/libbpf_sar.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ int main(int argc, char **argv)
}

addr = find_ksym(symbol_name);
if (addr) {
// 将地址转换为长整数,并存储在BPF程序的symAddr数组中
skel->rodata->forks_addr = (u64)strtoull(addr, NULL, 16);
} else {
printf("Symbol not found\n");
return 0;
}
if (addr) {
// 将地址转换为长整数,并存储在BPF程序的symAddr数组中
skel->rodata->forks_addr = (u64)strtoull(addr, NULL, 16);
} else {
printf("Symbol not found\n");
return 0;
}

/* 加载并验证BPF程序 */
err = libbpf_sar_bpf__load(skel);
Expand Down

0 comments on commit 8260551

Please sign in to comment.