зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset cf159b0581df (Bug 1019611) for B2G bustage on a CLOSED TREE.
This commit is contained in:
Родитель
f5d3a99b2a
Коммит
169feb46fd
|
@ -329,25 +329,6 @@ DumpProfile(JSContext *cx, unsigned argc, jsval *vp)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
GetMaxGCPauseSinceClear(JSContext *cx, unsigned argc, jsval *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setNumber(
|
||||
uint32_t(cx->runtimeFromMainThread()->gc.stats.getMaxGCPauseSinceClear()));
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
ClearMaxGCPauseAccumulator(JSContext *cx, unsigned argc, jsval *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setNumber(
|
||||
uint32_t(cx->runtimeFromMainThread()->gc.stats.clearMaxGCPauseAccumulator()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
|
||||
|
||||
static bool
|
||||
|
@ -401,8 +382,6 @@ static const JSFunctionSpec profiling_functions[] = {
|
|||
JS_FN("pauseProfilers", PauseProfilers, 1,0),
|
||||
JS_FN("resumeProfilers", ResumeProfilers, 1,0),
|
||||
JS_FN("dumpProfile", DumpProfile, 2,0),
|
||||
JS_FN("getMaxGCPauseSinceClear", GetMaxGCPauseSinceClear, 0, 0),
|
||||
JS_FN("clearMaxGCPauseAccumulator", ClearMaxGCPauseAccumulator, 0, 0),
|
||||
#if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
|
||||
/* Keep users of the old shark API happy. */
|
||||
JS_FN("connectShark", IgnoreAndReturnTrue, 0,0),
|
||||
|
|
|
@ -335,8 +335,6 @@ Statistics::gcDuration(int64_t *total, int64_t *maxPause)
|
|||
if (slice->duration() > *maxPause)
|
||||
*maxPause = slice->duration();
|
||||
}
|
||||
if (*maxPause > maxPauseInInterval)
|
||||
maxPauseInInterval = *maxPause;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -450,7 +448,6 @@ Statistics::Statistics(JSRuntime *rt)
|
|||
gcDepth(0),
|
||||
nonincrementalReason(nullptr),
|
||||
preBytes(0),
|
||||
maxPauseInInterval(0),
|
||||
phaseNestingDepth(0),
|
||||
sliceCallback(nullptr)
|
||||
{
|
||||
|
@ -496,27 +493,12 @@ Statistics::~Statistics()
|
|||
}
|
||||
|
||||
JS::GCSliceCallback
|
||||
Statistics::setSliceCallback(JS::GCSliceCallback newCallback)
|
||||
{
|
||||
Statistics::setSliceCallback(JS::GCSliceCallback newCallback) {
|
||||
JS::GCSliceCallback oldCallback = sliceCallback;
|
||||
sliceCallback = newCallback;
|
||||
return oldCallback;
|
||||
}
|
||||
|
||||
int64_t
|
||||
Statistics::clearMaxGCPauseAccumulator()
|
||||
{
|
||||
int64_t prior = maxPauseInInterval;
|
||||
maxPauseInInterval = 0;
|
||||
return prior;
|
||||
}
|
||||
|
||||
int64_t
|
||||
Statistics::getMaxGCPauseSinceClear()
|
||||
{
|
||||
return maxPauseInInterval;
|
||||
}
|
||||
|
||||
void
|
||||
Statistics::printStats()
|
||||
{
|
||||
|
|
|
@ -122,9 +122,6 @@ struct Statistics
|
|||
|
||||
JS::GCSliceCallback setSliceCallback(JS::GCSliceCallback callback);
|
||||
|
||||
int64_t clearMaxGCPauseAccumulator();
|
||||
int64_t getMaxGCPauseSinceClear();
|
||||
|
||||
private:
|
||||
JSRuntime *runtime;
|
||||
|
||||
|
@ -176,9 +173,6 @@ struct Statistics
|
|||
/* Allocated space before the GC started. */
|
||||
size_t preBytes;
|
||||
|
||||
/* Records the maximum GC pause in an API-controlled interval (in us). */
|
||||
int64_t maxPauseInInterval;
|
||||
|
||||
#ifdef DEBUG
|
||||
/* Phases that are currently on stack. */
|
||||
static const size_t MAX_NESTING = 8;
|
||||
|
|
|
@ -2075,7 +2075,7 @@ typedef enum JSGCParamKey {
|
|||
/* Amount of bytes allocated by the GC. */
|
||||
JSGC_BYTES = 3,
|
||||
|
||||
/* Number of times GC has been invoked. Includes both major and minor GC. */
|
||||
/* Number of times when GC was invoked. */
|
||||
JSGC_NUMBER = 4,
|
||||
|
||||
/* Max size of the code cache in bytes. */
|
||||
|
|
|
@ -845,18 +845,6 @@ JS::SetGCSliceCallback(JSRuntime *rt, GCSliceCallback callback)
|
|||
return rt->gc.setSliceCallback(callback);
|
||||
}
|
||||
|
||||
JS_FRIEND_API(int64_t)
|
||||
GetMaxGCPauseSinceClear(JSRuntime *rt)
|
||||
{
|
||||
return rt->gc.stats.getMaxGCPauseSinceClear();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(int64_t)
|
||||
ClearMaxGCPauseAccumulator(JSRuntime *rt)
|
||||
{
|
||||
return rt->gc.stats.clearMaxGCPauseAccumulator();
|
||||
}
|
||||
|
||||
JS_FRIEND_API(bool)
|
||||
JS::WasIncrementalGC(JSRuntime *rt)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче