This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: disabled interrupts (Was bug #2293
On Mon, 2006-02-27 at 15:01 -0500, Frank Ch. Eigler wrote:
> hunt wrote:
>
> > The runtime calls probe_end(), and it used to know it was safe to sleep
> > while in probe_end(). So if it attempted to send data and no buffers
> > were available, it would sleep a bit (allowing stpd to precess the data)
> > and retry (up to a limit), thus ensuring 100% of the data got sent.
>
> You must be referring to the msleep() loop in _stp_transport_send.
> Isn't that conditional on the "exit is pending" flag, which is set
> considerably earlier than the beginning of first "end" probe handler?
You are thinking of _stp_exit. _stp_exit_called is the flag we are
interested in.
int _stp_transport_write (void *data, int len)
{
/* when _stp_exit_called is set, we are in probe_exit() */
/* and we can sleep */
if (_stp_exit_called)
return _stp_transport_send (STP_REALTIME_DATA, data, len);
return _stp_write(STP_REALTIME_DATA, data, len);
}
>From _stp_cleanup_and_exit()
if (!_stp_exit_called) {
_stp_exit_called = 1;
probe_exit();
I'm going to move the _stp_exit_called to the other side of probe_exit()
for now. And I'm going to put a loop to wait on empty buffers before
probe_exit(). That's about all I can do.
Martin