Bug 734707 - Fix Jank profiling feature side effects. r=jmuizelaar

This commit is contained in:
Benoit Girard 2012-03-12 10:56:33 -04:00
parent 4f94d3def4
commit 21ea909e1a

View File

@ -542,18 +542,18 @@ void TableTicker::Tick(TickSample* sample)
}
mStack->mQueueClearMarker = true;
// if we are on a different event we can discard any temporary samples
// we've kept around
if (sLastSampledEventGeneration != sCurrentEventGeneration) {
// XXX: we also probably want to add an entry to the profile to help
// distinguish which samples are part of the same event. That, or record
// the event generation in each sample
mProfile.erase();
}
sLastSampledEventGeneration = sCurrentEventGeneration;
bool recordSample = true;
if (mJankOnly) {
// if we are on a different event we can discard any temporary samples
// we've kept around
if (sLastSampledEventGeneration != sCurrentEventGeneration) {
// XXX: we also probably want to add an entry to the profile to help
// distinguish which samples are part of the same event. That, or record
// the event generation in each sample
mProfile.erase();
}
sLastSampledEventGeneration = sCurrentEventGeneration;
recordSample = false;
// only record the events when we have a we haven't seen a tracer event for 100ms
if (!sLastTracerEvent.IsNull()) {