Skip to content
Snippets Groups Projects
Commit 977ac819 authored by Nathan Froyd's avatar Nathan Froyd
Browse files

Bug 1328370 - remove GeckoSampler::mPrimaryThreadProfile; r=mstange

The only interesting setter of this field is
GeckoSampler::GetPrimaryThreadProfile, which is unused.  Once that
function is removed, mPrimaryThreadProfile is set to null in
GeckoSampler's constructor and never changed or referenced.
parent 4039d958
No related branches found
No related tags found
No related merge requests found
......@@ -178,7 +178,6 @@ GeckoSampler::GeckoSampler(double aInterval, int aEntrySize,
const char** aFeatures, uint32_t aFeatureCount,
const char** aThreadNameFilters, uint32_t aFilterCount)
: Sampler(aInterval, true, aEntrySize)
, mPrimaryThreadProfile(nullptr)
, mBuffer(new ProfileBuffer(aEntrySize))
, mSaveRequested(false)
#if defined(XP_WIN)
......
......@@ -88,23 +88,6 @@ class GeckoSampler: public Sampler {
virtual void HandleSaveRequest() override;
virtual void DeleteExpiredMarkers() override;
ThreadProfile* GetPrimaryThreadProfile()
{
if (!mPrimaryThreadProfile) {
::MutexAutoLock lock(*sRegisteredThreadsMutex);
for (uint32_t i = 0; i < sRegisteredThreads->size(); i++) {
ThreadInfo* info = sRegisteredThreads->at(i);
if (info->IsMainThread() && !info->IsPendingDelete()) {
mPrimaryThreadProfile = info->Profile();
break;
}
}
}
return mPrimaryThreadProfile;
}
void ToStreamAsJSON(std::ostream& stream, double aSinceTime = 0);
#ifndef SPS_STANDALONE
virtual JSObject *ToJSObject(JSContext *aCx, double aSinceTime = 0);
......@@ -142,8 +125,6 @@ protected:
void StreamJSON(SpliceableJSONWriter& aWriter, double aSinceTime);
// This represent the application's main thread (SAMPLER_INIT)
ThreadProfile* mPrimaryThreadProfile;
RefPtr<ProfileBuffer> mBuffer;
bool mSaveRequested;
bool mAddLeafAddresses;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment