зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1ad49d6d4d
Коммит
609674c984
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче