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: 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


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