From cb7d796cb1c5ccd44d79ccac3ed985087f3e6196 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 24 Jan 2017 14:18:50 +1100 Subject: [PATCH] Bug 1333296 (part 3) - Remove SPS mentions in tools/profiler. r=mstange. --HG-- extra : rebase_source : d4ee3eccbffc86ea902be2b80a159fb84445c027 --- tools/profiler/core/GeckoSampler.cpp | 2 +- tools/profiler/core/platform.cpp | 2 +- tools/profiler/core/platform.h | 4 +-- tools/profiler/lul/platform-linux-lul.cpp | 4 +-- tools/profiler/public/GeckoProfiler.h | 28 ++++++++++--------- tools/profiler/public/PseudoStack.h | 12 ++++---- tools/profiler/tasktracer/GeckoTaskTracer.cpp | 6 ++-- tools/profiler/tests/test_asm.js | 2 +- tools/profiler/tests/test_enterjit_osr.js | 2 +- .../tests/test_enterjit_osr_disabling.js | 2 +- .../tests/test_enterjit_osr_enabling.js | 2 +- 11 files changed, 34 insertions(+), 32 deletions(-) diff --git a/tools/profiler/core/GeckoSampler.cpp b/tools/profiler/core/GeckoSampler.cpp index 1e16c4b179b2..5d886e44a9a1 100644 --- a/tools/profiler/core/GeckoSampler.cpp +++ b/tools/profiler/core/GeckoSampler.cpp @@ -1142,7 +1142,7 @@ void doSampleStackTrace(ThreadProfile &aProfile, TickSample *aSample, bool aAddL NativeStack nativeStack = { nullptr, nullptr, 0, 0 }; mergeStacksIntoProfile(aProfile, aSample, nativeStack); -#ifdef ENABLE_SPS_LEAF_DATA +#ifdef ENABLE_LEAF_DATA if (aSample && aAddLeafAddresses) { aProfile.addTag(ProfileEntry('l', (void*)aSample->pc)); #ifdef ENABLE_ARM_LR_SAVING diff --git a/tools/profiler/core/platform.cpp b/tools/profiler/core/platform.cpp index 4248bf1237c2..a5f80bf9b341 100644 --- a/tools/profiler/core/platform.cpp +++ b/tools/profiler/core/platform.cpp @@ -743,7 +743,7 @@ profiler_get_features() // Walk the C++ stack. "stackwalk", #endif -#if defined(ENABLE_SPS_LEAF_DATA) +#if defined(ENABLE_LEAF_DATA) // Include the C++ leaf node if not stackwalking. DevTools // profiler doesn't want the native addresses. "leaf", diff --git a/tools/profiler/core/platform.h b/tools/profiler/core/platform.h index f1859bd9880e..3da39866e5ee 100644 --- a/tools/profiler/core/platform.h +++ b/tools/profiler/core/platform.h @@ -80,7 +80,7 @@ bool profiler_verbose(); #ifdef ANDROID # if defined(__arm__) || defined(__thumb__) -# define ENABLE_SPS_LEAF_DATA +# define ENABLE_LEAF_DATA # define ENABLE_ARM_LR_SAVING # endif # define LOG(text) \ @@ -105,7 +105,7 @@ bool profiler_verbose(); #endif #if defined(XP_MACOSX) || defined(XP_WIN) || defined(XP_LINUX) -#define ENABLE_SPS_LEAF_DATA +#define ENABLE_LEAF_DATA #endif typedef int32_t Atomic32; diff --git a/tools/profiler/lul/platform-linux-lul.cpp b/tools/profiler/lul/platform-linux-lul.cpp index 9541534a1686..f503b2c7d253 100644 --- a/tools/profiler/lul/platform-linux-lul.cpp +++ b/tools/profiler/lul/platform-linux-lul.cpp @@ -15,8 +15,8 @@ #include "shared-libraries.h" #include "AutoObjectMapper.h" -// Contains miscellaneous helpers that are used to connect SPS and LUL. - +// Contains miscellaneous helpers that are used to connect the Gecko Profiler +// and LUL. // Find out, in a platform-dependent way, where the code modules got // mapped in the process' virtual address space, and get |aLUL| to diff --git a/tools/profiler/public/GeckoProfiler.h b/tools/profiler/public/GeckoProfiler.h index aced1be5b1c0..962d7f88b9f7 100644 --- a/tools/profiler/public/GeckoProfiler.h +++ b/tools/profiler/public/GeckoProfiler.h @@ -3,25 +3,27 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* *************** SPS Sampler Information **************** +/* *************** Gecko Profiler Information **************** * - * SPS is an always on profiler that takes fast and low overheads samples - * of the program execution using only userspace functionity for portability. - * The goal of this module is to provide performance data in a generic - * cross platform way without requiring custom tools or kernel support. + * The Gecko Profiler is an always-on profiler that takes fast and low + * overheads samples of the program execution using only userspace + * functionality for portability. The goal of this module is to provide + * performance data in a generic cross platform way without requiring custom + * tools or kernel support. * - * Non goals: Support features that are platform specific or replace - * platform specific profilers. + * Non goals: Support features that are platform specific or replace platform + * specific profilers. * - * Samples are collected to form a timeline with optional timeline event (markers) - * used for filtering. + * Samples are collected to form a timeline with optional timeline event + * (markers) used for filtering. * - * SPS collects samples in a platform independant way by using a speudo stack abstraction - * of the real program stack by using 'sample stack frames'. When a sample is collected - * all active sample stack frames and the program counter are recorded. + * The profiler collects samples in a platform independant way by using a + * speudo stack abstraction of the real program stack by using 'sample stack + * frames'. When a sample is collected all active sample stack frames and the + * program counter are recorded. */ -/* *************** SPS Sampler File Format **************** +/* *************** Gecko Profiler File Format **************** * * Simple new line seperated tag format: * S -> BOF tags EOF diff --git a/tools/profiler/public/PseudoStack.h b/tools/profiler/public/PseudoStack.h index 41f1520b1209..fe686bad5f22 100644 --- a/tools/profiler/public/PseudoStack.h +++ b/tools/profiler/public/PseudoStack.h @@ -59,14 +59,14 @@ static inline uint32_t sMin(uint32_t l, uint32_t r) { return l < r ? l : r; } -// A stack entry exists to allow the JS engine to inform SPS of the current -// backtrace, but also to instrument particular points in C++ in case stack -// walking is not available on the platform we are running on. +// A stack entry exists to allow the JS engine to inform the Gecko Profiler of +// the current backtrace, but also to instrument particular points in C++ in +// case stack walking is not available on the platform we are running on. // // Each entry has a descriptive string, a relevant stack address, and some extra -// information the JS engine might want to inform SPS of. This class inherits -// from the JS engine's version of the entry to ensure that the size and layout -// of the two representations are consistent. +// information the JS engine might want to inform the Gecko Profiler of. This +// class inherits from the JS engine's version of the entry to ensure that the +// size and layout of the two representations are consistent. class StackEntry : public js::ProfileEntry { }; diff --git a/tools/profiler/tasktracer/GeckoTaskTracer.cpp b/tools/profiler/tasktracer/GeckoTaskTracer.cpp index 34b6a639b0a4..2a8251c8b131 100644 --- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp +++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp @@ -367,9 +367,9 @@ LogVirtualTablePtr(uint64_t aTaskId, uint64_t aSourceEventId, uintptr_t* aVptr) // [4 taskId address] TraceInfoLogType* log = info->AppendLog(); if (log) { - // Since addr2line used by SPS addon can not solve non-function - // addresses, we use the first entry of vtable as the symbol to - // solve. We should find a better solution later. + // Since addr2line used by the Gecko Profiler addon can not solve + // non-function addresses, we use the first entry of vtable as the symbol + // to solve. We should find a better solution later. log->mVPtr.mType = ACTION_GET_VTABLE; log->mVPtr.mTaskId = aTaskId; log->mVPtr.mVPtr = reinterpret_cast(aVptr); diff --git a/tools/profiler/tests/test_asm.js b/tools/profiler/tests/test_asm.js index 4d273a5598f2..9e43855a1c9e 100644 --- a/tools/profiler/tests/test_asm.js +++ b/tools/profiler/tests/test_asm.js @@ -9,7 +9,7 @@ function run_test() { if (!p) return; - // This test assumes that it's starting on an empty SPS stack. + // This test assumes that it's starting on an empty profiler stack. // (Note that the other profiler tests also assume the profiler // isn't already started.) do_check_true(!p.IsActive()); diff --git a/tools/profiler/tests/test_enterjit_osr.js b/tools/profiler/tests/test_enterjit_osr.js index a4bca590f895..46e1ddae24b4 100644 --- a/tools/profiler/tests/test_enterjit_osr.js +++ b/tools/profiler/tests/test_enterjit_osr.js @@ -10,7 +10,7 @@ function run_test() { if (!p) return; - // This test assumes that it's starting on an empty SPS stack. + // This test assumes that it's starting on an empty profiler stack. // (Note that the other profiler tests also assume the profiler // isn't already started.) do_check_true(!p.IsActive()); diff --git a/tools/profiler/tests/test_enterjit_osr_disabling.js b/tools/profiler/tests/test_enterjit_osr_disabling.js index dbf74c93a9b7..9bc22a016c11 100644 --- a/tools/profiler/tests/test_enterjit_osr_disabling.js +++ b/tools/profiler/tests/test_enterjit_osr_disabling.js @@ -16,6 +16,6 @@ function run_test() { let n = 10000; while (--n); // OSR happens here with the profiler disabled. // An assertion will fail when this function returns, if the - // SPS stack was misbalanced. + // profiler stack was misbalanced. })(); } diff --git a/tools/profiler/tests/test_enterjit_osr_enabling.js b/tools/profiler/tests/test_enterjit_osr_enabling.js index ae696057b7b8..7c01a40ca480 100644 --- a/tools/profiler/tests/test_enterjit_osr_enabling.js +++ b/tools/profiler/tests/test_enterjit_osr_enabling.js @@ -15,7 +15,7 @@ function run_test() { let n = 10000; while (--n); // OSR happens here with the profiler enabled. // An assertion will fail when this function returns, if the - // SPS stack was misbalanced. + // profiler stack was misbalanced. })(); p.StopProfiler(); }