зеркало из https://github.com/mozilla/gecko-dev.git
Bug 962262 - Profiler - Use float instead of double to pack circular buffer. r=benwa
--HG-- extra : rebase_source : 4faee1a306c6b9d31f7d070d33d7269f1e0c1885
This commit is contained in:
Родитель
7271837f38
Коммит
d70acec4f5
|
@ -239,12 +239,12 @@ void populateBuffer(UnwinderThreadBuffer* utb, TickSample* sample,
|
|||
// Add any extras
|
||||
if (!sLastTracerEvent.IsNull() && sample) {
|
||||
TimeDuration delta = sample->timestamp - sLastTracerEvent;
|
||||
utb__addEntry( utb, ProfileEntry('r', delta.ToMilliseconds()) );
|
||||
utb__addEntry( utb, ProfileEntry('r', static_cast<float>(delta.ToMilliseconds())) );
|
||||
}
|
||||
|
||||
if (sample) {
|
||||
TimeDuration delta = sample->timestamp - sStartTime;
|
||||
utb__addEntry( utb, ProfileEntry('t', delta.ToMilliseconds()) );
|
||||
utb__addEntry( utb, ProfileEntry('t', static_cast<float>(delta.ToMilliseconds())) );
|
||||
}
|
||||
|
||||
if (sLastFrameNumber != sFrameNumber) {
|
||||
|
|
|
@ -43,7 +43,7 @@ ProfileEntry::ProfileEntry(char aTagName, void *aTagPtr)
|
|||
, mTagName(aTagName)
|
||||
{ }
|
||||
|
||||
ProfileEntry::ProfileEntry(char aTagName, double aTagFloat)
|
||||
ProfileEntry::ProfileEntry(char aTagName, float aTagFloat)
|
||||
: mTagFloat(aTagFloat)
|
||||
, mTagName(aTagName)
|
||||
{ }
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
ProfileEntry(char aTagName, const char *aTagData);
|
||||
ProfileEntry(char aTagName, void *aTagPtr);
|
||||
ProfileEntry(char aTagName, ProfilerMarker *aTagMarker);
|
||||
ProfileEntry(char aTagName, double aTagFloat);
|
||||
ProfileEntry(char aTagName, float aTagFloat);
|
||||
ProfileEntry(char aTagName, uintptr_t aTagOffset);
|
||||
ProfileEntry(char aTagName, Address aTagAddress);
|
||||
ProfileEntry(char aTagName, int aTagLine);
|
||||
|
@ -51,7 +51,7 @@ private:
|
|||
char mTagChars[sizeof(void*)];
|
||||
void* mTagPtr;
|
||||
ProfilerMarker* mTagMarker;
|
||||
double mTagFloat;
|
||||
float mTagFloat;
|
||||
Address mTagAddress;
|
||||
uintptr_t mTagOffset;
|
||||
int mTagLine;
|
||||
|
|
|
@ -117,7 +117,7 @@ typename Builder::Object TableTicker::GetMetaJSCustomObject(Builder& b)
|
|||
b.DefineProperty(meta, "processType", XRE_GetProcessType());
|
||||
|
||||
TimeDuration delta = TimeStamp::Now() - sStartTime;
|
||||
b.DefineProperty(meta, "startTime", PR_Now()/1000.0 - delta.ToMilliseconds());
|
||||
b.DefineProperty(meta, "startTime", static_cast<float>(PR_Now()/1000.0 - delta.ToMilliseconds()));
|
||||
|
||||
nsresult res;
|
||||
nsCOMPtr<nsIHttpProtocolHandler> http = do_GetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &res);
|
||||
|
@ -639,17 +639,17 @@ void TableTicker::InplaceTick(TickSample* sample)
|
|||
|
||||
if (!sLastTracerEvent.IsNull() && sample && currThreadProfile.IsMainThread()) {
|
||||
TimeDuration delta = sample->timestamp - sLastTracerEvent;
|
||||
currThreadProfile.addTag(ProfileEntry('r', delta.ToMilliseconds()));
|
||||
currThreadProfile.addTag(ProfileEntry('r', static_cast<float>(delta.ToMilliseconds())));
|
||||
}
|
||||
|
||||
if (sample) {
|
||||
TimeDuration delta = sample->timestamp - sStartTime;
|
||||
currThreadProfile.addTag(ProfileEntry('t', delta.ToMilliseconds()));
|
||||
currThreadProfile.addTag(ProfileEntry('t', static_cast<float>(delta.ToMilliseconds())));
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
if (powerSample) {
|
||||
currThreadProfile.addTag(ProfileEntry('p', mIntelPowerGadget->GetTotalPackagePowerInWatts()));
|
||||
currThreadProfile.addTag(ProfileEntry('p', static_cast<float>(mIntelPowerGadget->GetTotalPackagePowerInWatts())));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче