This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Controlling probe overhead
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>, "David Smith" <dsmith at redhat dot com>
- Cc: <systemtap at sources dot redhat dot com>
- Date: Wed, 14 Mar 2007 16:37:45 -0700
- Subject: RE: Controlling probe overhead
Frank Ch. Eigler wrote:
>> cycles_t interval = (cycles_atend > c->cycles_base)
>> ? (cycles_atend - c->cycles_base)
>> : (STP_OVERLOAD_INTERVAL + 1);
>
> BTW right here is where it will break if the actual hardware counter
> is narrower than cycles_t. If cycles_base was set near its overflow
> point (which may be much less than 2**63), then even a brief probe
> will end up with a cycles_atend < cycles_base. That in turn would
> lead to an erroneous overload indication.
It will generate an extra threshold comparison, but the error indication
only occurs if cycles_sum is more than THRESHOLD. This "quick-wrap"
scenario will be a wasted check, since the sum won't have accumulated
much. However, if there's a real problem, it will be caught on the
following interval.
Josh