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:
Nicholas Nethercote 2017-06-15 22:01:10 +10:00
Родитель c0147ff641
Коммит d0c2d996a1
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -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()));
}