All of lore.kernel.org
 help / color / mirror / Atom feed
* Accessing mm_rss_stat fields with btf/BPF_CORE_READ_INTO
@ 2020-06-20 16:22 Matt Pallissard
  2020-06-20 18:11 ` Yonghong Song
  0 siblings, 1 reply; 18+ messages in thread
From: Matt Pallissard @ 2020-06-20 16:22 UTC (permalink / raw)
  To: bpf

New to bpf here.

I'm trying to read values out of of mm_struct.  I have code like this;

unsigned long i[10] = {};
struct task_struct *t;
struct mm_rss_stat *rss;

t = (struct task_struct *)bpf_get_current_task();
BPF_CORE_READ_INTO(&rss, t, mm, rss_stat);
BPF_CORE_READ_INTO(i, rss, count);

However, all values in `i` appear to be 0 (i[MM_FILEPAGES], etc), as if no data gets copied.  I'm about 100% confident that this is caused by a glaring oversight on my part.

Any advice or documentation I could sift through would be greatly appreciated.  Thanks.


Matt Pallissard

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-06-24 15:51 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 16:22 Accessing mm_rss_stat fields with btf/BPF_CORE_READ_INTO Matt Pallissard
2020-06-20 18:11 ` Yonghong Song
2020-06-20 20:06   ` Matt Pallissard
2020-06-21  3:29     ` Andrii Nakryiko
2020-06-21 15:44       ` Matt Pallissard
2020-06-22 15:01         ` Matt Pallissard
2020-06-22 16:20           ` Andrii Nakryiko
2020-06-22 17:19             ` Matt Pallissard
2020-06-22 22:09               ` Andrii Nakryiko
2020-06-23 14:54                 ` Matt Pallissard
2020-06-23 16:35                   ` Yonghong Song
2020-06-23 17:58                     ` Andrii Nakryiko
2020-06-23 18:11                       ` Matt Pallissard
2020-06-23 18:36                         ` Andrii Nakryiko
2020-06-23 22:05                           ` Matt Pallissard
2020-06-23 22:13                             ` Andrii Nakryiko
2020-06-24 15:51                               ` Matt Pallissard
2020-06-23 22:16                             ` Yonghong Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.