зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328365 (part 2) - Rename ProfileGatherer::mTicker as mSampler. r=mstange.
It's a better name, given that the type is |GeckoSampler*|. --HG-- extra : rebase_source : aaeb9d0c34f8650c2e034e334825c7e8d7c1e832
This commit is contained in:
Родитель
fd25b06c81
Коммит
9fcc3d9c39
|
@ -77,7 +77,7 @@ GeckoProfiler::enable(bool enabled)
|
|||
*/
|
||||
ReleaseAllJITCode(rt->defaultFreeOp());
|
||||
|
||||
// This function is called when the Gecko profiler makes a new TableTicker
|
||||
// This function is called when the Gecko profiler makes a new GeckoSampler
|
||||
// (and thus, a new circular buffer). Set all current entries in the
|
||||
// JitcodeGlobalTable as expired and reset the buffer generation and lap
|
||||
// count.
|
||||
|
|
|
@ -27,8 +27,8 @@ static const uint32_t MAX_SUBPROCESS_EXIT_PROFILES = 5;
|
|||
|
||||
NS_IMPL_ISUPPORTS(ProfileGatherer, nsIObserver)
|
||||
|
||||
ProfileGatherer::ProfileGatherer(GeckoSampler* aTicker)
|
||||
: mTicker(aTicker)
|
||||
ProfileGatherer::ProfileGatherer(GeckoSampler* aSampler)
|
||||
: mSampler(aSampler)
|
||||
, mSinceTime(0)
|
||||
, mPendingProfiles(0)
|
||||
, mGathering(false)
|
||||
|
@ -145,13 +145,13 @@ ProfileGatherer::Finish()
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!mTicker) {
|
||||
if (!mSampler) {
|
||||
// We somehow got called after we were cancelled! This shouldn't
|
||||
// be possible, but doing a belt-and-suspenders check to be sure.
|
||||
return;
|
||||
}
|
||||
|
||||
UniquePtr<char[]> buf = mTicker->ToJSON(mSinceTime);
|
||||
UniquePtr<char[]> buf = mSampler->ToJSON(mSinceTime);
|
||||
|
||||
if (mFile) {
|
||||
nsCOMPtr<nsIFileOutputStream> of =
|
||||
|
@ -225,7 +225,7 @@ ProfileGatherer::Cancel()
|
|||
mFile = nullptr;
|
||||
|
||||
// Clear out the GeckoSampler reference, since it's being destroyed.
|
||||
mTicker = nullptr;
|
||||
mSampler = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
explicit ProfileGatherer(GeckoSampler* aTicker);
|
||||
explicit ProfileGatherer(GeckoSampler* aSampler);
|
||||
void WillGatherOOPProfile();
|
||||
void GatheredOOPProfile();
|
||||
void Start(double aSinceTime, mozilla::dom::Promise* aPromise);
|
||||
|
@ -35,7 +35,7 @@ private:
|
|||
nsTArray<nsCString> mExitProfiles;
|
||||
RefPtr<mozilla::dom::Promise> mPromise;
|
||||
nsCOMPtr<nsIFile> mFile;
|
||||
GeckoSampler* mTicker;
|
||||
GeckoSampler* mSampler;
|
||||
double mSinceTime;
|
||||
uint32_t mPendingProfiles;
|
||||
bool mGathering;
|
||||
|
|
Загрузка…
Ссылка в новой задаче