This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Retry: Enable EventPipe across Unix and Windows #15611
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
c602a37
Revert "Revert "Enable EventPipe across Unix and Windows (#14772)" (#…
f6bceea
Fix ARM build break
a7e6820
Use more explicit references to resolve build failures
54a362c
Fix compat with python3
d1b3052
Disable FeaturePerfTracing on Windows as it is not ready
87f7810
Merge branch 'universal-eventpipe' of https://github.com/nategraf/cor…
7bb40eb
Merge branch 'master' of https://github.com/dotnet/coreclr into unive…
fd97a3e
Disable test for incomplete functionality
24efd34
Fix test diabled patterns
663cae2
Add license header
dec360d
Use keyword types for managed code
d094b13
Add message prefix
a00d866
More precisly condition generation of eventing sources
0a37839
Remove erroneously added changes
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ set __ThisScriptDir="%~dp0" | |
if defined VisualStudioVersion ( | ||
if not defined __VSVersion echo %__MsgPrefix%Detected Visual Studio %VisualStudioVersion% developer command ^prompt environment | ||
goto :Run | ||
) | ||
) | ||
|
||
echo %__MsgPrefix%Searching ^for Visual Studio 2017 or 2015 installation | ||
set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
|
@@ -294,6 +294,16 @@ if %__EnforcePgo%==1 ( | |
) | ||
) | ||
|
||
REM Determine if this is a cross-arch build | ||
|
||
if /i "%__BuildArch%"=="arm64" ( | ||
set __DoCrossArchBuild=1 | ||
) | ||
|
||
if /i "%__BuildArch%"=="arm" ( | ||
set __DoCrossArchBuild=1 | ||
) | ||
|
||
:: Set the remaining variables based upon the determined build configuration | ||
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%" | ||
set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%" | ||
|
@@ -380,6 +390,56 @@ for /f "tokens=*" %%s in ('%DotNetCli% msbuild "%OptDataProjectFilePath%" /t:Dum | |
set __IbcOptDataVersion=%%s | ||
) | ||
|
||
REM ========================================================================================= | ||
REM === | ||
REM === Generate source files for eventing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this affect incremental build? If I run "build.cmd" twice in a row, will it generate new files that will cause the subsequent builds to build things they shouldn't need to? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. I created a utility which ensures files are only written if the copy on disk is different |
||
REM === | ||
REM ========================================================================================= | ||
|
||
set __IntermediatesIncDir=%__IntermediatesDir%\src\inc | ||
set __IntermediatesEventingDir=%__IntermediatesDir%\eventing | ||
|
||
REM Find python and set it to the variable PYTHON | ||
echo import sys; sys.stdout.write(sys.executable) | (py -3 || py -2 || python3 || python2 || python) > %TEMP%\pythonlocation.txt 2> NUL | ||
set /p PYTHON=<%TEMP%\pythonlocation.txt | ||
|
||
if /i "%__BuildNative%"=="1" ( | ||
if NOT DEFINED PYTHON ( | ||
echo %__MsgPrefix%Error: Could not find a python installation | ||
exit /b 1 | ||
) | ||
|
||
echo %__MsgPrefix%Laying out dynamically generated files consumed by the native build system | ||
echo %__MsgPrefix%Laying out dynamically generated Event test files and etmdummy stub functions | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEventing.py --inc %__IntermediatesIncDir% --dummy %__IntermediatesIncDir%\etmdummy.h --man %__SourceDir%\vm\ClrEtwAll.man --nonextern || exit /b 1 | ||
|
||
echo %__MsgPrefix%Laying out dynamically generated EventPipe Implementation | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEventPipe.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate %__IntermediatesEventingDir%\eventpipe --nonextern || exit /b 1 | ||
|
||
echo %__MsgPrefix%Laying out ETW event logging interface | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEtwProvider.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate %__IntermediatesIncDir% --exc %__SourceDir%\vm\ClrEtwAllMeta.lst || exit /b 1 | ||
) | ||
|
||
if /i "%__DoCrossArchBuild%"=="1" ( | ||
if NOT DEFINED PYTHON ( | ||
echo %__MsgPrefix%Error: Could not find a python installation | ||
exit /b 1 | ||
) | ||
|
||
set __CrossCompIntermediatesIncDir=%__CrossCompIntermediatesDir%\src\inc | ||
set __CrossCompIntermediatesEventingDir=%__CrossCompIntermediatesDir%\eventing | ||
|
||
echo %__MsgPrefix%Laying out dynamically generated files consumed by the crossarch build system | ||
echo %__MsgPrefix%Laying out dynamically generated Event test files and etmdummy stub functions | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEventing.py --inc !__CrossCompIntermediatesIncDir! --dummy !__CrossCompIntermediatesIncDir!\etmdummy.h --man %__SourceDir%\vm\ClrEtwAll.man --nonextern || exit /b 1 | ||
|
||
echo %__MsgPrefix%Laying out dynamically generated EventPipe Implementation | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEventPipe.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate !__CrossCompIntermediatesEventingDir!\eventpipe --nonextern || exit /b 1 | ||
|
||
echo %__MsgPrefix%Laying out ETW event logging interface | ||
!PYTHON! -B -Wall %__SourceDir%\scripts\genEtwProvider.py --man %__SourceDir%\vm\ClrEtwAll.man --intermediate !__CrossCompIntermediatesIncDir! --exc %__SourceDir%\vm\ClrEtwAllMeta.lst || exit /b 1 | ||
) | ||
|
||
REM ========================================================================================= | ||
REM === | ||
REM === Build the CLR VM | ||
|
@@ -476,14 +536,6 @@ REM === Build Cross-Architecture Native Components (if applicable) | |
REM === | ||
REM ========================================================================================= | ||
|
||
if /i "%__BuildArch%"=="arm64" ( | ||
set __DoCrossArchBuild=1 | ||
) | ||
|
||
if /i "%__BuildArch%"=="arm" ( | ||
set __DoCrossArchBuild=1 | ||
) | ||
|
||
if /i "%__DoCrossArchBuild%"=="1" ( | ||
REM Scope environment changes start { | ||
setlocal | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This phase looks unconditional, whether we're building native, corelib, etc. Is that appropriate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take another look at what types of builds actually need these files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured out better conditioning. Thanks for catching this