Array overflow when no array is used
Frank Ch. Eigler
fche@redhat.com
Mon Sep 30 14:28:00 GMT 2013
bernat wrote:
> [...]
> It seems that function().return is quite unreliable: it is not reliably
> called and when it is, data when can fetch from there is bogus, most of
> the time.
A common misunderstanding of $variable access in $return probes is
what data exactly is snapshotted. See [man stapprobes] for a little
extra insight; you might find the @entry() construct more intuitive as
regards to the time & data aspects.
probe foo.return {
println ($ptr) # entry-time snapshot of ptr
println ($ptr->value) # entry-time snapshot of ptr->value
println (@entry($ptr->value)) # same, more explicit
println (@entry($ptr)->value) # exit-time ->value dereference of
# entry-time pointer
}
See also <https://sourceware.org/bugzilla/show_bug.cgi?id=5973>, which
should eventually provide a non-explicit-array based passing of data.
- FChE
More information about the Systemtap
mailing list