<commit_before># Viewing JIT Dumps

This document is intended for people interested in seeing the disassembly, GC info, or other details the JIT generates for a managed program.

To make sense of the results, it is recommended you also read the [Reading a JitDump](../botr/ryujit-overview.md#reading-a-jitdump) section of the RyuJIT Overview.

## Setting up our environment

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
* Install the [.NET CLI](http://microsoft.com/net/core), which we'll use to compile/publish our app
* `cd` to where you want your app to be placed, and run `dotnet new`
* Modify your `project.json` file so that it contains a RID (runtime ID) corresponding to the OS you're using in the `runtimes` section. For example, I have a Windows 10 x64 machine, so here's my project file:

```json
{
  "buildOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": "1.0.0-*"
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dnxcore50",
        "portable-net45+win8"
      ]
    }
  },
  "runtimes": {
    "win10-x64": {}
  }
}
```

You can find a list of RIDs and their corresponding OSes [here](http://dotnet.github.io/docs/core-concepts/rid-catalog.html).

* Edit `Program.cs`, and call the method(s) you want to dump in there. Make sure they are, directly or indirectly, called from `Main`. In this example, we'll be looking at the disassembly of our custom function `InefficientJoin`:

```cs
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace ConsoleApplication
{
    public class Program
    {
        public static void Main(string[] args)
        {<commit_msg>Update broken link to RIDs (#7850)<commit_after># Viewing JIT Dumps

This document is intended for people interested in seeing the disassembly, GC info, or other details the JIT generates for a managed program.

To make sense of the results, it is recommended you also read the [Reading a JitDump](../botr/ryujit-overview.md#reading-a-jitdump) section of the RyuJIT Overview.

## Setting up our environment

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
* Install the [.NET CLI](http://microsoft.com/net/core), which we'll use to compile/publish our app
* `cd` to where you want your app to be placed, and run `dotnet new`
* Modify your `project.json` file so that it contains a RID (runtime ID) corresponding to the OS you're using in the `runtimes` section. For example, I have a Windows 10 x64 machine, so here's my project file:

```json
{
  "buildOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": "1.0.0-*"
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dnxcore50",
        "portable-net45+win8"
      ]
    }
  },
  "runtimes": {
    "win10-x64": {}
  }
}
```

You can find a list of RIDs and their corresponding OSes [here](https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog).

* Edit `Program.cs`, and call the method(s) you want to dump in there. Make sure they are, directly or indirectly, called from `Main`. In this example, we'll be looking at the disassembly of our custom function `InefficientJoin`:

```cs
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;

namespace ConsoleApplication
{
    public class Program
    {
        public static void Main(string[] args)
        {
{'fraction_non_alphanumeric': 0.10204638472032743, 'fraction_numerical': 0.010914051841746248, 'mean_word_length': 3.554037267080745, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422641', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1103, 'n_words': 465}