Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit c0f4912

Browse files
Bug 852676 - Remove unmaintained ETW event support (r=sfink)
1 parent a7eafe3 commit c0f4912

12 files changed

Lines changed: 2 additions & 833 deletions

File tree

configure.in

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7421,23 +7421,6 @@ if test -n "$JSGC_INCREMENTAL"; then
74217421
AC_DEFINE(JSGC_INCREMENTAL)
74227422
fi
74237423

7424-
dnl ========================================================
7425-
dnl ETW - Event Tracing for Windows
7426-
dnl ========================================================
7427-
MOZ_ARG_ENABLE_BOOL(ETW,
7428-
[ --enable-ETW Enable ETW (Event Tracing for Windows) event reporting],
7429-
MOZ_ETW=1,
7430-
MOZ_ETW= )
7431-
if test -n "$MOZ_ETW"; then
7432-
AC_DEFINE(MOZ_ETW)
7433-
fi
7434-
7435-
if test -n "$MOZ_ETW"; then
7436-
if test -z "$MOZ_WINSDK_TARGETVER"; then
7437-
AC_MSG_ERROR([--enable-ETW is only valid on Windows])
7438-
fi
7439-
fi
7440-
74417424
dnl ========================================================
74427425
dnl Zealous JavaScript GC
74437426
dnl ========================================================
@@ -8565,7 +8548,6 @@ AC_SUBST(MOZ_SHARK)
85658548
AC_SUBST(MOZ_INSTRUMENTS)
85668549
AC_SUBST(MOZ_CALLGRIND)
85678550
AC_SUBST(MOZ_VTUNE)
8568-
AC_SUBST(MOZ_ETW)
85698551
AC_SUBST(MOZ_PROFILING)
85708552
AC_SUBST(LIBICONV)
85718553
AC_SUBST(MOZ_PLACES)

js/src/configure.in

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3677,24 +3677,6 @@ if test -n "$MOZ_VTUNE"; then
36773677
AC_DEFINE(MOZ_VTUNE)
36783678
fi
36793679

3680-
dnl ========================================================
3681-
dnl ETW - Event Tracing for Windows
3682-
dnl ========================================================
3683-
MOZ_ARG_ENABLE_BOOL(ETW,
3684-
[ --enable-ETW Enable ETW (Event Tracing for Windows) event reporting],
3685-
MOZ_ETW=1,
3686-
MOZ_ETW= )
3687-
if test -n "$MOZ_ETW"; then
3688-
AC_DEFINE(MOZ_ETW)
3689-
WINVER=600
3690-
fi
3691-
3692-
if test -n "$MOZ_ETW"; then
3693-
if test -z "$MOZ_WINSDK_TARGETVER"; then
3694-
AC_MSG_ERROR([--enable-ETW is only valid on Windows])
3695-
fi
3696-
fi
3697-
36983680
dnl ========================================================
36993681
dnl Profiling
37003682
dnl ========================================================
@@ -4151,7 +4133,6 @@ AC_SUBST(MOZ_SHARK)
41514133
AC_SUBST(MOZ_INSTRUMENTS)
41524134
AC_SUBST(MOZ_CALLGRIND)
41534135
AC_SUBST(MOZ_VTUNE)
4154-
AC_SUBST(MOZ_ETW)
41554136
AC_SUBST(MOZ_PROFILING)
41564137
AC_SUBST(LIBICONV)
41574138

