This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why 'stap -L' shows no variables in some modules?


Hello list!

I'm learning to use systemtap these days. However I find something
stang: I can access local variables and parameters in some modules while
I can't do that in some others. For example:

--1--
	stap -e 'probe kernel.function("sys_*") { printf("%s\n", $$parms$) }'

can print a lot but when I try in module nvme:

	stap -e 'probe module("nvme").function("*") { printf("%s\n", $$parms$) }'

will print nothing but empty lines.


--2--
When I try to check probe points in module ext4:

	stap -L 'module("ext4").function("*")'

This will print available probe points and variables (to be more
accurate, I think they are parms instead of local vars):
	
	module("ext4").function("try_to_extend_transaction@fs/ext4/indirect.c:703") $handle:handle_t* $inode:struct inode*

however when I try it in module nvme:

	stap -L 'module("nvme").function("*")'

it only prints probe points, no variables:

	module("nvme").function("nvme_resume")
	module("nvme").function("nvme_setup_io_queues")
	module("nvme").function("nvme_shutdown")
	module("nvme").function("nvme_slot_reset")
----

#I wonder why they print differently? What determines whether 'stap -L'
shows local vars or not?

# how can I access the local vars when 'stap -L' gives no local vars?

FYI: The kernel I use is 4.11.3 and is built by myself. I think it's
with debuginfo because I turned on the CONFIG_DEBUG_INFO stuff and got a
159MB vmlinux. GDB also gave me positive response loading symbols from
vmlinux and ko files. And the systemtap was built from the updated git
repo.

Since I am not in the list at present (I haven't received any
subscription confirm email somehow), please reply directly to me or cc
me if you are willing to help.


All the best!
Freeman


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]