Backed out changeset 9554986d30fc (bug 1029948) for Bustage

This commit is contained in:
Carsten "Tomcat" Book 2014-06-26 10:18:42 +02:00
parent 2c0edbc2eb
commit 1829cb1590
6 changed files with 20 additions and 17 deletions

View File

@ -194,7 +194,7 @@ void populateBuffer(UnwinderThreadBuffer* utb, TickSample* sample,
// only record the events when we have a we haven't seen a tracer
// event for 100ms
if (!sLastTracerEvent.IsNull()) {
mozilla::TimeDuration delta = sample->timestamp - sLastTracerEvent;
TimeDuration delta = sample->timestamp - sLastTracerEvent;
if (delta.ToMilliseconds() > 100.0) {
recordSample = true;
}
@ -234,12 +234,12 @@ void populateBuffer(UnwinderThreadBuffer* utb, TickSample* sample,
// Add any extras
if (!sLastTracerEvent.IsNull() && sample) {
mozilla::TimeDuration delta = sample->timestamp - sLastTracerEvent;
TimeDuration delta = sample->timestamp - sLastTracerEvent;
utb__addEntry( utb, ProfileEntry('r', static_cast<float>(delta.ToMilliseconds())) );
}
if (sample) {
mozilla::TimeDuration delta = sample->timestamp - sStartTime;
TimeDuration delta = sample->timestamp - sStartTime;
utb__addEntry( utb, ProfileEntry('t', static_cast<float>(delta.ToMilliseconds())) );
}

View File

@ -12,9 +12,13 @@
#include <stdint.h>
namespace mozilla {
class TimeDuration;
class TimeStamp;
}
using mozilla::TimeStamp;
using mozilla::TimeDuration;
class ProfilerBacktrace;
class ProfilerMarkerPayload;

View File

@ -114,7 +114,7 @@ void TableTicker::StreamMetaJSCustomObject(JSStreamWriter& b)
b.NameValue("jank", mJankOnly);
b.NameValue("processType", XRE_GetProcessType());
mozilla::TimeDuration delta = mozilla::TimeStamp::Now() - sStartTime;
TimeDuration delta = TimeStamp::Now() - sStartTime;
b.NameValue("startTime", static_cast<double>(PR_Now()/1000.0 - delta.ToMilliseconds()));
nsresult res;
@ -636,7 +636,7 @@ void TableTicker::InplaceTick(TickSample* sample)
recordSample = false;
// only record the events when we have a we haven't seen a tracer event for 100ms
if (!sLastTracerEvent.IsNull()) {
mozilla::TimeDuration delta = sample->timestamp - sLastTracerEvent;
TimeDuration delta = sample->timestamp - sLastTracerEvent;
if (delta.ToMilliseconds() > 100.0) {
recordSample = true;
}
@ -658,12 +658,12 @@ void TableTicker::InplaceTick(TickSample* sample)
currThreadProfile.flush();
if (sample && currThreadProfile.GetThreadResponsiveness()->HasData()) {
mozilla::TimeDuration delta = currThreadProfile.GetThreadResponsiveness()->GetUnresponsiveDuration(sample->timestamp);
TimeDuration delta = currThreadProfile.GetThreadResponsiveness()->GetUnresponsiveDuration(sample->timestamp);
currThreadProfile.addTag(ProfileEntry('r', static_cast<float>(delta.ToMilliseconds())));
}
if (sample) {
mozilla::TimeDuration delta = sample->timestamp - sStartTime;
TimeDuration delta = sample->timestamp - sStartTime;
currThreadProfile.addTag(ProfileEntry('t', static_cast<float>(delta.ToMilliseconds())));
}

View File

@ -36,7 +36,7 @@ threadSelected(ThreadInfo* aInfo, char** aThreadNameFilters, uint32_t aFeatureCo
return false;
}
extern mozilla::TimeStamp sLastTracerEvent;
extern TimeStamp sLastTracerEvent;
extern int sFrameNumber;
extern int sLastFrameNumber;
extern unsigned int sCurrentEventGeneration;
@ -87,7 +87,7 @@ class TableTicker: public Sampler {
mThreadNameFilters[i] = strdup(aThreadNameFilters[i]);
}
sStartTime = mozilla::TimeStamp::Now();
sStartTime = TimeStamp::Now();
{
mozilla::MutexAutoLock lock(*sRegisteredThreadsMutex);

View File

@ -13,7 +13,6 @@
using mozilla::Monitor;
using mozilla::MonitorAutoLock;
using mozilla::TimeStamp;
class CheckResponsivenessTask : public nsRunnable,
public nsITimerCallback {

View File

@ -38,8 +38,8 @@ mozilla::ThreadLocal<void *> tlsStackTop;
// it as the flag itself.
bool stack_key_initialized;
mozilla::TimeStamp sLastTracerEvent; // is raced on
mozilla::TimeStamp sStartTime;
TimeStamp sLastTracerEvent; // is raced on
TimeStamp sStartTime;
int sFrameNumber = 0;
int sLastFrameNumber = 0;
int sInitCount = 0; // Each init must have a matched shutdown.
@ -844,7 +844,7 @@ bool mozilla_sampler_is_active()
return sIsProfiling;
}
void mozilla_sampler_responsiveness(const mozilla::TimeStamp& aTime)
void mozilla_sampler_responsiveness(const TimeStamp& aTime)
{
sCurrentEventGeneration++;
@ -921,18 +921,18 @@ void mozilla_sampler_sleep_end() {
stack->setSleeping(0);
}
double mozilla_sampler_time(const mozilla::TimeStamp& aTime)
double mozilla_sampler_time(const TimeStamp& aTime)
{
if (!mozilla_sampler_is_active()) {
return 0.0;
}
mozilla::TimeDuration delta = aTime - sStartTime;
TimeDuration delta = aTime - sStartTime;
return delta.ToMilliseconds();
}
double mozilla_sampler_time()
{
return mozilla_sampler_time(mozilla::TimeStamp::Now());
return mozilla_sampler_time(TimeStamp::Now());
}
ProfilerBacktrace* mozilla_sampler_get_backtrace()
@ -1000,7 +1000,7 @@ void mozilla_sampler_add_marker(const char *aMarker, ProfilerMarkerPayload *aPay
if (!stack) {
return;
}
mozilla::TimeDuration delta = mozilla::TimeStamp::Now() - sStartTime;
TimeDuration delta = TimeStamp::Now() - sStartTime;
stack->addMarker(aMarker, payload.forget(), static_cast<float>(delta.ToMilliseconds()));
}