author | Nicholas Nethercote <nnethercote@mozilla.com> |
Wed, 25 Jan 2017 16:09:06 +1100 | |
changeset 378260 | 8b10b8a3dbde62240b4cc53c972a91236871845c |
parent 378259 | e659096b1ca44072fa11e555538320a13ff56b07 |
child 378261 | fecc2109d459d98f68cccb3ebf395f048d0f9e5e |
push id | 7198 |
push user | jlorenzo@mozilla.com |
push date | Tue, 18 Apr 2017 12:07:49 +0000 |
treeherder | mozilla-beta@d57aa49c3948 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mstange |
bugs | 1328365 |
milestone | 54.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/vm/GeckoProfiler.cpp +++ b/js/src/vm/GeckoProfiler.cpp @@ -72,17 +72,17 @@ GeckoProfiler::enable(bool enabled) return; /* * Ensure all future generated code will be instrumented, or that all * currently instrumented code is discarded */ 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. if (rt->hasJitRuntime() && rt->jitRuntime()->hasJitcodeGlobalTable()) rt->jitRuntime()->getJitcodeGlobalTable()->setAllEntriesAsExpired(rt); rt->resetProfilerSampleBufferGen(); rt->resetProfilerSampleBufferLapCount();
--- a/tools/profiler/gecko/ProfileGatherer.cpp +++ b/tools/profiler/gecko/ProfileGatherer.cpp @@ -22,18 +22,18 @@ namespace mozilla { * only store up to MAX_SUBPROCESS_EXIT_PROFILES. The buffer is * circular, so as soon as we receive another exit profile, we'll * bump the oldest one out of the buffer. */ 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) { } void ProfileGatherer::GatheredOOPProfile() @@ -140,23 +140,23 @@ ProfileGatherer::Start(double aSinceTime Start(aSinceTime, file); } void 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 = do_CreateInstance("@mozilla.org/network/file-output-stream;1"); of->Init(mFile, -1, -1, 0); uint32_t sz; of->Write(buf.get(), strlen(buf.get()), &sz); of->Close(); @@ -220,17 +220,17 @@ ProfileGatherer::Cancel() // should reject it. if (mPromise) { mPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR); } mPromise = nullptr; mFile = nullptr; // Clear out the GeckoSampler reference, since it's being destroyed. - mTicker = nullptr; + mSampler = nullptr; } void ProfileGatherer::OOPExitProfile(const nsCString& aProfile) { if (mExitProfiles.Length() >= MAX_SUBPROCESS_EXIT_PROFILES) { mExitProfiles.RemoveElementAt(0); }
--- a/tools/profiler/public/ProfileGatherer.h +++ b/tools/profiler/public/ProfileGatherer.h @@ -13,34 +13,34 @@ class GeckoSampler; namespace mozilla { class ProfileGatherer final : public nsIObserver { 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); void Start(double aSinceTime, nsIFile* aFile); void Start(double aSinceTime, const nsACString& aFileName); void Cancel(); void OOPExitProfile(const nsCString& aProfile); private: ~ProfileGatherer() {}; void Finish(); void Reset(); nsTArray<nsCString> mExitProfiles; RefPtr<mozilla::dom::Promise> mPromise; nsCOMPtr<nsIFile> mFile; - GeckoSampler* mTicker; + GeckoSampler* mSampler; double mSinceTime; uint32_t mPendingProfiles; bool mGathering; }; } // namespace mozilla #endif