fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
<toothe> alright, I'm now running Cinammon - looks great.
<toothe> like I said, I am not too particular on which distro I run. I prefer to use LInux, not worry about distro hopping.
<fche> welcome aboard
<toothe> do you work for Redhat?
<fche> ''work'' is relative :)
<fche> getting late though
<toothe> you enjoy it.
<fche> SOMETIMES
<fche> but don't tell the boss
<fche> so on the downside, sometimes fedora kernels do get ahead of fedora systemtap
<fche> on the upside, the buck stops with our team here, so yeah we get on that and backport whatever needs to be done as soon as we realize the problem
<toothe> i submitted a bug report before switching distros, heh.
<fche> I think I saw that.
<fche> my minions are embedded everywhere
<toothe> oh? did you really?
<toothe> that's interesting.
<toothe> I was reasonably descriptive.
<fche> yup, looked good
<toothe> yeah, I ran into this same issue when I was compiling a vmware kernel module - I hacked it a bit until it worked (didn't I say this earlier?)
mmarchini has quit [Ping timeout: 240 seconds]
<fche> you did
<fche> maybe it's late for both of us :)
hpt has joined #systemtap
<toothe> wow, this is nice. There are no file location information in the Fedora stap -l
<toothe> so, I'll read the man page in bed in a bit -- but I noticed it doesn't list functoin pointers, but the actual function itself.
<toothe> that's different from dtrace.
<toothe> hm...I tried several examples, not able to get a function's arguments printed.
<toothe> i'm using probe module("rtl_pci").function("pci_write32_async") { printf("write 32: %s\n", $$parms$$); }
<toothe> I tried $$parms, $$parms$$, and a few other things...odd
<toothe> hm...apparently there's a pckage I need called debuginfo, but I don't see it anywhere.
hpt has quit [Ping timeout: 252 seconds]
hpt has joined #systemtap
<toothe> oh, there we go - I didn't have the right debugging packages.
hpt has quit [Ping timeout: 240 seconds]
hpt has joined #systemtap
sanoj has joined #systemtap
_whitelogger has joined #systemtap
gromero has quit [Ping timeout: 255 seconds]
sanoj has quit [Quit: Leaving]
sanoj has joined #systemtap
nkambo has joined #systemtap
sanoj_ has joined #systemtap
sanoj has quit [Ping timeout: 252 seconds]
tonyj has quit [Remote host closed the connection]
irker880 has quit [Quit: transmission timeout]
sanoj_ has quit [Ping timeout: 240 seconds]
sanoj_ has joined #systemtap
mjw has joined #systemtap
hpt has quit [Quit: Lost terminal]
sanoj_ has quit [Quit: Leaving]
sanoj has joined #systemtap
gila has joined #systemtap
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #systemtap
orivej has quit [Ping timeout: 240 seconds]
<fche> toothe, yea, for some types of probes/constructs, the debuginfo (~ debian .dbgsym) is required, because you're asking stap to do the same kinds of source-level things as gdb does
<fche> on solaris, a small but cleverly chosen subset of that debugging info is always embedded in the main binaries
pwithnall_ has joined #systemtap
pwithnall_ has quit [Quit: pwithnall_]
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
mbenitez has quit [Ping timeout: 260 seconds]
mbenitez has joined #systemtap
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
sanoj has quit [Ping timeout: 248 seconds]
mbenitez has quit [Quit: Leaving]
sanoj has joined #systemtap
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
gromero has joined #systemtap
wcohen has quit [Ping timeout: 240 seconds]
sanoj has quit [Ping timeout: 240 seconds]
drsmith_away is now known as drsmith
drsmith is now known as drsmith_away
drsmith_away is now known as drsmith
sanoj has joined #systemtap
sanoj has quit [Ping timeout: 246 seconds]
wcohen has joined #systemtap
brolley has joined #systemtap
tromey has joined #systemtap
<toothe> so, when I installed a newer kernel, the debugging symbols seemed to quit working.
<toothe> whene I reverted back to 4.11, they appeared again - attempting to install the debug symbols said "They are already installed"
<toothe> hm..Dont' really feel like hacking that at the moment.
<toothe> need to figure out how to selectively print out a variable based on who called the probed function.
<fche> hi
<fche> try # stap-prep to align the installation stars
<toothe> howdy!
<toothe> let me give that a go when I get home! I'm currently remote to the machine.
<fche> other than that, the stap script proper should be pretty straightforward ... probe kernel.function("foo") { if (caller() =~ "otherfn") println($var$) } /* e.g. */
<toothe> ahh, caller() -- so, I was reading some documentation last evening. I still haven't figured this stuff out...
<fche> once this silly debuginfo stuff is figured out, you'll have fun experimenting
<toothe> well, i just rebooted back to an earlier kernel
irker574 has joined #systemtap
<irker574> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-288-g9f2fa5f / runtime/pmap-gen.c: Fix PR22151 by not trying to use a pmap when it is NULL. http://tinyurl.com/y95w7uk8
<irker574> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-291-g0fd3683 / : Merge branch 'master' of ssh://sourceware.org/git/systemtap http://tinyurl.com/y7bhgvwt
<toothe> yeah, i read the man page - apparently this compiles a kernel module and installs it.
<toothe> that's different than dtrace.
<fche> different environment & community required a different approach
<toothe> Right.
<toothe> So, running printf("%s\n", caller()); gives me the address of caller, but not the name.
<fche> if stap can't figure out the name it may just give you the address
<toothe> hm...is that potentially a bug on my system?
<fche> nah, probably not
<toothe> why would it not have the function name? the addr of the function changes, no?
<fche> what function are you probing ?
<toothe> module("rtl_pci").function("pci_write32_async")
<toothe> maybe I should explain what I am trying to do?
<fche> what module/kernel-image -would- call that module function ?
<fche> try stap --all-modules .....
<toothe> In my use-case, it would be called by functions in the module rtl8188ee
<toothe> there are 3 modules that build off each other rtlwifi -> rtl_pci -> rtl8188ee
<toothe> rtlwifi is realtek's general functions, rtl_pci is specific to PCI, RTL8188ee is specific to a certain wifi card.
<toothe> so, rtl8188ee reaches back to rtl_pci
<fche> ok. so one other thing to understand about stap is that to do backtraces / symbol lookup, it needs to know in advance which modules/object-files you might want to look up within
<fche> it has no a-priori knowledge about rtlwifi etc.
orivej has joined #systemtap
<irker574> systemtap: penguin-kernel systemtap.git:refs/heads/master * release-3.1-292-g589859d / runtime/linux/task_finder.c runtime/linux/task_finder2.c: Fix PR22155 by avoiding a kernel panic. http://tinyurl.com/y9sm3ukv
<toothe> fair, you probably don't need to. hopefully I can convert over the concepts you explain :)
<fche> so stap --all-modules (and related options) tell stap that you'll be interested in module/kernel interactions that go beyond the probe point you already listed
* toothe runs.
<toothe> runs that command
<fche> duck
<toothe> I read the manual as well. That didn't seem to change antyhing when running it.
<fche> try print_backtrace() in that probe point
* toothe reads the manual and tries.
<toothe> so, this seems to identify the caller as rtl8188ee
<toothe> but, the no name.
<toothe> no name*
<fche> and this is with stap --all-modules? interesting
<fche> try stap -d rtl8188ee
<fche> and --all-modules just for giggles
<fche> the point is to let stap know you'll be working through this other module too
<toothe> so, I ran all-modules earlier, it seemed to require a script.
<fche> yes, it's an -additional- option
<toothe> stap -d rtl8188ee (a script must be specified)
<fche> to your -c CMD or -e SCRIPT
<fche> yes
<toothe> I'm confused...
<fche> stap --all-modules ....YOUR...PREVIOUS...OPTIONS...INSERT....HERE.....
<toothe> ahh, that did it.
<fche> there you go
<fche> step 4. profit
<toothe> lol, thank you very much!
<fche> my pleasure, sorry there are so many hoops
<toothe> and sorry for 21 questions. I am jsut getting started.
<fche> hm did that backtrace() run print a warning about missing unwind/symbols earlier?
<toothe> I see...so, -d module1 -d module2 -d module3 works.
<toothe> yes, it prints out the symbol names now!
<toothe> you know, I really want to contribute to the FOSS community
<toothe> this is why I'm diong this.
<fche> welcome on board
<toothe> I just ran into this error: [man error::pass5]
<toothe> I am not certani how to access error::pass5. Is that somehow read in the manuals?
pwithnall_ has joined #systemtap
<toothe> just ran into this: ERROR: probe overhead exceeded threshold
<toothe> but, I see that manual syntax quite a bit and was not familiar with it.
<fche> yeah, had to think of some syntactic way of making that command stand out
<fche> error::pass5 is merely a file name with punctuation in the middle
<fche> see 'resource exhaustion' section
pwithnall_ has quit [Quit: pwithnall_]
sfix has quit [Ping timeout: 248 seconds]
sfix has joined #systemtap
<toothe> so, how does one locate "error::pass5"? Is that within the stap man page?
slowfranklin has joined #systemtap
mbenitez has quit [Quit: To lunch/office]
orivej has quit [Ping timeout: 240 seconds]
<toothe> hm..I can't seem to get past this error heh.
<toothe> ha! just found your response on this from 2012: https://sourceware.org/ml/systemtap/2012-q1/msg00293.html
<fche> toothe, you just type man error::pass5
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
wcohen_ has joined #systemtap
wcohen has quit [Read error: Connection reset by peer]
<toothe> interesting.
wcohen_ is now known as wcohen
<toothe> so, I have not been able to figure out how to say "if this function exists in the stack"
<toothe> I see numerous *stack*() related functions, but nothing that I can manipulate to work.
<fche> anywhere in the call chain?
<fche> maybe if (sprint_backtrace() =~ "fnregexp") ...
<fche> except backtraces may be too long to store in a stap string, but worth a shot
<fche> otherwise, would need to tokenize & iterate on the backtrace()-returned list-of-hex-addresses
<toothe> yes.
<toothe> ahh, ~= is regex. I didn't realize.
<toothe> yes, I figured that is what I would do. tokenize it.
<toothe> just thinking as a programmer, that seemed most efficient.
<toothe> okay ,I think I might have just constructed what I needed...
<toothe> awesome!
<toothe> I haven't gotten the tokenization yet, but the gist of this seems to work.
<fche> there is a tokenize function
<fche> but you shouldn't need it, if the regex works well enough for you
<toothe> cool. I'm just worried about it dropping data due to performance.
<toothe> I used -DSTP_NO_OVERLOAD
<fche> backtracing is not super cheap, esp. with symbol lookup
<fche> but if that's what you need, you do what you gotta do
pwithnall_ has joined #systemtap
<toothe> yes, I am looking to see every write
<toothe> and i really can't have a dropped message...
wcohen has quit [Ping timeout: 240 seconds]
orivej has joined #systemtap
wcohen has joined #systemtap
<toothe> fche: did you write this tool?
<fche> gosh no
<fche> had many helpers
<toothe> err, not entirely, but partially.
wcohen has quit [Ping timeout: 252 seconds]
<irker574> systemtap: dsmith systemtap.git:refs/heads/master * release-3.1-293-g4268c79 / client-http.cxx: Add some http client updates. http://tinyurl.com/yanxxua6
drsmith is now known as drsmith_away
gromero has quit [Ping timeout: 240 seconds]
wcohen has joined #systemtap
<toothe> I see a line during my taps that doesn't make sense when I read the code.
<toothe> Is there a way to debug using maybe kgdb and view the actual code?
<toothe> the soruce
<toothe> I'm seeing an extra line of code that doesn't make sense when I trace it manually.
<fche> the stap-generated c code is observable, e.g. if you run stap -k ....etc....
<fche> haven't tried kgdb'ing through it
mbenitez has quit [Quit: Leaving]
<toothe> sorry, I didn't phrase that
<toothe> properly*
<toothe> I see line 1 executed, line 2, line 3, but then I see a random thing between 3 and 4.
<fche> compiler optimizations make code nonlinear sometimes
<toothe> ohhh, no no, it was the kernel code updating!
<toothe> no, you coudl not optimize this bit - the driver code on github is enwer than kernel 4.11
wcohen has quit [Ping timeout: 252 seconds]
<toothe> ah, also, inline functions don't seem to work well.
scox has quit [Ping timeout: 240 seconds]
_whitelogger has joined #systemtap
brolley has left #systemtap [#systemtap]
lberk has joined #systemtap
Humble has joined #systemtap
wcohen has joined #systemtap
tomeu has left #systemtap ["Good Bye"]
<toothe> hm...so I just installed the debuginfo package
<toothe> but when I switched to kernel 4.12, I get memory addresses instead of symbol names.
<toothe> okay...now 4.11 is failing to print symbol names as well.
<toothe> That's odd...