-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Locally built runtime & getting JitDisasm #342
Comments
If you want to get the dism of the jit I would recommend using JitDasm. It is easy to use and give nice results by showing not only the dism but also per C# line of code: https://github.com/0xd4d/JitDasm If that is not an option for you please ignore my message. |
Another useful tool designed for coreclr developer is https://github.com/EgorBo/Disasmo . |
In my case I would ideally want to get disasm directly from the Jit |
@yahorsi You can use the following instructions to get it done https://github.com/dotnet/runtime/blob/fd9969e88819b26fe7efae70b817b10d11469d56/docs/workflow/testing/viewing-jit-dumps.md |
Thank you, I used the same instruction but from the coreclr repo and it didn't work for me. I then highlighted some questions in the initial post. E.g., the instruction says to copy from the Release build and then from the debug build - is that correct? And 1st path to copy from does not look correct, at least for the runtime repo
|
Yes, though I would use the checked and not the debug build. It's rare for the extra checks that the debug build may have to be useful and it can be very slow in some case because it is compiled with optimizations disabled. In any case, the idea is that the release JIT build does not have the disassembler code built in so you need the JIT from a debug or checked build. And it has to be the same version as the runtime so you usually need to copy the runtime as well, the one published with the app may be incompatible with the locally built JIT. I don't think the runtime you copy must be a release build, debug/checked should work too.
What exactly is incorrect? Seems fine to me but FWIW I never paid attention to this doc as I prefer to just use |
It would be great if somebody could update the instructions in the doc. I'm sure it's outdated, the docs are currently in a messy state. |
Related to: #304 |
@yahorsi are you still blocked by this or can we close the issue now? The docs should be updated by now. |
@ViktorHofer Please close. Thank you |
Hi Guys,
Today I decided to get my hands dirty, I cloned dotnet/runtime and successfully compiled (the only problem I got is with "DIA SDK" ).
As the next step, I wanted to get disasm generated by Jit for the very simple console app.
I found instruction in the old coreclr repo (https://github.com/dotnet/coreclr/blob/master/Documentation/building/viewing-jit-dumps.md)
Doc seems a bit outdated and not clear in some places.
E.g.
So, 2 copy commands
1st states I need to copy from the Windows_NT..Release to the publish folder --- Is that correct? I mean should it be really release folder? As I understand when I run build.cmd by default I get just debug build. If it is correct how could I compile in the release and debug modes?
2ns states to copy just clrjit.dll, without it PBD's to the publish folder, again Is that correct?
What I did is that after I just copied all from
to the my app \publish folder. The app seems to be OK and starts, the only problem is that I do not see anything dumped in my stdout. As I said the app is a console app and compiled as Exe, so to run it I have created simple CMD file like
Thank you for your help
The text was updated successfully, but these errors were encountered: