fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
scox has joined #systemtap
gromero has quit [Ping timeout: 252 seconds]
hpt has joined #systemtap
hpt has quit [Client Quit]
hpt has joined #systemtap
hpt has quit [Ping timeout: 276 seconds]
hpt has joined #systemtap
hpt has quit [Ping timeout: 256 seconds]
hpt has joined #systemtap
orivej has joined #systemtap
orivej has quit [Ping timeout: 240 seconds]
hpt has quit [Ping timeout: 248 seconds]
hpt has joined #systemtap
orivej has joined #systemtap
sanoj has joined #systemtap
orivej has quit [Read error: Connection reset by peer]
orivej has joined #systemtap
sanoj has quit [Ping timeout: 276 seconds]
sanoj has joined #systemtap
orivej has quit [Ping timeout: 248 seconds]
orivej has joined #systemtap
slowfranklin has joined #systemtap
orivej has quit [Ping timeout: 240 seconds]
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
orivej has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
orivej has quit [Ping timeout: 248 seconds]
orivej has joined #systemtap
gila has joined #systemtap
slowfranklin has joined #systemtap
sanoj has quit [Ping timeout: 276 seconds]
hpt has quit [Quit: Lost terminal]
gromero has joined #systemtap
orivej has quit [Ping timeout: 276 seconds]
sanoj has joined #systemtap
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
gila has joined #systemtap
gromero has quit [Ping timeout: 255 seconds]
orivej has joined #systemtap
orivej has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #systemtap
orivej has quit [Ping timeout: 260 seconds]
izabera has joined #systemtap
<izabera> hi, i'm a noob
<izabera> i'm trying to snoop on a particular pipe
<izabera> i can get the number of bytes that have been written
<izabera> but not the actual data
<izabera> my code looks like this https://arin.ga/pVeHDY
<izabera> is @entry taking a snapshot of the entire buffer or just the address?
orivej has joined #systemtap
mjw has joined #systemtap
scox has quit [Ping timeout: 264 seconds]
eck has quit [Quit: we out here]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
eck has joined #systemtap
gila has joined #systemtap
eck has quit [Client Quit]
eck has joined #systemtap
eck has joined #systemtap
orivej has quit [Read error: Connection reset by peer]
orivej has joined #systemtap
gromero has joined #systemtap
orivej has quit [Ping timeout: 240 seconds]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
orivej has joined #systemtap
gila has joined #systemtap
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
gila has joined #systemtap
<fche> izabera, hi
<fche> @entry() takes a snapshot of its parameter so @entry(....->i_ino) saves the (integer) i_ino
<fche> the @entry(->... iov_base) saves the pointer
orivej has quit [Ping timeout: 246 seconds]
<fche> the code you have there looks like it should work - but to be sure, one'd have to know the api of pipe_read
orivej has joined #systemtap
<fche> i.e., where exactly does it deposit the read value; might it edit the iov pointer or change iov_base? not sure
<fche> sorry, not familiar enough with iov_iter struct usage to be sure. lib/iov_iter.c copy_page_to_iter
orivej_ has joined #systemtap
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #systemtap
orivej_ has quit [Ping timeout: 268 seconds]
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
wcohen has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
<izabera> fche: thanks for the reply, i managed to make it work https://asciinema.org/a/156589
<izabera> code is here https://arin.ga/O8g0PN
<fche> woohoo
<fche> yeah, nice use of statement probes - if other stuff doesn't work right, there's always that
<fche> if you want hex dumping, there is printf("%.*M", buffer, length) btw
scox has joined #systemtap
eck has quit [Ping timeout: 268 seconds]
orivej has joined #systemtap
drsmith_away is now known as drsmith
wcohen has joined #systemtap
<izabera> thanks! very helpful
orivej has quit [Ping timeout: 256 seconds]
tromey has joined #systemtap
orivej has joined #systemtap
brolley has joined #systemtap
sanoj has quit [Ping timeout: 248 seconds]
sanoj has joined #systemtap
orivej has quit [Ping timeout: 276 seconds]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<izabera> in this case https://arin.ga/qvDCaE the .return one is not called on the first read
<izabera> why does this happen?
eck has joined #systemtap
<fche> does "stap -t ..." give any hints?
eck has quit [Quit: we out here]
eck has joined #systemtap
<izabera> kernel.function("pipe_read@fs/pipe.c:251").call, (./pipe_snoop.stp:8:1), hits: 989, cycles: 692min/11643avg/52024max, variance: 51126141, from: kernel.function("pipe_read@fs/pipe.c:251").return from: kernel.function("pipe_read").return, index: 1
<izabera> kernel.function("pipe_read@fs/pipe.c:251").return, (./pipe_snoop.stp:8:1), hits: 988, cycles: 695min/4365avg/34556max, variance: 3455220, from: kernel.function("pipe_read@fs/pipe.c:251").return from: kernel.function("pipe_read").return, index: 2
<fche> 989 vs 988 interesting
<izabera> kernel.statement("pipe_read@fs/pipe.c:292"), (./pipe_snoop.stp:3:1), hits: 988, cycles: 217min/2229avg/35708max, variance: 2765291, from: kernel.statement("pipe_read@fs/pipe.c:292") from: kernel.statement("pipe_read@fs/pipe.c:292"), index: 0
<izabera> this is the other function
<izabera> also 988 times
eck has left #systemtap ["we out here"]
orivej has joined #systemtap
gila has joined #systemtap
<izabera> if i explicitly create a .call function, it's called correctly all the times, including the first time
<fche> interesting
<fche> the kernel doesn't guarantee invocation of all/any of our probes
<fche> stap -t would include counts if -it- decided to reject/abort a probe hit
<fche> so if we never get invoked, we can't really know
<izabera> i'm sorry, .return is called, but @entry(...) isn't what i'm expecting
orivej has quit [Quit: No Ping reply in 180 seconds.]
<izabera> https://arin.ga/l43ali this shows what i mean
<izabera> the first time .statement is called, .call is also called and it prints interesting, then .return is called and it prints callcount: 1
orivej has joined #systemtap
<izabera> and if i save the inode in a global variable from .call, the value in .return is correct
tromey has quit [Read error: Connection reset by peer]
<izabera> looks like something's going wrong but it's not my fault...?
<fche> quite possibly
* fche hasn't heard of kernel bugs related to this part
<fche> might want to print the @entry(...) value as well as the global var copy of the same value
<izabera> i did and it's different
<izabera> it's some other pipe in my system
<fche> interesting - careful that the global copy is -the- pipe of interest. remember if multiple threads/cpus are doing the same sort of thing at the same time
<fche> array index by [tid()] better
orivej has quit [Ping timeout: 256 seconds]
slowfranklin has left #systemtap [#systemtap]
sanoj has quit [Ping timeout: 265 seconds]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
orivej has joined #systemtap
sanoj has joined #systemtap
mbenitez has quit [Quit: To lunch / office]
khaled has joined #systemtap
<khaled> Hi systemtap gurus, I have a question, I am probing a C++ userspace program and need to know how to print the c_str out of the ostream object
<khaled> stap -L 'process("/usr/lib/x86_64-linux-gnu/libshibsp.so.6.0.3").function("serialize")'
<khaled> process("/usr/lib/x86_64-linux-gnu/libshibsp.so.6.0.3").function("serialize@remoting/impl/ddf.cpp:829") $p:struct ddf_body_t* $os:ostream& $name_attr:bool
<khaled> I need to print $os
<khaled> I hope I was able to present my question clearly :-)
<fche> hi khaled
<khaled> Hello fche
<fche> Calling the .c_str() function sure sounds tasty but unfortunately can't do that from stap
<fche> we'd instead have to dig into the implementation of the ostream object, find its buffer, and look around in there
<fche> basically emulate c_str() in script language
<fche> it's possible but I don't have code for that just now ... it seems like a nice thing to have in the standard tapset library though.
<fche> short of that, if you're able to recompile the program, you could add STAP_PROBE type macro calls in there, passing in the foo.c_str() value (as computed in c++)
<khaled> Unfortunately, program recompilation is not an option, So to go with the internals of the ostream approach, Which dybugging symbols do I need to have there for STL?
<fche> if your program was compiled with -g it should already be in there, c++ being inline/template-heavy
<fche> but libstdc++ debuginfo may be handy too
<fche> I'd proceed by ... hm, trying to pretty-print $os$ then $os->FIELD_OF_INTEREST$ and so on until a buffer pointer is found
<fche> (or do it from gdb)
<fche> we have been working on a 'tutorial mode' in systemtap which I hope will give this sort of incremental exploration capability
<khaled> I hope so, I'll try this tomorrow and will keep you updated, But as you said this should be a nice feature to be added to the standard tapsets
<fche> definitely
<fche> if you get it working, we'd be glad to steal its guts and put it into the library
<khaled> Sure :)
lindi-_ has quit [Ping timeout: 252 seconds]
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
khaled has quit [Quit: This computer has gone to sleep]
tromey has joined #systemtap
khaled has joined #systemtap
khaled has quit [Client Quit]
orivej has quit [Ping timeout: 248 seconds]
slowfranklin has joined #systemtap
slowfranklin has quit [Client Quit]
slowfranklin has joined #systemtap
orivej has joined #systemtap
mjw has quit [Quit: Leaving]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
tromey has quit [Ping timeout: 260 seconds]
tromey has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
slowfranklin has joined #systemtap
irker794 has joined #systemtap
<irker794> systemtap: dsmith systemtap.git:refs/heads/master * release-3.2-79-gda3464e / python/Makefile.am python/Makefile.in: Fix PR22695 by reverting a python subdirectory's Makefile.am. http://tinyurl.com/y7fplwob
drsmith is now known as drsmith_away
drsmith_away is now known as drsmith
gila has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
sanoj has quit [Ping timeout: 276 seconds]
slowfranklin has joined #systemtap
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
gila has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
orivej has quit [Ping timeout: 248 seconds]
tromey has quit [Quit: ERC (IRC client for Emacs 26.0.90)]
wcohen has quit [Ping timeout: 256 seconds]
scox has quit [Ping timeout: 256 seconds]
mbenitez has quit [Quit: Leaving]
drsmith is now known as drsmith_away
higgins has quit [Quit: Leaving]
higgins has joined #systemtap
irker794 has quit [Ping timeout: 240 seconds]
gila has quit [Ping timeout: 260 seconds]
brolley has left #systemtap [#systemtap]
przemoc has quit [Ping timeout: 268 seconds]
wcohen has joined #systemtap