js/src/frontend/BytecodeCompiler.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,6 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain,
8686
{
8787
RootedString source(cx, source_);
8888

89-
class ProbesManager
90-
{
91-
const char* filename;
92-
unsigned lineno;
93-
94-
public:
95-
ProbesManager(const char *f, unsigned l) : filename(f), lineno(l) {
96-
Probes::compileScriptBegin(filename, lineno);
97-
}
98-
~ProbesManager() { Probes::compileScriptEnd(filename, lineno); }
99-
};
100-
ProbesManager probesManager(options.filename, options.lineno);
101-
10289
/*
10390
* The scripted callerFrame can only be given for compile-and-go scripts
10491
* and non-zero static level requires callerFrame.

js/src/gc/Statistics.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,11 @@ Statistics::beginGC()
529529
nonincrementalReason = NULL;
530530

531531
preBytes = runtime->gcBytes;
532-
533-
Probes::GCStart();
534532
}
535533

536534
void
537535
Statistics::endGC()
538536
{
539-
Probes::GCEnd();
540537
crash::SnapshotGCStack();
541538

542539
for (int i = 0; i < PHASE_LIMIT; i++)
@@ -640,11 +637,6 @@ Statistics::beginPhase(Phase phase)
640637
#endif
641638

642639
phaseStartTimes[phase] = PRMJ_Now();
643-
644-
if (phase == gcstats::PHASE_MARK)
645-
Probes::GCStartMarkPhase();
646-
else if (phase == gcstats::PHASE_SWEEP)
647-
Probes::GCStartSweepPhase();
648640
}
649641

650642
void
@@ -656,11 +648,6 @@ Statistics::endPhase(Phase phase)
656648
slices.back().phaseTimes[phase] += t;
657649
phaseTimes[phase] += t;
658650
phaseStartTimes[phase] = 0;
659-
660-
if (phase == gcstats::PHASE_MARK)
661-
Probes::GCEndMarkPhase();
662-
else if (phase == gcstats::PHASE_SWEEP)
663-
Probes::GCEndSweepPhase();
664651
}
665652

666653
int64_t

js/src/jsapi.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,22 +1147,19 @@ JS_NewRuntime(uint32_t maxbytes, JSUseHelperThreads useHelperThreads)
11471147
return NULL;
11481148
}
11491149

1150-
Probes::createRuntime(rt);
11511150
return rt;
11521151
}
11531152

11541153
JS_PUBLIC_API(void)
11551154
JS_DestroyRuntime(JSRuntime *rt)
11561155
{
1157-
Probes::destroyRuntime(rt);
11581156
js_free(rt->defaultLocale);
11591157
js_delete(rt);
11601158
}
11611159

11621160
JS_PUBLIC_API(void)
11631161
JS_ShutDown(void)
11641162
{
1165-
Probes::shutdown();
11661163
PRMJ_NowShutdown();
11671164
}
11681165

@@ -2991,7 +2988,6 @@ JS_NewExternalString(JSContext *cx, const jschar *chars, size_t length,
29912988
AssertHeapIsIdle(cx);
29922989
CHECK_REQUEST(cx);
29932990
JSString *s = JSExternalString::new_(cx, chars, length, fin);
2994-
Probes::createString(cx, s, length);
29952991
return s;
29962992
}
29972993

js/src/jsgc.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,6 @@ Chunk::allocateArena(Zone *zone, AllocKind thingKind)
788788
if (JS_UNLIKELY(!hasAvailableArenas()))
789789
removeFromAvailableList();
790790

791-
Probes::resizeHeap(zone, rt->gcBytes, rt->gcBytes + ArenaSize);
792791
rt->gcBytes += ArenaSize;
793792
zone->gcBytes += ArenaSize;
794793
if (zone->gcBytes >= zone->gcTriggerBytes)
@@ -819,7 +818,6 @@ Chunk::releaseArena(ArenaHeader *aheader)
819818
if (rt->gcHelperThread.sweeping())
820819
maybeLock.lock(rt);
821820

822-
Probes::resizeHeap(zone, rt->gcBytes, rt->gcBytes - ArenaSize);
823821
JS_ASSERT(rt->gcBytes >= ArenaSize);
824822
JS_ASSERT(zone->gcBytes >= ArenaSize);
825823
if (rt->gcHelperThread.sweeping())

js/src/jsinterp.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,7 @@ js::InvokeConstructorKernel(JSContext *cx, CallArgs args)
450450
RootedFunction fun(cx, callee.toFunction());
451451

452452
if (fun->isNativeConstructor()) {
453-
Probes::calloutBegin(cx, fun);
454453
bool ok = CallJSNativeConstructor(cx, fun->native(), args);
455-
Probes::calloutEnd(cx, fun);
456454
return ok;
457455
}
458456

js/src/jsobj.cpp

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,9 +2362,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
23622362
*/
23632363
JS_ASSERT(newCount < NELEMENTS_LIMIT);
23642364

2365-
size_t oldSize = Probes::objectResizeActive() ? obj->computedSizeOfThisSlotsElements() : 0;
2366-
size_t newSize = oldSize + (newCount - oldCount) * sizeof(Value);
2367-
23682365
/*
23692366
* If we are allocating slots for an object whose type is always created
23702367
* by calling 'new' on a particular script, bump the GC kind for that
@@ -2394,8 +2391,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
23942391
if (!obj->slots)
23952392
return false;
23962393
Debug_SetSlotRangeToCrashOnTouch(obj->slots, newCount);
2397-
if (Probes::objectResizeActive())
2398-
Probes::resizeObject(cx, obj, oldSize, newSize);
23992394
return true;
24002395
}
24012396

@@ -2413,9 +2408,6 @@ JSObject::growSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32_t
24132408
if (changed && obj->isGlobal())
24142409
types::MarkObjectStateChange(cx, obj);
24152410

2416-
if (Probes::objectResizeActive())
2417-
Probes::resizeObject(cx, obj, oldSize, newSize);
2418-
24192411
return true;
24202412
}
24212413

@@ -2433,14 +2425,9 @@ JSObject::shrinkSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32
24332425
if (obj->isCall())
24342426
return;
24352427

2436-
size_t oldSize = Probes::objectResizeActive() ? obj->computedSizeOfThisSlotsElements() : 0;
2437-
size_t newSize = oldSize - (oldCount - newCount) * sizeof(Value);
2438-
24392428
if (newCount == 0) {
24402429
js_free(obj->slots);
24412430
obj->slots = NULL;
2442-
if (Probes::objectResizeActive())
2443-
Probes::resizeObject(cx, obj, oldSize, newSize);
24442431
return;
24452432
}
24462433

@@ -2456,9 +2443,6 @@ JSObject::shrinkSlots(JSContext *cx, HandleObject obj, uint32_t oldCount, uint32
24562443
/* Watch for changes in global object slots, as for growSlots. */
24572444
if (changed && obj->isGlobal())
24582445
types::MarkObjectStateChange(cx, obj);
2459-
2460-
if (Probes::objectResizeActive())
2461-
Probes::resizeObject(cx, obj, oldSize, newSize);
24622446
}
24632447

