-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring and fixing of HeapExplorer
* Introduced the `Option<A>` type to represent values that might not be there. * Replaced values representing failure (like `-1`) with `Option` to indicate the possibility of failure. * Replaced possibly-invalid types with `Option`s. Now if you if have an instance - it's guaranteed to be valid. * Replaced magic values (like using positive integers for managed object indexes and negative integers for static object indexes) with proper semantic types to help with code clarity. * Replaced dangerous numeric casts that could under/overflow with typesafe alternatives (`PInt` positive 32bit integer type) that guarantee no such things can happen. * Replaced instances of `List` which were being used as stacks with `Stack`. * Replaced as many fields in objects as possible with readonly ones to indicate that we have no intent of changing them after the object is constructed. This is a part of 'objects should stay valid after construction' philosophy. * Added logging for potentially dangerous operations (like int -> uint). * Replaced primitive loop guards with cycle tracking that tracks seen objects. This eliminates the false positives and errors out sooner if we actually have an error. * Replaced places where things got cancelled silently with emitting warnings / errors. Failures should never be silent. * Fixed algorithm that checks if a type contains reference types: it didn't account for nested value-types which eventually have reference types in them and only looked for reference types in the first level. * Fixed bad lookups in `PackedCoreTypes`. Also made `PackedCoreTypes` to be fully initialized, without any missing entries. * Added a warning about the inability to crawl the `[ThreadStatic]` variables. * Improved search speed by: * caching search results. * downcasing everything before the search and then using fast ordinal string comparisons instead of slower `OrdinalIgnoreCase` comparisons. * Improved documentation by adding new docstrings and converting existing docstrings into proper XMLDocs. Now IDEs and tools can properly render the documentation. * Rewrote a part of code using C# 7.3 (supported since Unity 2019) to enhance readability. * bumped version to 4.1.2 * Added capability to copy the root path as text in "Find GC roots" window. * Added information about source fields that are pointing to the object in "Find GC roots" window. * Added progress reporting to Unity when a memory snapshot is being converted from the Unity format to our format.
- Loading branch information
Showing
77 changed files
with
4,006 additions
and
3,122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.