Skip to content

Commit

Permalink
Moving custom ETW event firing out of windows specifc code
Browse files Browse the repository at this point in the history
Since LTTng support replaces ETW backing functions, the code supporting
the JS-accessible custom ETW event works cross platform, if LTTng support
is compiled in. There is no need for the additional platform specific code.
  • Loading branch information
MSLaguana committed Nov 29, 2017
1 parent 305dfc4 commit 94833ae
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 66 deletions.
3 changes: 1 addition & 2 deletions lib/Runtime/Library/GlobalObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1621,8 +1621,7 @@ namespace Js
return function->GetScriptContext()->GetLibrary()->GetUndefined();
}

Js::JavascriptString* jsString = Js::JavascriptConversion::ToString(args[1], function->GetScriptContext());
PlatformAgnostic::EventTrace::FireGenericEventTrace(jsString->GetSz());
JS_ETW(EventWriteJSCRIPT_INTERNAL_GENERIC_EVENT(Js::JavascriptConversion::ToString(args[1], function->GetScriptContext())->GetSz()));
return function->GetScriptContext()->GetLibrary()->GetUndefined();
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,13 @@
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\SystemInfo.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\Thread.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Common\UnicodeText.Common.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\EventTrace.cpp" />
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Windows\PerfTrace.cpp" />
</ItemGroup>
<ItemGroup Condition="'$(IntlICU)'=='true'">
<ClCompile Include="$(MSBuildThisFileDirectory)Platform\Common\Intl.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="ChakraPlatform.h" />
<ClInclude Include="EventTrace.h" />
<ClInclude Include="PerfTrace.h" />
<ClInclude Include="RuntimePlatformAgnosticPch.h" />
<ClInclude Include="UnicodeText.h" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="Platform\Windows\UnicodeText.cpp">
<Filter>Platform\Windows</Filter>
</ClCompile>
<ClCompile Include="Platform\Windows\EventTrace.cpp">
<Filter>Platform\Windows</Filter>
</ClCompile>
<ClCompile Include="Platform\Windows\DaylightHelper.cpp">
<Filter>Platform\Windows</Filter>
</ClCompile>
Expand Down Expand Up @@ -51,14 +48,11 @@
</ClInclude>
<ClInclude Include="ChakraPlatform.h" />
<ClInclude Include="RuntimePlatformAgnosticPch.h" />
<ClInclude Include="EventTrace.h">
<Filter>Interfaces</Filter>
</ClInclude>
<ClInclude Include="PerfTrace.h">
<Filter>Interfaces</Filter>
</ClInclude>
<ClInclude Include="IPlatformAgnosticResource.h">
<Filter>Interfaces</Filter>
</ClInclude>
</ItemGroup>
</Project>
</Project>
1 change: 0 additions & 1 deletion lib/Runtime/PlatformAgnostic/ChakraPlatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#pragma once

#include "UnicodeText.h"
#include "EventTrace.h"

// Configure whether we configure a signal handler
// to produce perf-<pid>.map files
Expand Down
15 changes: 0 additions & 15 deletions lib/Runtime/PlatformAgnostic/EventTrace.h

This file was deleted.

1 change: 0 additions & 1 deletion lib/Runtime/PlatformAgnostic/Platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(PL_SOURCE_FILES
Common/UnicodeText.Common.cpp
Common/HiResTimer.cpp
Common/DateTime.cpp
Linux/EventTrace.cpp
Linux/UnicodeText.ICU.cpp
Linux/NumbersUtility.cpp
Linux/Thread.cpp
Expand Down
18 changes: 0 additions & 18 deletions lib/Runtime/PlatformAgnostic/Platform/Linux/EventTrace.cpp

This file was deleted.

19 changes: 0 additions & 19 deletions lib/Runtime/PlatformAgnostic/Platform/Windows/EventTrace.cpp

This file was deleted.

0 comments on commit 94833ae

Please sign in to comment.