зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1373154 (part 1) - Remove TickSample::mTimeStamp. r=mstange.
We can just TimeStamp::Now() directly when needed. --HG-- extra : rebase_source : 94653b716da43c43c41cff20a26dc58ec15d1de5
This commit is contained in:
Родитель
c0147ff641
Коммит
d0c2d996a1
|
@ -615,7 +615,6 @@ public:
|
|||
// SamplerThread samples the thread in question.
|
||||
TickSample(ThreadInfo* aThreadInfo, int64_t aRSSMemory, int64_t aUSSMemory)
|
||||
: mIsSynchronous(false)
|
||||
, mTimeStamp(TimeStamp::Now())
|
||||
, mThreadId(aThreadInfo->ThreadId())
|
||||
, mRacyInfo(aThreadInfo->RacyInfo())
|
||||
, mJSContext(aThreadInfo->mContext)
|
||||
|
@ -640,7 +639,6 @@ public:
|
|||
TickSample(NotNull<RacyThreadInfo*> aRacyInfo, JSContext* aJSContext,
|
||||
PlatformData* aPlatformData)
|
||||
: mIsSynchronous(true)
|
||||
, mTimeStamp(TimeStamp::Now())
|
||||
, mThreadId(Thread::GetCurrentId())
|
||||
, mRacyInfo(aRacyInfo)
|
||||
, mJSContext(aJSContext)
|
||||
|
@ -669,8 +667,6 @@ public:
|
|||
// False for periodic samples, true for synchronous samples.
|
||||
const bool mIsSynchronous;
|
||||
|
||||
const TimeStamp mTimeStamp;
|
||||
|
||||
const int mThreadId;
|
||||
|
||||
const NotNull<RacyThreadInfo*> mRacyInfo;
|
||||
|
@ -1287,7 +1283,9 @@ Tick(PSLockRef aLock, const TickSample& aSample, ProfileBuffer* aBuffer)
|
|||
|
||||
aBuffer->addTagThreadId(aSample.mThreadId, aSample.mLastSample);
|
||||
|
||||
TimeDuration delta = aSample.mTimeStamp - CorePS::ProcessStartTime();
|
||||
const TimeStamp now = TimeStamp::Now();
|
||||
|
||||
TimeDuration delta = now - CorePS::ProcessStartTime();
|
||||
aBuffer->addTag(ProfileBufferEntry::Time(delta.ToMilliseconds()));
|
||||
|
||||
NativeStack nativeStack;
|
||||
|
@ -1320,7 +1318,7 @@ Tick(PSLockRef aLock, const TickSample& aSample, ProfileBuffer* aBuffer)
|
|||
|
||||
if (aSample.mResponsiveness && aSample.mResponsiveness->HasData()) {
|
||||
TimeDuration delta =
|
||||
aSample.mResponsiveness->GetUnresponsiveDuration(aSample.mTimeStamp);
|
||||
aSample.mResponsiveness->GetUnresponsiveDuration(now);
|
||||
aBuffer->addTag(ProfileBufferEntry::Responsiveness(delta.ToMilliseconds()));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче