Skip to content

Commit 308fa93

Browse files
committed
Bug 1998177 - Remove JS_regexp_symbol_protocol_on_primitive use counter; r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D273155
1 parent a6cac18 commit 308fa93

File tree

6 files changed

+21
-135
lines changed

6 files changed

+21
-135
lines changed

dom/base/UseCounters.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ custom JS_ic_stub_too_large tried to create an IC stub that was too large
8080
custom JS_ic_stub_oom OOMed while creating IC stub
8181
custom JS_dateparse called Date.parse
8282
custom JS_dateparse_impl_def call to Date.parse used implementation defined behaviour
83-
custom JS_regexp_symbol_protocol_on_primitive passed a primitive with a custom implementation of the regexp protocol symbols to one of the String methods that accept a regexp
8483
custom JS_large_oom_reported reported a large oom
8584
custom JS_small_oom_reported reported a small oom
8685
custom JS_large_oom_recovered recovered a large oom

dom/base/use_counter_metrics.yaml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ use.counter:
108108
send_in_pings:
109109
- use-counters
110110

111-
# Total of 2382 use counter metrics (excludes denominators).
112-
# Total of 357 'page' use counters.
111+
# Total of 2380 use counter metrics (excludes denominators).
112+
# Total of 356 'page' use counters.
113113
use.counter.page:
114114
svgsvgelement_getelementbyid:
115115
type: counter
@@ -740,23 +740,6 @@ use.counter.page:
740740
send_in_pings:
741741
- use-counters
742742

743-
js_regexp_symbol_protocol_on_primitive:
744-
type: counter
745-
description: >
746-
Whether a page passed a primitive with a custom implementation of the regexp protocol symbols to one of the String methods that accept a regexp.
747-
Compare against `use.counter.top_level_content_documents_destroyed`
748-
to calculate the rate.
749-
bugs:
750-
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
751-
data_reviews:
752-
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
753-
notification_emails:
754-
- dom-core@mozilla.com
755-
- emilio@mozilla.com
756-
expires: never
757-
send_in_pings:
758-
- use-counters
759-
760743
js_large_oom_reported:
761744
type: counter
762745
description: >
@@ -6180,7 +6163,7 @@ use.counter.page:
61806163
send_in_pings:
61816164
- use-counters
61826165

6183-
# Total of 357 'document' use counters.
6166+
# Total of 356 'document' use counters.
61846167
use.counter.doc:
61856168
svgsvgelement_getelementbyid:
61866169
type: counter
@@ -6811,23 +6794,6 @@ use.counter.doc:
68116794
send_in_pings:
68126795
- use-counters
68136796

6814-
js_regexp_symbol_protocol_on_primitive:
6815-
type: counter
6816-
description: >
6817-
Whether a document passed a primitive with a custom implementation of the regexp protocol symbols to one of the String methods that accept a regexp.
6818-
Compare against `use.counter.content_documents_destroyed`
6819-
to calculate the rate.
6820-
bugs:
6821-
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
6822-
data_reviews:
6823-
- https://bugzilla.mozilla.org/show_bug.cgi?id=1852098
6824-
notification_emails:
6825-
- dom-core@mozilla.com
6826-
- emilio@mozilla.com
6827-
expires: never
6828-
send_in_pings:
6829-
- use-counters
6830-
68316797
js_large_oom_reported:
68326798
type: counter
68336799
description: >

js/public/friend/UsageStatistics.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,25 +81,24 @@ using JSAccumulateTelemetryDataCallback = void (*)(JSMetric, uint32_t);
8181
extern JS_PUBLIC_API void JS_SetAccumulateTelemetryCallback(
8282
JSContext* cx, JSAccumulateTelemetryDataCallback callback);
8383

84-
#define FOR_EACH_JS_USE_COUNTER(_) \
85-
_(ASMJS, AsmJS) \
86-
_(USE_ASM, UseAsm) \
87-
_(WASM, Wasm) \
88-
_(WASM_LEGACY_EXCEPTIONS, WasmLegacyExceptions) \
89-
_(ISHTMLDDA_FUSE, IsHTMLDDAFuse) \
90-
_(OPTIMIZE_GET_ITERATOR_FUSE, OptimizeGetIteratorFuse) \
91-
_(THENABLE_USE, ThenableUse) \
92-
_(THENABLE_USE_PROTO, ThenableUseProto) \
93-
_(THENABLE_USE_STANDARD_PROTO, ThenableUseStandardProto) \
94-
_(THENABLE_USE_OBJECT_PROTO, ThenableUseObjectProto) \
95-
_(LEGACY_LANG_SUBTAG, LegacyLangSubtag) \
96-
_(IC_STUB_TOO_LARGE, ICStubTooLarge) \
97-
_(IC_STUB_OOM, ICStubOOM) \
98-
_(DATEPARSE, DateParse) \
99-
_(DATEPARSE_IMPL_DEF, DateParseImplDef) \
100-
_(OPTIMIZE_ARRAY_SPECIES_FUSE, OptimizeArraySpeciesFuse) \
101-
_(OPTIMIZE_PROMISE_LOOKUP_FUSE, OptimizePromiseLookupFuse) \
102-
_(REGEXP_SYMBOL_PROTOCOL_ON_PRIMITIVE, RegExpSymbolProtocolOnPrimitive)
84+
#define FOR_EACH_JS_USE_COUNTER(_) \
85+
_(ASMJS, AsmJS) \
86+
_(USE_ASM, UseAsm) \
87+
_(WASM, Wasm) \
88+
_(WASM_LEGACY_EXCEPTIONS, WasmLegacyExceptions) \
89+
_(ISHTMLDDA_FUSE, IsHTMLDDAFuse) \
90+
_(OPTIMIZE_GET_ITERATOR_FUSE, OptimizeGetIteratorFuse) \
91+
_(THENABLE_USE, ThenableUse) \
92+
_(THENABLE_USE_PROTO, ThenableUseProto) \
93+
_(THENABLE_USE_STANDARD_PROTO, ThenableUseStandardProto) \
94+
_(THENABLE_USE_OBJECT_PROTO, ThenableUseObjectProto) \
95+
_(LEGACY_LANG_SUBTAG, LegacyLangSubtag) \
96+
_(IC_STUB_TOO_LARGE, ICStubTooLarge) \
97+
_(IC_STUB_OOM, ICStubOOM) \
98+
_(DATEPARSE, DateParse) \
99+
_(DATEPARSE_IMPL_DEF, DateParseImplDef) \
100+
_(OPTIMIZE_ARRAY_SPECIES_FUSE, OptimizeArraySpeciesFuse) \
101+
_(OPTIMIZE_PROMISE_LOOKUP_FUSE, OptimizePromiseLookupFuse)
103102

104103
/*
105104
* Use counter names passed to the accumulate use counter callback.

js/src/jit-test/tests/string-methods-regexp-symbols-telemetry.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

js/src/vm/SelfHosting.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,16 +1096,6 @@ static bool intrinsic_StringReplaceString(JSContext* cx, unsigned argc,
10961096
return true;
10971097
}
10981098

1099-
static bool intrinsic_RegExpSymbolProtocolOnPrimitiveCounter(JSContext* cx,
1100-
unsigned argc,
1101-
Value* vp) {
1102-
// This telemetry is to assess compatibility for tc39/ecma262#3009 and
1103-
// can later be removed (Bug 1953619).
1104-
cx->runtime()->setUseCounter(
1105-
cx->global(), JSUseCounter::REGEXP_SYMBOL_PROTOCOL_ON_PRIMITIVE);
1106-
return true;
1107-
}
1108-
11091099
static bool intrinsic_StringReplaceAllString(JSContext* cx, unsigned argc,
11101100
Value* vp) {
11111101
CallArgs args = CallArgsFromVp(argc, vp);
@@ -1810,8 +1800,6 @@ static const JSFunctionSpec intrinsic_functions[] = {
18101800
JS_INLINABLE_FN("RegExpSearcher", RegExpSearcher, 3, 0, RegExpSearcher),
18111801
JS_INLINABLE_FN("RegExpSearcherLastLimit", RegExpSearcherLastLimit, 0, 0,
18121802
RegExpSearcherLastLimit),
1813-
JS_FN("RegExpSymbolProtocolOnPrimitiveCounter",
1814-
intrinsic_RegExpSymbolProtocolOnPrimitiveCounter, 0, 0),
18151803
JS_INLINABLE_FN("SameValue", js::obj_is, 2, 0, ObjectIs),
18161804
JS_FN("SetCopy", SetObject::copy, 1, 0),
18171805
JS_FN("StringReplaceAllString", intrinsic_StringReplaceAllString, 3, 0),

js/xpconnect/src/XPCJSRuntime.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2902,10 +2902,6 @@ static void SetUseCounterCallback(JSObject* obj, JSUseCounter counter) {
29022902
case JSUseCounter::DATEPARSE_IMPL_DEF:
29032903
SetUseCounter(obj, eUseCounter_custom_JS_dateparse_impl_def);
29042904
return;
2905-
case JSUseCounter::REGEXP_SYMBOL_PROTOCOL_ON_PRIMITIVE:
2906-
SetUseCounter(obj,
2907-
eUseCounter_custom_JS_regexp_symbol_protocol_on_primitive);
2908-
return;
29092905
case JSUseCounter::COUNT:
29102906
break;
29112907
}

0 commit comments

Comments
 (0)