From a3468372f80e9b8056f668b43a07f8b28de4e10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Wed, 21 Mar 2018 01:56:41 +0100 Subject: Updated steps in 'Viewing JIT Dumps' to see optimized code (#17077) If one follows the current described steps, one won't see the JIT dump for optimized code in the core lib. This PR adds the necessary step to see optimized code. Cf. https://github.com/dotnet/coreclr/issues/17065#issuecomment-374772011 --- Documentation/building/viewing-jit-dumps.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Documentation/building/viewing-jit-dumps.md b/Documentation/building/viewing-jit-dumps.md index b16b43197f..58dd2257fe 100644 --- a/Documentation/building/viewing-jit-dumps.md +++ b/Documentation/building/viewing-jit-dumps.md @@ -8,8 +8,9 @@ To make sense of the results, it is recommended you also read the [Reading a Jit The first thing we want to do is setup the .NET Core app we want to dump. Here are the steps to do this, if you don't have one ready: -* Perform a debug build of the CoreCLR repo. You don't need to build tests, so you can pass `skiptests` to the build command to make it faster. -* Install the [.NET CLI 2.0 preview](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md), which we'll use to compile/publish our app. +* Perform a release build of the CoreCLR repo by passing `release` to the build command. You don't need to build tests, so you can pass `skiptests` to the build command to make it faster. Note: the release build can be skipped, but in order to see optimized in the core library it is needed. +* Perform a debug build of the CoreCLR repo. Tests aren't needed as in the release build, so you can pass `skiptests` to the build command. Note: the debug build is necessary, so that the JIT recognizes the configuration knobs. +* Install the [.NET CLI 2.1 preview](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md), which we'll use to compile/publish our app. * `cd` to where you want your app to be placed, and run `dotnet new console`. * Modify your `csproj` file so that it contains a RID (runtime ID) corresponding to the OS you're using in the `` tag. For example, for Windows 10 x64 machine, the project file is: @@ -61,10 +62,12 @@ The first thing we want to do is setup the .NET Core app we want to dump. Here a ```shell # Windows - robocopy /e \bin\Product\Windows_NT..Debug \bin\Release\netcoreapp2.0\\publish > NUL + robocopy /e \bin\Product\Windows_NT..Release \bin\Release\netcoreapp2.0\\publish > NUL + copy \bin\Product\Windows_NT..Debug\clrjit.dll \bin\Release\netcoreapp2.0\\publish > NUL # Unix - cp -rT /bin/Product/..Debug /bin/Release/netcoreapp2.0//publish + cp -rT /bin/Product/..Release /bin/Release/netcoreapp2.0//publish + cp /bin/Product/..Debug/libclrjit.so /bin/Release/netcoreapp2.0//publish ``` * Set the configuration knobs you need (see below) and run your published app. The info you want should be dumped to stdout. -- cgit v1.2.3