Skip to content

Commit

Permalink
Update resource_image.bpf.c
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzihengya authored Nov 30, 2023
1 parent 2bf9341 commit 9d8b9fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 9d8b9fb

Please sign in to comment.