This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Array overflow when no array is used


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]