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

Dependency Analysis Framework#42

Merged
davidwrighton merged 1 commit into
dotnet:masterfrom
davidwrighton:dependency_analysis_framework_update
Oct 13, 2015
Merged

Dependency Analysis Framework#42
davidwrighton merged 1 commit into
dotnet:masterfrom
davidwrighton:dependency_analysis_framework_update

Conversation

@davidwrighton
Copy link
Copy Markdown
Member

Dependency analysis allows tracing what output components depend on other components from a root set instead of simply working with a list of already loaded things.

This patch adds a framework for performing this computation, but no rules that are specific to compiling ILToNative. That will be followon work.

Included in this change

  • DependencyAnalyzerBase
    • Api surface for use of analyzer.
  • DependencyAnalyzer
    • Object that should actually be constructed to perform analysis. Not intended for most use, so as to allow dynamic switching between various particular specializations.
    • Specialized over a mark strategy. (The mark strategy specialization allows log customization)
  • DependencyNodeCore/DependencyNode
    • Base type of dependency node in depedency graph. Provides a set of facilities to describe dependents.
  • IDependencyAnalysisMarkStrategy
    • Interface underlying mark logging customization.
    • Provided mark strategies
    • NoLogStrtegy, no support for logging.
      • Marks, but doesn't log anything. Most memory/performance efficient approach. Expected to be used in retail builds by default for best performance.
    • FirstMarkLogStrategy, the first edge to mark a node is logged
      • More memory efficient logging at mark points. In particular, only logs mark's that newly mark a node.
    • FullGraphLogStrategy
      • Used when the ability to generate a complete log of the graph is important. Fairly memory intensive due to the presence of a great many allocated hash tables
  • DgmlWriter
    • Interfaces with DependencyAnalyzer and various mark strategies to generate a DGML graph of the dependencies. DGML graphs can be viewed in Visual Studio
  • Tests
    • Basic unit test framework in place
    • All types of dependency are tested to minimal standards
    • DGML logging is tested.

@davidwrighton
Copy link
Copy Markdown
Member Author

@MichalStrehovsky @jkotas , could the two of you take a look at this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: System.Reflection.Metadata is probably not needed for this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gone.

Dependency analysis allows tracing what output components depend on other components from a root set instead of simply working with a list of already loaded things.

This patch adds a framework for performing this computation, but no rules that are specific to compiling ILToNative. That will be follow on work.

Included in this change

- DependencyAnalyzerBase
 - Api surface for use of analyzer.
- DependencyAnalyzer
 - Object that should actually be constructed to perform analysis. Not intended for most use, so as to allow dynamic switching between various particular specializations.
 - Specialized over a mark strategy. (The mark strategy specialization allows log customization)
- DependencyNodeCore/DependencyNode
 - Base type of dependency node in depedency graph. Provides a set of facilities to describe dependents.
- IDependencyAnalysisMarkStrategy
 - Interface underlying mark logging customization.
 - Provided mark strategies
  - NoLogStrategy, no support for logging.
   - Marks, but doesn't log anything. Most memory/performance efficient approach. Expected to be used in retail builds by default for best performance.
  - FirstMarkLogStrategy, the first edge to mark a node is logged
   - More memory efficient logging at mark points. In particular, only logs mark's that newly mark a node.
  - FullGraphLogStrategy
   - Used when the ability to generate a complete log of the graph is important. Fairly memory intensive due to the presence of a great many allocated hash tables
- DgmlWriter
 - Interfaces with DependencyAnalyzer and various mark strategies to generate a DGML graph of the dependencies. DGML graphs can be viewed in Visual Studio
- Tests
 - Basic unit test framework in place
 - All types of dependency are tested to minimal standards
 - DGML logging is tested.
@MichalStrehovsky
Copy link
Copy Markdown
Member

LGTM

davidwrighton added a commit that referenced this pull request Oct 13, 2015
@davidwrighton davidwrighton merged commit e819560 into dotnet:master Oct 13, 2015
@davidwrighton davidwrighton deleted the dependency_analysis_framework_update branch November 3, 2015 21:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants