@@ -165,53 +165,8 @@ enum MethodType : uint16
165165 Body->GetColumnNumber(), \
166166 GetFunctionName(Body))
167167
168- #define LogLoopBodyEvent (Function, Body, loopHeader, entryPoint ) \
169- Assert (entryPoint->GetNativeAddress () != NULL); \
170- Assert (entryPoint->GetCodeSize () > 0); \
171- WCHAR loopBodyNameArray[NameBufferLength]; \
172- WCHAR* loopBodyName = loopBodyNameArray; \
173- size_t bufferSize = GetLoopBodyName(Body, loopHeader, loopBodyName, NameBufferLength); \
174- if (bufferSize > NameBufferLength) /* insufficient buffer space*/ \
175- { \
176- loopBodyName = HeapNewNoThrowArray (WCHAR, bufferSize); \
177- if (loopBodyName) \
178- { \
179- GetLoopBodyName (Body, loopHeader, loopBodyName, bufferSize); \
180- } \
181- else \
182- { \
183- loopBodyNameArray[0 ] = _u (' \0 ' ); \
184- loopBodyName = loopBodyNameArray; \
185- } \
186- } \
187- JS_ETW (Function(Body->GetScriptContext (), \
188- (void *)entryPoint->GetNativeAddress(), \
189- entryPoint->GetCodeSize(), \
190- GetFunctionId(Body), \
191- 0 /* methodFlags - for future use*/ , \
192- MethodType_LoopBody + (uint16)Body->GetLoopNumber(loopHeader), \
193- GetSourceId(Body), \
194- /* line*/ 0, \
195- /* column*/ 0, \
196- loopBodyName)); \
197- WriteMethodEvent (STRINGIZEW(Function), \
198- Body->GetScriptContext(), \
199- (void *)entryPoint->GetNativeAddress(), \
200- entryPoint->GetCodeSize(), \
201- GetFunctionId(Body), \
202- 0 /* methodFlags - for future use*/ , \
203- MethodType_LoopBody + (uint16)Body->GetLoopNumber(loopHeader), \
204- GetSourceId(Body), \
205- /* line*/ 0, \
206- /* column*/ 0, \
207- loopBodyName); \
208- if (loopBodyNameArray != loopBodyName) \
209- { \
210- HeapDeleteArray (bufferSize, loopBodyName); \
211- }
212-
213168
214- #define LogLoopBodyEventBG (Function, Body, loopHeader, entryPoint, loopNumber ) \
169+ #define LogLoopBodyEvent (Function, Body, entryPoint, loopNumber ) \
215170 Assert (entryPoint->GetNativeAddress () != NULL); \
216171 Assert (entryPoint->GetCodeSize () > 0); \
217172 WCHAR loopBodyNameArray[NameBufferLength]; \
@@ -222,7 +177,7 @@ enum MethodType : uint16
222177 loopBodyName = HeapNewNoThrowArray (WCHAR, bufferSize); \
223178 if (loopBodyName) \
224179 { \
225- GetLoopBodyName (Body, loopHeader, loopBodyName, bufferSize); \
180+ Body-> GetLoopBodyName (loopNumber, loopBodyName, NameBufferLength); \
226181 } \
227182 else \
228183 { \
@@ -274,14 +229,14 @@ class EtwTrace
274229 static void LogSourceUnloadEvents (Js::ScriptContext* scriptContext);
275230 static void LogMethodNativeUnloadEvent (Js::FunctionBody* body, Js::FunctionEntryPointInfo* entryPoint);
276231 static void LogMethodInterpreterThunkUnloadEvent (Js::FunctionBody* body);
277- static void LogLoopBodyUnloadEvent (Js::FunctionBody* body, Js::LoopHeader* loopHeader, Js::LoopEntryPointInfo* entryPoint );
232+ static void LogLoopBodyUnloadEvent (Js::FunctionBody* body, Js::LoopEntryPointInfo* entryPoint, uint loopNumber );
278233
279234 /* Load events */
280235 static void LogMethodInterpreterThunkLoadEvent (Js::FunctionBody* body);
281236 static void LogMethodNativeLoadEvent (Js::FunctionBody* body, Js::FunctionEntryPointInfo* entryPoint);
282237
283238
284- static void LogLoopBodyLoadEvent (Js::FunctionBody* body, Js::LoopHeader* loopHeader, Js:: LoopEntryPointInfo* entryPoint, uint16 loopNumber);
239+ static void LogLoopBodyLoadEvent (Js::FunctionBody* body, Js::LoopEntryPointInfo* entryPoint, uint16 loopNumber);
285240 static void LogScriptContextLoadEvent (Js::ScriptContext* scriptContext);
286241 static void LogSourceModuleLoadEvent (Js::ScriptContext* scriptContext, DWORD_PTR sourceContext, _In_z_ const char16* url);
287242
0 commit comments