Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Improve documentation around Dependency analysis (#8045)
Browse files Browse the repository at this point in the history
* Improve documentation around Dependency analysis
- Clarify not supported usage for ILCompiler-DependencyGraph-Viewer
- Mention about existence of WhyDGML tool
Closes: #8044, #8043
  • Loading branch information
kant2002 committed Mar 20, 2020
1 parent 4bd09da commit 58945e6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Documentation/how-to-debug-compiler-dependency-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Analysis techniques for the dependency graph.
1. Use the ILCompiler-DependencyGraph-Viewer tool (if running on Windows). This tool is located in src\ILCompiler.DependencyAnalysisFramework\ILCompiler-DependencyGraph-Viewer
- This is the only convenient way to examine the graph while also simultaneously debugging the compiler.
- While this is currently Windows only due to use of WinForms, it would be fairly straightforward to make a command line based tool.
- Dependency graph does not support multiple simultaneous logging facilities, so make sure that you do not set IlcGenerateDgmlFile or invoke ILCompiler with the DGML generation turned on.
2. Pass command line switches to the compiler to generate a dependency graph dgml file. This will produce the same data as is viewable in the viewer tool, but in a textual xml format.
- Future efforts may make the xml file loadable by the viewer tool.
3. Instrument the compiler dependency analysis. (This may be necessary in cases where the viewer is unable to provide sufficient information about why the graph is structured as it is.)
Expand Down Expand Up @@ -35,3 +36,12 @@ Usage instructions:
Once the interesting node(s) have been identified in the dependency graph window, select one of them, and then press Explore.
- In the Node Explorer window, the Dependent nodes (the ones which dependend on the current node are the nodes displayed above, and the Dependee nodes (the nodes that this node depends on) are displayed below. Each node in the list is paired with a textual reason as to why that edge in the graph exists.
- Select a node to explore further and press the corresponding button to make it happen.

WhyDGML
=======
This tool visualizes paths from a node of interest to the roots.
The input to the tool is the DGML file and name of a node of interest. The output is the list of reasons why that node was included.

This tool located in folder `src\ILCompiler.DependencyAnalysisFramework\WhyDgml`

See https://github.com/dotnet/corert/pull/7962 for example of usage and output.

0 comments on commit 58945e6

Please sign in to comment.