Backed out changeset ed86b892433b (bug 1384688) for bustage at tools/profiler/gecko/nsProfiler.cpp:573: the address of 'thisProcessFirstSampleTime' will always evaluate as 'true'. r=backout

This commit is contained in:
Sebastian Hengst 2017-07-31 20:10:32 +02:00
parent c4e0fbd639
commit 1a67078fdf
4 changed files with 1 additions and 30 deletions

View File

@ -35,8 +35,6 @@ ProfilerBacktrace::StreamJSON(SpliceableJSONWriter& aWriter,
double firstSampleTimeIgnored;
StreamSamplesAndMarkers(mName.get(), mThreadId,
*mBuffer.get(), aWriter, aProcessStartTime,
/* aRegisterTime */ TimeStamp(),
/* aUnregisterTime */ TimeStamp(),
/* aSinceTime */ 0, &firstSampleTimeIgnored,
/* aContext */ nullptr,
/* aSavedStreamedSamples */ nullptr,

View File

@ -22,7 +22,6 @@
ThreadInfo::ThreadInfo(const char* aName, int aThreadId, bool aIsMainThread,
void* aStackTop)
: mName(strdup(aName))
, mRegisterTime(TimeStamp::Now())
, mThreadId(aThreadId)
, mIsMainThread(aIsMainThread)
, mRacyInfo(mozilla::WrapNotNull(new RacyThreadInfo()))
@ -85,9 +84,7 @@ ThreadInfo::StreamJSON(const ProfileBuffer& aBuffer,
aWriter.Start(SpliceableJSONWriter::SingleLineStyle);
{
StreamSamplesAndMarkers(Name(), ThreadId(), aBuffer, aWriter,
aProcessStartTime,
mRegisterTime, mUnregisterTime,
aSinceTime, &firstSampleTime,
aProcessStartTime, aSinceTime, &firstSampleTime,
mContext,
mSavedStreamedSamples.get(),
mFirstSavedStreamedSampleTime,
@ -151,8 +148,6 @@ StreamSamplesAndMarkers(const char* aName,
const ProfileBuffer& aBuffer,
SpliceableJSONWriter& aWriter,
const TimeStamp& aProcessStartTime,
const TimeStamp& aRegisterTime,
const TimeStamp& aUnregisterTime,
double aSinceTime,
double* aOutFirstSampleTime,
JSContext* aContext,
@ -168,20 +163,6 @@ StreamSamplesAndMarkers(const char* aName,
aWriter.IntProperty("tid", static_cast<int64_t>(aThreadId));
aWriter.IntProperty("pid", static_cast<int64_t>(getpid()));
if (aRegisterTime) {
aWriter.DoubleProperty("registerTime",
(aRegisterTime - aProcessStartTime).ToMilliseconds());
} else {
aWriter.NullProperty("registerTime");
}
if (aUnregisterTime) {
aWriter.DoubleProperty("unregisterTime",
(aUnregisterTime - aProcessStartTime).ToMilliseconds());
} else {
aWriter.NullProperty("unregisterTime");
}
aWriter.StartObjectProperty("samples");
{
{

View File

@ -8,7 +8,6 @@
#define ThreadInfo_h
#include "mozilla/NotNull.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/UniquePtrExtensions.h"
#include "platform.h"
@ -183,8 +182,6 @@ public:
void StopProfiling();
bool IsBeingProfiled() { return mIsBeingProfiled; }
void NotifyUnregistered() { mUnregisterTime = TimeStamp::Now(); }
PlatformData* GetPlatformData() const { return mPlatformData.get(); }
void* StackTop() const { return mStackTop; }
@ -194,8 +191,6 @@ public:
private:
mozilla::UniqueFreePtr<char> mName;
mozilla::TimeStamp mRegisterTime;
mozilla::TimeStamp mUnregisterTime;
int mThreadId;
const bool mIsMainThread;
@ -380,8 +375,6 @@ StreamSamplesAndMarkers(const char* aName, int aThreadId,
const ProfileBuffer& aBuffer,
SpliceableJSONWriter& aWriter,
const mozilla::TimeStamp& aProcessStartTime,
const TimeStamp& aRegisterTime,
const TimeStamp& aUnregisterTime,
double aSinceTime,
double* aOutFirstSampleTime,
JSContext* aContext,

View File

@ -2962,7 +2962,6 @@ profiler_unregister_thread()
if (info) {
DEBUG_LOG("profiler_unregister_thread: %s", info->Name());
if (ActivePS::Exists(lock) && info->IsBeingProfiled()) {
info->NotifyUnregistered();
CorePS::DeadThreads(lock).push_back(info);
} else {
delete info;