Bug 1337189 (part 12) - Move s{,Last}FrameNumber from Sampler.cpp to platform.cpp. r=mstange.

--HG--
extra : rebase_source : 95bc147a4a8e750ee3c0dbd92b55cca194a93639
This commit is contained in:
Nicholas Nethercote 2017-02-07 15:56:48 +11:00
Родитель 1ad49d6d4d
Коммит 609674c984
3 изменённых файлов: 11 добавлений и 10 удалений

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

@ -1207,9 +1207,9 @@ Sampler::InplaceTick(TickSample* sample)
currThreadInfo.addTag(ProfileEntry::UnsharedMemory(static_cast<double>(sample->ussMemory)));
}
if (sLastFrameNumber != sFrameNumber) {
currThreadInfo.addTag(ProfileEntry::FrameNumber(sFrameNumber));
sLastFrameNumber = sFrameNumber;
if (gLastFrameNumber != gFrameNumber) {
currThreadInfo.addTag(ProfileEntry::FrameNumber(gFrameNumber));
gLastFrameNumber = gFrameNumber;
}
}

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

@ -101,9 +101,13 @@ bool stack_key_initialized;
// inter-thread synchronization than it currently has.
mozilla::TimeStamp sStartTime;
int sFrameNumber = 0;
int sLastFrameNumber = 0;
int sInitCount = 0; // Each init must have a matched shutdown.
// XXX: These are accessed by multiple threads and might require more
// inter-thread synchronization than they currently have.
static int gFrameNumber = 0;
static int gLastFrameNumber = 0;
int sInitCount = 0; // Each init must have a matched shutdown.
static bool sIsProfiling = false; // is raced on
static bool sIsGPUProfiling = false; // is raced on
static bool sIsLayersDump = false; // is raced on
@ -1077,7 +1081,7 @@ profiler_set_frame_number(int frameNumber)
{
MOZ_RELEASE_ASSERT(NS_IsMainThread());
sFrameNumber = frameNumber;
gFrameNumber = frameNumber;
}
void

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

@ -237,9 +237,6 @@ class Promise;
}
}
extern int sFrameNumber;
extern int sLastFrameNumber;
class Sampler {
public:
// Initialize sampler.