fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
wyang123 has joined #systemtap
xar- has quit [*.net *.split]
orivej has quit [*.net *.split]
zodbot has quit [*.net *.split]
invano has quit [*.net *.split]
jistone has quit [*.net *.split]
jhg_ has quit [*.net *.split]
higgins has quit [*.net *.split]
_whitelogger has joined #systemtap
przemoc has joined #systemtap
_whitelogger has joined #systemtap
_whitelogger has joined #systemtap
_whitelogger has joined #systemtap
zodbot has quit [Disconnected by services]
zodbot has joined #systemtap
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
orivej has quit [Ping timeout: 244 seconds]
xar- has quit [Ping timeout: 252 seconds]
xar- has joined #systemtap
slowfranklin has joined #systemtap
promach has joined #systemtap
<promach> https://stackoverflow.com/questions/31463066/systemtap-script-to-profile-latency-of-functions have anyone used this to measure linux driver coding latency ?
<promach> note: I am new to systemtap
<promach> Why am I facing this error https://paste.ubuntu.com/p/KyYfgFfcG9/ when using linetimes.stp ?
mjw has joined #systemtap
wyang123 has quit [Quit: wyang123]
orivej has joined #systemtap
<fche> 'morning promac
<fche> promach I mean
<fche> you see two runs with two errors
<fche> linetimes requires detailed debuginfo because that's the only way to identify source lines in binary code
<fche> so in the first case, it's reporting that it can't find the kernel debuginfo, which is fine; # stap-prep or that readme file can usually fix that
<fche> in the second case, you typed "riffa", which it doesn't understand as a probe point name. See [man stapprobes] for the general syntax. e.g. if it's a kernel module riffa.ko you're trying to probe, use module("riffa") in that slot
orivej has quit [Ping timeout: 268 seconds]
orivej has joined #systemtap
wyang123 has joined #systemtap
wyang123 has quit [Quit: wyang123]
<promach> use module("riffa") in that slot gives bash: syntax error near unexpected token `('
slowfranklin has left #systemtap [#systemtap]
<promach> fche : sudo stap linetimes.stp module("riffa") push_circ_queue
<promach> fche: stap-prep gives : You need package linux-image-4.18.6-041806-generic-dbgsym but it does not seem to be available
<fche> module("riffa") would be the systemtap script language syntax
<fche> since you'd be passing it from a shell, you have to quote it: so 'module("riffa")'
<fche> check the README. sometimes you may be running very old or very new kernels, and your distro may not make the matching debuginfo available
<promach> To use systemtap you need to
<promach> manually install the linux-image-*-dbg and linux-header-* packages
<promach> that match your running kernel.
<fche> (To be accurate, that is to use -some- systemtap scripts. others do not require -dbg.)
<fche> it depends on the target program you're trying to trace lines/times of.
<fche> If it's the kernel, then yes you'll need kernel dbg stuff
<fche> with stap you can target any random userspace program too
<promach> what about linux module ?
<promach> such as riffa.ko ?
<fche> that'd need debuginfo only for that .ko file, which may already be compiled in
<fche> then you'd need the kernel header stuff only, not -dbg
<promach> ok
<promach> this does not make sense
<fche> ok.
<promach> and my riffa.ko already contains debug symbol
<fche> where can systemtap find that copy of riffa.ko ?
<promach> since I included "-g" in compilation flag
<fche> Is it installed somewhere under /lib/modules/.... ?
<fche> if not, if it's in some private directory, then use 'module("/full/path/to/riffa.ko")' instead
<promach> /lib/modules/4.18.6-041806-generic/kernel/drivers/riffa/riffa.ko
<promach> fche: I just tried full path, same error
<fche> readelf -S /lib/modules/4.18.6-041806-generic/kernel/drivers/riffa/riffa.ko ?
<promach> fche : here you go: https://paste.ubuntu.com/p/NTjSSrNrns/
<promach> what does this output tell ?
<fche> tells us whether debuginfo is actually in the final .ko
<fche> and it isn't - there aren't any .debug* sections
<fche> one way to make more likely for the out-of-tree module to carry that info is to build it with make ... modules CONFIG_DEBUG_INFO=y
<promach> debuginfo != debug symbol ?
<fche> it is, but depending on how you put in "-g", some subsequent process may have stripped them out again
<fche> so, if the -g information is generated and preserved, that readelf -S should list a half-dozen .debug_* sections
<fche> and that stap script should work :)
<fche> does that make sense? also you could make V=1 to see closer the build process for your module
<promach> fche : what do you mean by "V=1" ?
<fche> change line 101 to make -C $(KDIR) V=1 SUBDIRS=`pwd` modules
tromey has joined #systemtap
wyang123 has joined #systemtap
<promach> fche : sigh, I have done as you have suggested but readelf still does not print any "debug" word
<fche> do you have a trace of the V=1 make process?
<fche> so we can see whether the -g made it, and how far/
<fche> also you could try adjusting that line to say .... CONFIG_DEBUG_INFO=y
wcohen has joined #systemtap
* promach will come back later
* promach is going to another place
<fche> "
<fche> " sounds relevant
<fche> Stripping ELF binaries and libraries...OK
<fche> but the last readelf report looks good.
brolley has joined #systemtap
<wcohen> fche, is all thumbs. :)
wyang123 has quit [Quit: wyang123]
orivej has quit [Ping timeout: 252 seconds]
gila has joined #systemtap
orivej has joined #systemtap
gila has quit [Read error: Connection reset by peer]
gila has joined #systemtap
mjw has quit [Quit: Leaving]
mjw has joined #systemtap
tromey has quit [Quit: ERC (IRC client for Emacs 26.1.50)]
gila has quit [Quit: Textual IRC Client: www.textualapp.com]
mjw has quit [Quit: Leaving]
wcohen has quit [Ping timeout: 252 seconds]
brolley has left #systemtap [#systemtap]
orivej has quit [Ping timeout: 244 seconds]