proc_mem_rss

Helmut Eller eller.helmut@gmail.com
Sat Jan 11 20:22:00 GMT 2025


Hello,

there seems to be a bug in the proc_mem_rss function.  When I try this

  stap -e 'probe timer.ms(1000) { println (proc_mem_rss(target())) }' \
       -c 'sleep 5'

I get this:

  WARNING: Kernel function symbol table missing [man warning::symbols]
  semantic error: invalid access '->count' for array type: operator '->' at /scratch/systemtap/install-git/share/systemtap/tapset/linux/proc_mem.stp:92:38
          source: 	val = atomic_long_read(&mm->rss_stat->count[member])
                  	                                    ^
  
  semantic error: unresolved type : operator '&' at :92:25
          source: 	val = atomic_long_read(&mm->rss_stat->count[member])
  
  
  Pass 2: analysis failed.  [man error::pass2]

Maybe the line should be changed to

  val = atomic_long_read(&mm->rss_stat[member]->count)

?

I tried this with the current version of the master branch: 

  bash:$ stap --version
Systemtap translator/driver (version 5.2/0.188, release-5.2-9-gebee5ff5)
Copyright (C) 2005-2024 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 3.10 ... 6.12-rc
enabled features: BOOST_STRING_REF BPF PYTHON3 NLS

on Debian:

  bash:$ uname -a
Linux thinkpad 6.11.10+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.11.10-1~bpo12+1 (2024-12-19) x86_64 GNU/Linux

Helmut


More information about the Systemtap mailing list