24642448
/* static */ bool
@@ -2655,16 +2639,11 @@ JSObject::maybeDensifySparseElements(JSContext *cx, HandleObject obj)
26552639
bool
26562640
JSObject::growElements(JSContext *cx, unsigned newcap)
26572641
{
2658-
size_t oldSize = Probes::objectResizeActive() ? computedSizeOfThisSlotsElements() : 0;
2659-
26602642
if (!growElements(&cx->zone()->allocator, newcap)) {
26612643
JS_ReportOutOfMemory(cx);
26622644
return false;
26632645
}
26642646

2665-
if (Probes::objectResizeActive())
2666-
Probes::resizeObject(cx, this, oldSize, computedSizeOfThisSlotsElements());
2667-
26682647
return true;
26692648
}
26702649

@@ -2741,8 +2720,6 @@ JSObject::shrinkElements(JSContext *cx, unsigned newcap)
27412720
uint32_t oldcap = getDenseCapacity();
27422721
JS_ASSERT(newcap <= oldcap);
27432722

2744-
size_t oldSize = Probes::objectResizeActive() ? computedSizeOfThisSlotsElements() : 0;
2745-
27462723
/* Don't shrink elements below the minimum capacity. */
27472724
if (oldcap <= SLOT_CAPACITY_MIN || !hasDynamicElements())
27482725
return;
@@ -2758,9 +2735,6 @@ JSObject::shrinkElements(JSContext *cx, unsigned newcap)
27582735

27592736
newheader->capacity = newcap;
27602737
elements = newheader->elements();
2761-
2762-
if (Probes::objectResizeActive())
2763-
Probes::resizeObject(cx, this, oldSize, computedSizeOfThisSlotsElements());
27642738
}
27652739

27662740
static JSObject *

0 commit comments

Comments
 (0)