diff --git a/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/developing/bpf/resource_image.bpf.c b/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/developing/bpf/resource_image.bpf.c index 1d1d4f12d..608870320 100644 --- a/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/developing/bpf/resource_image.bpf.c +++ b/eBPF_Supermarket/CPU_Subsystem/eBPF_proc_image/developing/bpf/resource_image.bpf.c @@ -74,8 +74,8 @@ int kprobe__finish_task_switch(struct pt_regs *ctx) struct mm_rss_stat rss = {}; long long *c; rss = BPF_CORE_READ(prev, mm, rss_stat); - if(!rss) return 0; c = (long long *)(rss.count); + if(!c) return 0; memused = *c + *(c + 1) + *(c + 3); #endif @@ -101,8 +101,8 @@ int kprobe__finish_task_switch(struct pt_regs *ctx) struct mm_rss_stat rss = {}; long long *c; rss = BPF_CORE_READ(prev, mm, rss_stat); - if(!rss) return 0; c = (long long *)(rss.count); + if(!c) return 0; memused = *c + *(c + 1) + *(c + 3); #endif