fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
<irker390>
systemtap: fche systemtap.git:refs/heads/rth/bpf * release-3.0-124-gae44c95 / stapbpf/stapbpf.cxx: stapbpf main "loop": absorb SIGTERM, not just SIGINT http://tinyurl.com/j44ezsc
hpt has joined #systemtap
fiona_xu has joined #systemtap
scox has quit [Ping timeout: 244 seconds]
eck has quit [Quit: WeeChat 1.0.1]
naveen has joined #systemtap
hkshaw has quit [Quit: Leaving.]
ananth has joined #systemtap
ravi has joined #systemtap
drsmith has left #systemtap [#systemtap]
<lukas`>
fche: I had one more idea how to help make the SystemTap to spread out - it would be helpful if one could easily resolve errors (like error messages) on any distro (ar at least on a modestly popular distro). For me on Gentoo, the error messages and lack of knowledge reacheable by Google previously was a showstopper.
<lukas`>
Maybe most of the bugs is being resolved in production running on RHEL or SuSE or so, but I guess that most of the users/geeks/devs do experiment with tools they want to introduce and if the tool brings at least some level of uncertainty (what are those errors, can they appear once I try to introduce the tool to my colleagues and my boss, can anyone fix them ...), you loose the interest of technical stuff and natura
<lukas`>
lly do not reach the interest of management.
<lukas`>
Just to clear out, geeks of course do not give up and do not get frustrated from a error message, but considering you are getting closer to the kernel (the place where you need to know quite a lot before you can start playing with things), the loose of interest is more likely.
irker390 has quit [Quit: transmission timeout]
hkshaw has joined #systemtap
cbzx has quit [Quit: Konversation terminated!]
srikar_away is now known as srikar
ph7 has joined #systemtap
ego has joined #systemtap
ph7 has quit [Quit: Leaving.]
lukas` has quit [Ping timeout: 244 seconds]
nkambo has joined #systemtap
srikar is now known as srikar_away
srikar_away is now known as srikar
ph7 has joined #systemtap
nkambo has quit [Read error: Connection reset by peer]
nkambo has joined #systemtap
ph7 has quit [Quit: Leaving.]
ph7 has joined #systemtap
ravi has quit [Ping timeout: 250 seconds]
ph7 has quit [Quit: Leaving.]
ph7 has joined #systemtap
ravi_ has joined #systemtap
darvon has quit [Ping timeout: 260 seconds]
darvon has joined #systemtap
gila has joined #systemtap
hpt has quit [Ping timeout: 244 seconds]
ravi_ has quit [Ping timeout: 246 seconds]
dmalcolm has joined #systemtap
ravi_ has joined #systemtap
mjw has joined #systemtap
ananth has quit [Ping timeout: 250 seconds]
drsmith has joined #systemtap
ravi_ has quit [Quit: Leaving]
fiona_xu has quit [Quit: Leaving.]
fiona_xu has joined #systemtap
ananth has joined #systemtap
fiona_xu1 has joined #systemtap
fiona_xu has quit [Remote host closed the connection]
fiona_xu1 has quit [Ping timeout: 240 seconds]
srikar is now known as srikar_away
hpt has joined #systemtap
csanting has quit [Quit: Leaving]
csanting has joined #systemtap
wcohen has quit [Ping timeout: 246 seconds]
wcohen_ has quit [Ping timeout: 244 seconds]
drsmith is now known as drsmith_away
drsmith_away is now known as drsmith
fiona_xu has joined #systemtap
drsmith has left #systemtap [#systemtap]
drsmith has joined #systemtap
mbenitez has joined #systemtap
mbenitez has quit [Changing host]
mbenitez has joined #systemtap
hpt has quit [Ping timeout: 264 seconds]
scox has joined #systemtap
wcohen_ has joined #systemtap
wcohen has joined #systemtap
ananth has quit [Ping timeout: 258 seconds]
srikar_away is now known as srikar
brolley has joined #systemtap
nkambo1 has joined #systemtap
nkambo has quit [Read error: Connection reset by peer]
<irker940>
systemtap: fche systemtap.git:refs/heads/master * release-3.0-118-gbe665e7 / stap-server systemtap.spec: RHBZ1346112: let stap-server create ssl-cert on first run rather than install http://tinyurl.com/z726mcx
srikar is now known as srikar_away
ph7 has quit [Quit: Leaving.]
fiona_xu has quit [Ping timeout: 252 seconds]
srikar_away is now known as srikar
ph7 has joined #systemtap
wcohen has quit [Remote host closed the connection]
wcohen_ has quit [Remote host closed the connection]
ananth has quit [Quit: Leaving]
wcohen has joined #systemtap
jemarch has joined #systemtap
<jemarch>
mjw: did you write systemtap/dwflpp.cxx? :)
<jistone>
jemarch, mjw probably wrote large chunks of it, but others have too... do you have a question about it?
ph7 has quit [Quit: Leaving.]
naveen has quit [Quit: Leaving.]
<jemarch>
yeah
<jemarch>
I have a working systemtap sparc port, and I will submit it soon upstream.
<jemarch>
but
<jemarch>
in sparc the variable tracking information is not valid at the first instruction of a non-leaf function, i.e. at the SAVE instruction. Thus we need to use -P to skip the prologue. However, that doesn't work too well along with -profile-generate
ego has joined #systemtap
<fche>
is that with reasonably modern gcc? should consider filing a bug
<jemarch>
yep
<jemarch>
I have it in my todo :)
<jemarch>
but regarding systemtap, this is what breaks -P with -profile-generate, at least in sparc:
<jemarch>
// Same file and line, is this a second line record (e.g. 0-line advance)?
<jemarch>
if (postprologue_srcline_idx != entrypc_srcline_idx)
<jemarch>
break;
<jemarch>
(in dwflpp::resolve_prologue_endings)
<jemarch>
the reason is that GCC generates a 0-line advance .loc for the profile instructions, located at the same line than the prologue, i.e. the '{' starting the function
hkshaw has quit [Quit: Leaving.]
<fche>
those heuristics are periodically tweaked ; distance to perfection = unknown
hkshaw has joined #systemtap
<jemarch>
I don't understand why resolve_prologue_endings stops when it finds a 0-line advance .loc in the same line than startpc
<jemarch>
fche: yes, I understand :)
ph7 has joined #systemtap
<irker940>
systemtap: csanting systemtap.git:refs/heads/csanting/PR11637 * release-3.0-99-g73ec640 / testsuite/systemtap.base/set_user.c testsuite/systemtap.base/set_user.stp: PR11637: Updated probe point for test case http://tinyurl.com/zwy8aka
ph7 has quit [Quit: Leaving.]
<mjw>
jemarch, I hacked a little on it and loc2c, but it wasn't designed by me
lukas` has joined #systemtap
<mjw>
in fact I suspect there dwflpp and loc2c were designed by two different people, one wanting a plain C interface with some callbacks and one wanting a c++ class interface
<mjw>
jemarch I think it does that because gcc doesn't emit prologue end markers in DWARF so it has to use some heuristic to determine when the prologue has ended and it does that by looking for the first "duplicate" line marking.
<mjw>
See also elfutils libdw/dwarf_entry_breakpoints.c which has a bit of explanation about the ad-hoc style
<jemarch>
hmm
<jemarch>
yes
<jemarch>
but that specific part of the heuristic is what I don't understand
<jemarch>
the skipping of 0-line advance .locs
<jemarch>
if you remove that part, everything works great in sparc, both with and without -profile-generate
<mjw>
/* ??? TODO: Elide duplicate line number entries. Traditionally,
<mjw>
the debugger has used the second (possibly duplicate) line number
<mjw>
at the beginning of the function to mark the end of the prologue.
<mjw>
Dwarf3, we ought to include the DW_LNS_set_prologue_end mark in
<mjw>
We could eliminate any other duplicates within the function. For
<mjw>
that second line number entry. */
<mjw>
I see rth is on this channel now. I think he wrote that comment.
<rth>
mjw: Yes, I think I did. Quite some time ago...
<jemarch>
yes, I understand GCC emits duplicated line number entries for the prologue. Hence, why does systemtap stop after the first? That is not the real prologue ending.
<jemarch>
bleh, stupid pointless meeting time, sorry :(
nkambo1 has quit [Ping timeout: 250 seconds]
<mjw>
jemarch, I might misunderstand, but we don't have any other way to know where the prologue ends?
<mjw>
and given that we cannot rely on location information being correct till the end of the prologue we have no other choice?
<jlebon>
jemarch: sorry for jumping in, might be missing context here, but it seems like the 0-line advances are for different things here. in your case (-profile-generate), it's at the prologue start. but the 0-line advances stap (and e.g. gdb) looks for denotes the prologue end
ph7 has joined #systemtap
<jemarch>
hmm
<jemarch>
ok, let me rephrase it
<jemarch>
for a:
<jemarch>
int foo ()
<jemarch>
{
<jemarch>
without -pg, gcc generates a .loc for the "{" line that marks the beginning of the prologue instructions, followed by a .loc for the line with the first instruction int he function. This second .loc marks the end of the prologue.
<jemarch>
with -pg, generates a first .loc for the "{" line that marks the beginning of the prologue instructions, followed by a second .loc for the "{" line (same line) that marks the beginning of the profile instructions, followed by a third .loc for the line with the first instruction in the function. This _third_ .loc marks the end of the prologue.
<jemarch>
that little snipped from dwflpp::resolve_prologue_endings I pasted above makes systemtap to think that the second .loc is the end of the prolgoue. If I remove it, it correctly identifies the third .loc as teh end of the prologue.
<jemarch>
so, the problem is that with that heuristic systemtap is _not_ skipping 0-line advances :)
* jemarch
feels confused
<jemarch>
hm, let me look at what GDB does, and also at GCC, and get a clue of what is going on here :)
<jlebon>
jemarch: the problem is that if the function is written as int foo () { /* all on one line }, stap will have no way of knowning which 0-line advance is the real end marker
<jlebon>
but then again, it's been a long time since i've looked at this code, so i might be forgetting :)
<jemarch>
aaah, so that is why the 0-advance loc heuristic is there. Now I get it :)
<jemarch>
unfortunately, the heuristic breaks with -pg, also in the cases where { stands in a line by itself
<jlebon>
right, because stap can't know :)
<jlebon>
if there are some distinguishing features between the two 0-line advances, it could make use of that. worse case, you could check the producer string but... yuck :)
<jemarch>
yeah
<mjw>
ewww
<mjw>
so it also depends on whether or not someone writes GNU-style or not?
<mjw>
Is there a difference between
<mjw>
int foo() {
<mjw>
...
<mjw>
and
<mjw>
int
<mjw>
foo ()
<mjw>
{
<mjw>
...
<mjw>
?
* mjw
cries a little
<mjw>
Oops, and now it is time for my silly meeting
<jemarch>
mjw: silly meetings everwhere :D
<gila>
Im using a function(".*").return to figure out where in a library -- an error is returned to my program. However, one function (perhaps more) are void and don't return at all so stap complains about if ($return != 0) { ... } saying it has no return value... for that function -- how can I tell it to skip it and continue?
ph7 has quit [Quit: Leaving.]
ph7 has joined #systemtap
<fche>
if (@defined($return) && $return != 0) ...
<fche>
gila ^^
<gila>
ah! sweet thx fche
ph7 has quit [Quit: Leaving.]
lukas` has quit [Ping timeout: 250 seconds]
irker940 has quit [Quit: transmission timeout]
mjw has quit [Quit: Leaving]
mbenitez has quit [Quit: Leaving]
wcohen has quit [Ping timeout: 246 seconds]
brolley has left #systemtap [#systemtap]
drsmith has left #systemtap [#systemtap]
wcohen has joined #systemtap
wcohen has quit [Ping timeout: 240 seconds]
gila has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
ton31337_ has joined #systemtap
serhei_ has joined #systemtap
eichiro_ has joined #systemtap
wcohen has joined #systemtap
srikar_a` has joined #systemtap
srikar_a` is now known as srikar
srikar_away has quit [*.net *.split]
ton31337 has quit [*.net *.split]
serhei has quit [*.net *.split]
eichiro has quit [*.net *.split]
eichiro_ is now known as eichiro
sjas_ has joined #systemtap
sjas has quit [Read error: Connection reset by peer]