fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
darvon has joined #systemtap
hkshaw has quit [Quit: Leaving.]
hpt has joined #systemtap
prerna has joined #systemtap
prerna has quit [Quit: This computer has gone to sleep]
hkshaw has joined #systemtap
hkshaw has quit [Client Quit]
prerna has joined #systemtap
prerna has quit [Quit: This computer has gone to sleep]
prerna has joined #systemtap
prerna has quit [Quit: This computer has gone to sleep]
joko has quit [Ping timeout: 250 seconds]
naveen has joined #systemtap
joko has joined #systemtap
naveen has quit [Quit: Leaving.]
ph7 has joined #systemtap
ph71 has joined #systemtap
ph7 has quit [Ping timeout: 264 seconds]
ph71 has quit [Quit: Leaving.]
ph7 has joined #systemtap
mjw has joined #systemtap
hpt has quit [Ping timeout: 260 seconds]
wcohen has quit [Ping timeout: 250 seconds]
srikar_away is now known as srikar
wcohen has joined #systemtap
srikar is now known as srikar_away
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
drsmith has joined #systemtap
ph7 has quit [Quit: Leaving.]
hchiramm_ has joined #systemtap
prerna has joined #systemtap
prerna has quit [Client Quit]
prerna has joined #systemtap
prerna has quit [Client Quit]
prerna has joined #systemtap
prerna has quit [Client Quit]
<lorddoskias1>
does systemtap have a way to log to dmesg?
<lorddoskias1>
e.g. a function which would do that?
<flu_>
lorddoskias1, you can try the printk tapset function in tapset/linux/logging.stp
<lorddoskias1>
right, thanks
joko has quit [Ping timeout: 250 seconds]
brolley has joined #systemtap
joko has joined #systemtap
drsmith is now known as drsmith_away
drsmith_away is now known as drsmith
ph7 has joined #systemtap
hchiramm_ has quit [Ping timeout: 250 seconds]
tromey has joined #systemtap
ph7 has quit [Quit: Leaving.]
<gila>
lorddoskias1 there is also the system action (or exec.. cant recall) so you could logger(1M)
<gila>
that should read call logger
<fche>
yup, those are the two easiest ways
<fche>
printk() is not safe from all contexts (thus marked with /* guru */ )
srikar_away is now known as srikar
<fche>
system(sprint("/usr/bin/logger %s", message)) is safe (but will be a bit delayed)
hchiramm has joined #systemtap
<p53ud0nym>
Is "$ret" a predefined keyword? I have the variable "ret" that I woudl like to change. How would I specify the varible ret instead of the SysTap return value?
<fche>
p53ud0nym, see [man stapprobes] for the types of $variables available
<fche>
changing $ret should work fine; I'm not sure what you mean by 'systemtap return value'
srikar is now known as srikar_away
wrwilliams has quit [Ping timeout: 250 seconds]
<p53ud0nym>
I don't understand how this is soo difficult to do. I'm trying to hook a specific function in a kernel module and modify its return value.
<fche>
yeah, the compiler will not guarantee you/us that any particular source line number will be uniquely-enough mapped to an object code address
<fche>
(btw stap has line-range statement probes too: .statement("*@drivers/mod.c:1003-1010")
<fche>
so if the .function.return probe alone is not enough (if say you need to examine some other state beforehands), consider using a .return probe (to override $return), -and- a .statement probe to record the goings-on
<fche>
those probes can communicate via script-level global variables.
<p53ud0nym>
Thanks, i'll try it out.
<fche>
you could also try compiling the module (if it's a custom one) with less optimization
<p53ud0nym>
hmm, now in a module(...).function(...).return probe. The function returns a variable localy defined as ret i.e. `return ret`.
<p53ud0nym>
When i try to modify this in a return probe i gte the following error
<p53ud0nym>
semantic error: write to target variable not permitted in .return probes: identifier '$ret'
<fche>
$return there
<p53ud0nym>
It worked...
<p53ud0nym>
The C code is "return ret;"...
<p53ud0nym>
Thank you!!
<jistone>
$ret tries to access a local by that name; $return uses the actual return value as described by dwarf, in .return probes only -- note in general this might not have any local name at all (could be any expression)