DescriptionHandle wrapping of task run count beyond 2^31 times.
Some long lived browsers (and more likely, run-away and hyperactive
tasks) can run more times than can be tallied in a mere int (2^31
times). We use the count as a modulus to take a uniform sample of
other profiled activities. If the task runs enough times, this value
turns negative, and eventually becomes zero, which would cause an
arithmetic exception (divide by zero when doing modulo operation). We
now clamp the value at 2^31 - 1, which will make clear what has
happened when users visit about:profiler (a task has run a LOT), and
we then use this clamped value (instead of the real count) to be very
infrequent about taking a replacement sample. This sampling should be
"good enough for government work," and should not impact enough folks
to have any effect on our profiling stats.
r=isherman
BUG=138961
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148628
Patch Set 1 #Patch Set 2 : #Messages
Total messages: 8 (0 generated)
|