зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1333296 (part 3) - Remove SPS mentions in tools/profiler. r=mstange.
--HG-- extra : rebase_source : d4ee3eccbffc86ea902be2b80a159fb84445c027
This commit is contained in:
Родитель
997c2d8b00
Коммит
cb7d796cb1
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
};
|
||||
|
|
|
@ -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<uintptr_t>(aVptr);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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.
|
||||
})();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче