File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -5559,6 +5559,9 @@ void ScriptContext::RegisterPrototypeChainEnsuredToHaveOnlyWritableDataPropertie
55595559
55605560 }
55615561 }
5562+
5563+ this ->ClearBailoutReasonCountsMap ();
5564+ this ->ClearRejitReasonCountsArray ();
55625565#endif
55635566
55645567#ifdef FIELD_ACCESS_STATS
@@ -5731,6 +5734,34 @@ void ScriptContext::RegisterPrototypeChainEnsuredToHaveOnlyWritableDataPropertie
57315734 }
57325735#endif
57335736 }
5737+ void ScriptContext::ClearBailoutReasonCountsMap ()
5738+ {
5739+ if (this ->bailoutReasonCounts != nullptr )
5740+ {
5741+ this ->bailoutReasonCounts ->Clear ();
5742+ }
5743+ if (this ->bailoutReasonCountsCap != nullptr )
5744+ {
5745+ this ->bailoutReasonCountsCap ->Clear ();
5746+ }
5747+ }
5748+ void ScriptContext::ClearRejitReasonCountsArray ()
5749+ {
5750+ if (this ->rejitReasonCounts != nullptr )
5751+ {
5752+ for (UINT16 i = 0 ; i < NumRejitReasons; i++)
5753+ {
5754+ this ->rejitReasonCounts [i] = 0 ;
5755+ }
5756+ }
5757+ if (this ->rejitReasonCountsCap != nullptr )
5758+ {
5759+ for (UINT16 i = 0 ; i < NumRejitReasons; i++)
5760+ {
5761+ this ->rejitReasonCountsCap [i] = 0 ;
5762+ }
5763+ }
5764+ }
57345765#endif
57355766
57365767#ifdef ENABLE_BASIC_TELEMETRY
Original file line number Diff line number Diff line change @@ -711,6 +711,8 @@ namespace Js
711711 BailoutStatsMap *bailoutReasonCountsCap;
712712 uint *rejitReasonCounts;
713713 uint *rejitReasonCountsCap;
714+ void ClearBailoutReasonCountsMap ();
715+ void ClearRejitReasonCountsArray ();
714716#endif
715717#ifdef ENABLE_BASIC_TELEMETRY
716718
You can’t perform that action at this time.
0 commit comments