fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
<jistone>
ggherdov, the standard tapset include "global argc" for the count and a "global argv" array for the values, up to 32 entries
<jistone>
ggherdov, you can also read $# and $1, $2, ... directly
<jistone>
(or @1, @2, ... for string values instead of literal token substitution)
sscox has joined #systemtap
<ggherdov>
jistone: sweet! I was already into generating the stap code with bash :)
wyang123 has joined #systemtap
agentzh has quit [Ping timeout: 272 seconds]
drsmith has joined #systemtap
_whitelogger has joined #systemtap
_whitelogger has joined #systemtap
gila has joined #systemtap
pwithnall has joined #systemtap
slowfranklin has joined #systemtap
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
mjw has joined #systemtap
orivej has quit [Ping timeout: 252 seconds]
_whitelogger has joined #systemtap
orivej has joined #systemtap
pwithnall has quit [Quit: pwithnall]
sscox has quit [Ping timeout: 268 seconds]
wyang123 has quit [Quit: wyang123]
orivej has quit [Remote host closed the connection]
higgins has quit [Write error: Connection reset by peer]
pwithnall has quit [Quit: pwithnall]
pwithnall has joined #systemtap
higgins has joined #systemtap
brolley has joined #systemtap
tromey has joined #systemtap
sscox has quit [Ping timeout: 244 seconds]
sscox has joined #systemtap
<ggherdov>
Hello, how do you get the output of stap (assuming you trace indefinitely and stop it with CTRL-C) to go both on the terminal and on a file on disk?
<ggherdov>
I tried something like "stap -e '...' | tee log.txt" trappint and forwarding SIGINT, but that doesn't work; the terminal seems to kill them all regardless.
slowfranklin has quit [Quit: slowfranklin]
<fche>
could use stap -o log.txt and tail -f the same file in another window?
<ggherdov>
fche: right! I didn't know of -o. thanks
<fche>
yeah we have rather a large number of cmd line options
orivej has quit [Ping timeout: 272 seconds]
* ggherdov
checks `man stap` :)
<fche>
see you in an hour :)
slowfranklin has joined #systemtap
orivej has joined #systemtap
pwithnall has quit [Quit: pwithnall]
wyang123 has quit [Quit: wyang123]
pwithnall has joined #systemtap
pwithnall has quit [Remote host closed the connection]
slowfranklin has quit [Quit: slowfranklin]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #systemtap
fche has quit [Ping timeout: 240 seconds]
fche has joined #systemtap
slowfranklin has joined #systemtap
slowfranklin has quit [Quit: slowfranklin]
agentzh has joined #systemtap
agentzh has left #systemtap [#systemtap]
agentzh has joined #systemtap
<agentzh>
fche: i just fixed the assertion failure "update_visitor::~update_visitor(): Assertion `values.empty()' failed".
<agentzh>
it was due to a bug in update_visitor which lacks an implementation method for visit_compound_expression().
<agentzh>
i'll prepare a patch as part of the comma expr feature patch.
<agentzh>
debug_print() is indeed handy in the context of gdb. thanks for the tip.
<fche>
very good
<agentzh>
i'll deep digging the other bug, ie, the NULL e->tok issue.
<agentzh>
fche: oh, sorry, i meant the void_statement_reducer class lacks a method for visit_compound_expression().
<agentzh>
update_visitor is its super class.
<fche>
righto
<agentzh>
fche: btw, you won't mind adding support for C's comma expressions to the stap script language, right?
<fche>
no strong opinion - can you remind me why you need it?
<agentzh>
mostly 2 reasons:
<agentzh>
1. easier mapping from C code.
<agentzh>
(in the target software)
<agentzh>
2. avoid duplicate applications of side effects in stap macro args
<agentzh>
3. makes for() statement more C like as in for (i = 1, j = 2; j < N; j++, i++)
<agentzh>
i already cannot live without it ;)
<agentzh>
sorry, 3 reasons already :P
<agentzh>
the patch for comma exprs is small due to the fact that the translator already has "compound_expression" for its internal use.
<agentzh>
mostly just changes in the parser.
<agentzh>
oh, and 4) easier to add assertions to stap macros which meant to be used on the expression level.
<agentzh>
or any other side effects.
<agentzh>
mostly from common C tricks :)
<fche>
are the comma subexpressions statements or expressions ?
<agentzh>
it's expression, of course.
<agentzh>
otherwise it's not so useful.
<agentzh>
exactly like in C.
<agentzh>
same precedence, same grammar.
<agentzh>
and same semantics.
<fche>
if we had statement-expressions it'd be another way ... ({ i = 1; j = 2 })
<fche>
and then we could have statements inside too
<agentzh>
yeah, that's another way, the gnu c way :)
<agentzh>
we can have both :)
<agentzh>
the ({...}) thing is overkill for simple cases.
<fche>
wouldn't be surprised if the two converge later on
<fche>
parse/syntax differences only
<agentzh>
maybe, not sure.
pwithnall has joined #systemtap
<fche>
ok, looking forward to your comma patch
<agentzh>
it was already submitted weeks ago but yeah i need to update it with all new fixes like the void stmt reducer fix just mentioned.
<agentzh>
and it needs to be rebased.
<agentzh>
glad you would look at it.
<agentzh>
fche: btw, we're working on the goto stmt support for stap lang.
<agentzh>
it might be a harder sell *grin*
<agentzh>
the "why" part for goto is just easier porting of complex data structure traversal C code from the target software to the stap tool.
<agentzh>
rewriting the control flow using while loops and etc might introduce bugs in the stap tools.
<agentzh>
i just ran into such a case when writing a luajit tool, which makes me hours to debug. alas. hence the work on the stap goto support :)
brolley has left #systemtap [#systemtap]
orivej has quit [Ping timeout: 244 seconds]
* agentzh
is gonna buy a BIG box for stap dev; it's burning CPU cycles!
tromey has quit [Quit: ERC (IRC client for Emacs 26.1.50)]
sscox has quit [Ping timeout: 244 seconds]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]