Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Miscellaneous coverage profiler cleanup tasks #6546

@alexrp

Description

@alexrp

Opening this as a sort of meta-bug to keep track of some relatively small issues with the coverage profiler that should be addressed over time.

  • When we're comfortable bumping the output format version, it would be nice to change the overall structure to be more easily digestible for readers. For example, all class elements should be under an assembly element, all method elements should be under a class element, etc.
  • Type names (and signatures in general) should be fully qualified in the output, and not use C# names like int, long, etc.
  • The way we output generic definitions and generic instantiations needs to be cleaned up and made consistent. For example, if a program has a method Foo<T> () and executes the instantiation Foo<int> (), the output file will mention Foo<int> () with all the correct execution counts, but it will also mention the uninstantiated Foo<T> () with all-zero counts, as if it was uncovered. We should only mention the generic definition (with all the counts from all instantiations merged), not every single instantiation.
  • The data structures (or rather, lack thereof) in the profiler can be simplified. There's no particular reason we need to use a bunch of hash tables to map everything back and forth the way we do. The code would be much easier to read and maintain if we just had some proper structures for representing loaded assemblies, classes, and methods.
  • We should resolve method signatures and such ahead of time instead of doing it when we're dumping coverage data at shutdown. Resolving method signatures during shutdown can cause assemblies to be loaded, and metadata from those will be missing in the output as a result.
  • There's some commented out code relating to zipping of the output. This should either be implemented or removed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions