diff --git a/.gitattributes b/.gitattributes index 1ff0c42..5896c16 100644 --- a/.gitattributes +++ b/.gitattributes @@ -17,7 +17,7 @@ # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following +# the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below @@ -46,9 +46,9 @@ ############################################################################### # diff behavior for common document formats -# +# # Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the +# is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain diff --git a/AbstractMemorySnapshot/HeapSegment.cs b/AbstractMemorySnapshot/HeapSegment.cs index 03860b6..41af359 100644 --- a/AbstractMemorySnapshot/HeapSegment.cs +++ b/AbstractMemorySnapshot/HeapSegment.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.AbstractMemorySnapshot { diff --git a/AbstractMemorySnapshot/IMemoryAccessor.cs b/AbstractMemorySnapshot/IMemoryAccessor.cs index 269bdb5..a62c38d 100644 --- a/AbstractMemorySnapshot/IMemoryAccessor.cs +++ b/AbstractMemorySnapshot/IMemoryAccessor.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.AbstractMemorySnapshot { diff --git a/AbstractMemorySnapshot/InvalidSnapshotFormatException.cs b/AbstractMemorySnapshot/InvalidSnapshotFormatException.cs index a4cad96..a708d7a 100644 --- a/AbstractMemorySnapshot/InvalidSnapshotFormatException.cs +++ b/AbstractMemorySnapshot/InvalidSnapshotFormatException.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/AbstractMemorySnapshot/MemorySnapshot.cs b/AbstractMemorySnapshot/MemorySnapshot.cs index 882adcb..843d751 100644 --- a/AbstractMemorySnapshot/MemorySnapshot.cs +++ b/AbstractMemorySnapshot/MemorySnapshot.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/AbstractMemorySnapshot/MemorySnapshotLoader.cs b/AbstractMemorySnapshot/MemorySnapshotLoader.cs index 6636f54..6fdda60 100644 --- a/AbstractMemorySnapshot/MemorySnapshotLoader.cs +++ b/AbstractMemorySnapshot/MemorySnapshotLoader.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.AbstractMemorySnapshot { diff --git a/AbstractMemorySnapshot/MemoryView.cs b/AbstractMemorySnapshot/MemoryView.cs index 2a62981..5d9e4d8 100644 --- a/AbstractMemorySnapshot/MemoryView.cs +++ b/AbstractMemorySnapshot/MemoryView.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Runtime.InteropServices; diff --git a/AbstractMemorySnapshot/Native.cs b/AbstractMemorySnapshot/Native.cs index 9e4e4c2..aae59c7 100644 --- a/AbstractMemorySnapshot/Native.cs +++ b/AbstractMemorySnapshot/Native.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.AbstractMemorySnapshot { diff --git a/AbstractMemorySnapshot/NativeWord.cs b/AbstractMemorySnapshot/NativeWord.cs index 3ae0a93..3cfed0a 100644 --- a/AbstractMemorySnapshot/NativeWord.cs +++ b/AbstractMemorySnapshot/NativeWord.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/AbstractMemorySnapshot/PointerInfo.cs b/AbstractMemorySnapshot/PointerInfo.cs index 679ffda..67f3577 100644 --- a/AbstractMemorySnapshot/PointerInfo.cs +++ b/AbstractMemorySnapshot/PointerInfo.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/AbstractMemorySnapshot/ReferenceClassifierFactory.cs b/AbstractMemorySnapshot/ReferenceClassifierFactory.cs index 16fbc0e..43a82da 100644 --- a/AbstractMemorySnapshot/ReferenceClassifierFactory.cs +++ b/AbstractMemorySnapshot/ReferenceClassifierFactory.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Collections.Generic; diff --git a/AbstractMemorySnapshot/SegmentedHeap.cs b/AbstractMemorySnapshot/SegmentedHeap.cs index 64c5ef9..57713dc 100644 --- a/AbstractMemorySnapshot/SegmentedHeap.cs +++ b/AbstractMemorySnapshot/SegmentedHeap.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/AbstractMemorySnapshot/TraceableHeap.cs b/AbstractMemorySnapshot/TraceableHeap.cs index b267d99..49dab4c 100644 --- a/AbstractMemorySnapshot/TraceableHeap.cs +++ b/AbstractMemorySnapshot/TraceableHeap.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Collections.Generic; diff --git a/AbstractMemorySnapshot/TypeSet.cs b/AbstractMemorySnapshot/TypeSet.cs index 08251f4..660dbc3 100644 --- a/AbstractMemorySnapshot/TypeSet.cs +++ b/AbstractMemorySnapshot/TypeSet.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/AbstractMemorySnapshot/TypeSystem.cs b/AbstractMemorySnapshot/TypeSystem.cs index c6b4390..18225e2 100644 --- a/AbstractMemorySnapshot/TypeSystem.cs +++ b/AbstractMemorySnapshot/TypeSystem.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/Analysis/Backtracer.cs b/Analysis/Backtracer.cs index 011aa81..d4e41a9 100644 --- a/Analysis/Backtracer.cs +++ b/Analysis/Backtracer.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/Analysis/GroupingBacktracer.cs b/Analysis/GroupingBacktracer.cs index bcacdc4..1b7cbf5 100644 --- a/Analysis/GroupingBacktracer.cs +++ b/Analysis/GroupingBacktracer.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/Analysis/HeapDom.cs b/Analysis/HeapDom.cs index cb5a0d6..be388e0 100644 --- a/Analysis/HeapDom.cs +++ b/Analysis/HeapDom.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/Analysis/IBacktracer.cs b/Analysis/IBacktracer.cs index 74f009d..b07b69c 100644 --- a/Analysis/IBacktracer.cs +++ b/Analysis/IBacktracer.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Collections.Generic; diff --git a/Analysis/IRootSet.cs b/Analysis/IRootSet.cs index f82166d..dfd47c7 100644 --- a/Analysis/IRootSet.cs +++ b/Analysis/IRootSet.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; diff --git a/Analysis/RootSet.cs b/Analysis/RootSet.cs index 03e4e5c..9e86465 100644 --- a/Analysis/RootSet.cs +++ b/Analysis/RootSet.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/Analysis/SingletonRootSet.cs b/Analysis/SingletonRootSet.cs index 2c89049..4c1bc90 100644 --- a/Analysis/SingletonRootSet.cs +++ b/Analysis/SingletonRootSet.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; diff --git a/Analysis/StitchedTraceableHeap.cs b/Analysis/StitchedTraceableHeap.cs index b16a5d9..8d6a03d 100644 --- a/Analysis/StitchedTraceableHeap.cs +++ b/Analysis/StitchedTraceableHeap.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/Analysis/StitchedTypeSystem.cs b/Analysis/StitchedTypeSystem.cs index b056213..93abaa7 100644 --- a/Analysis/StitchedTypeSystem.cs +++ b/Analysis/StitchedTypeSystem.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/Analysis/TracedHeap.cs b/Analysis/TracedHeap.cs index 8c86f09..6600cc5 100644 --- a/Analysis/TracedHeap.cs +++ b/Analysis/TracedHeap.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index cf9dc24..3232ed6 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -77,4 +77,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq \ No newline at end of file +https://www.contributor-covenant.org/faq diff --git a/CommandInfrastructure/Command.cs b/CommandInfrastructure/Command.cs index ef7cca6..7cfc146 100644 --- a/CommandInfrastructure/Command.cs +++ b/CommandInfrastructure/Command.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.Analysis; diff --git a/CommandInfrastructure/CommandException.cs b/CommandInfrastructure/CommandException.cs index f3600bb..a5cdb73 100644 --- a/CommandInfrastructure/CommandException.cs +++ b/CommandInfrastructure/CommandException.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/CommandInfrastructure/CommandLine.cs b/CommandInfrastructure/CommandLine.cs index 5835e3f..408f262 100644 --- a/CommandInfrastructure/CommandLine.cs +++ b/CommandInfrastructure/CommandLine.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.CommandInfrastructure { diff --git a/CommandInfrastructure/CommandLineArgument.cs b/CommandInfrastructure/CommandLineArgument.cs index 7382667..d7454cf 100644 --- a/CommandInfrastructure/CommandLineArgument.cs +++ b/CommandInfrastructure/CommandLineArgument.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/CommandInfrastructure/CommandLineArgumentType.cs b/CommandInfrastructure/CommandLineArgumentType.cs index 3cd743d..9b3674b 100644 --- a/CommandInfrastructure/CommandLineArgumentType.cs +++ b/CommandInfrastructure/CommandLineArgumentType.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.CommandInfrastructure { diff --git a/CommandInfrastructure/CommandLineParser.cs b/CommandInfrastructure/CommandLineParser.cs index 1307752..e28658a 100644 --- a/CommandInfrastructure/CommandLineParser.cs +++ b/CommandInfrastructure/CommandLineParser.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/CommandInfrastructure/CommandLineTokenizer.cs b/CommandInfrastructure/CommandLineTokenizer.cs index 5969cf4..196ba8f 100644 --- a/CommandInfrastructure/CommandLineTokenizer.cs +++ b/CommandInfrastructure/CommandLineTokenizer.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Text; diff --git a/CommandInfrastructure/ConsoleOutput.cs b/CommandInfrastructure/ConsoleOutput.cs index aa8f783..6500a59 100644 --- a/CommandInfrastructure/ConsoleOutput.cs +++ b/CommandInfrastructure/ConsoleOutput.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/CommandInfrastructure/Context.cs b/CommandInfrastructure/Context.cs index 9e5cc17..6a68eee 100644 --- a/CommandInfrastructure/Context.cs +++ b/CommandInfrastructure/Context.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.Analysis; diff --git a/CommandInfrastructure/FileOutput.cs b/CommandInfrastructure/FileOutput.cs index 06c8333..a944fae 100644 --- a/CommandInfrastructure/FileOutput.cs +++ b/CommandInfrastructure/FileOutput.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/CommandInfrastructure/FlagArgumentAttribute.cs b/CommandInfrastructure/FlagArgumentAttribute.cs index 0a1ae5c..2556611 100644 --- a/CommandInfrastructure/FlagArgumentAttribute.cs +++ b/CommandInfrastructure/FlagArgumentAttribute.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/CommandInfrastructure/IOutput.cs b/CommandInfrastructure/IOutput.cs index 0a18e01..54f5bfe 100644 --- a/CommandInfrastructure/IOutput.cs +++ b/CommandInfrastructure/IOutput.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.CommandInfrastructure { diff --git a/CommandInfrastructure/NamedArgumentAttribute.cs b/CommandInfrastructure/NamedArgumentAttribute.cs index 0cecb19..ed3c188 100644 --- a/CommandInfrastructure/NamedArgumentAttribute.cs +++ b/CommandInfrastructure/NamedArgumentAttribute.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/CommandInfrastructure/PositionalArgumentAttribute.cs b/CommandInfrastructure/PositionalArgumentAttribute.cs index 6738ec8..fd85f87 100644 --- a/CommandInfrastructure/PositionalArgumentAttribute.cs +++ b/CommandInfrastructure/PositionalArgumentAttribute.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; diff --git a/CommandInfrastructure/Repl.cs b/CommandInfrastructure/Repl.cs index 733cef3..757e551 100644 --- a/CommandInfrastructure/Repl.cs +++ b/CommandInfrastructure/Repl.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.ReferenceClassifiers; diff --git a/CommandInfrastructure/Token.cs b/CommandInfrastructure/Token.cs index b755c20..1fa6321 100644 --- a/CommandInfrastructure/Token.cs +++ b/CommandInfrastructure/Token.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.CommandInfrastructure { diff --git a/Commands/BacktraceCommand.cs b/Commands/BacktraceCommand.cs index 15be580..91dfba6 100644 --- a/Commands/BacktraceCommand.cs +++ b/Commands/BacktraceCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/ClearConsoleCommand.cs b/Commands/ClearConsoleCommand.cs index 487dc19..9bc7b16 100644 --- a/Commands/ClearConsoleCommand.cs +++ b/Commands/ClearConsoleCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/ContextCommand.cs b/Commands/ContextCommand.cs index 940c4f0..8ac94fa 100644 --- a/Commands/ContextCommand.cs +++ b/Commands/ContextCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/DescribeCommand.cs b/Commands/DescribeCommand.cs index 984db4e..e58b753 100644 --- a/Commands/DescribeCommand.cs +++ b/Commands/DescribeCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Text; using MemorySnapshotAnalyzer.AbstractMemorySnapshot; diff --git a/Commands/DumpAssembliesCommand.cs b/Commands/DumpAssembliesCommand.cs index 91c7228..4d79438 100644 --- a/Commands/DumpAssembliesCommand.cs +++ b/Commands/DumpAssembliesCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/DumpCommand.cs b/Commands/DumpCommand.cs index 832e595..0d8886c 100644 --- a/Commands/DumpCommand.cs +++ b/Commands/DumpCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Text; using MemorySnapshotAnalyzer.AbstractMemorySnapshot; diff --git a/Commands/DumpInvalidReferencesCommand.cs b/Commands/DumpInvalidReferencesCommand.cs index b995658..989dfa5 100644 --- a/Commands/DumpInvalidReferencesCommand.cs +++ b/Commands/DumpInvalidReferencesCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/DumpObjectCommand.cs b/Commands/DumpObjectCommand.cs index e2dd56b..ba549f7 100644 --- a/Commands/DumpObjectCommand.cs +++ b/Commands/DumpObjectCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/DumpRootsCommand.cs b/Commands/DumpRootsCommand.cs index 218bcac..d838a8b 100644 --- a/Commands/DumpRootsCommand.cs +++ b/Commands/DumpRootsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.Analysis; diff --git a/Commands/DumpSegmentCommand.cs b/Commands/DumpSegmentCommand.cs index 90f9772..d6a65f6 100644 --- a/Commands/DumpSegmentCommand.cs +++ b/Commands/DumpSegmentCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/DumpTypeCommand.cs b/Commands/DumpTypeCommand.cs index 2a66152..ceb7b52 100644 --- a/Commands/DumpTypeCommand.cs +++ b/Commands/DumpTypeCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/ExitCommand.cs b/Commands/ExitCommand.cs index bb81284..dda96e8 100644 --- a/Commands/ExitCommand.cs +++ b/Commands/ExitCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; using System; diff --git a/Commands/FindCommand.cs b/Commands/FindCommand.cs index 718ec68..5f70408 100644 --- a/Commands/FindCommand.cs +++ b/Commands/FindCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/HeapDomCommand.cs b/Commands/HeapDomCommand.cs index 43621ad..72d6daf 100644 --- a/Commands/HeapDomCommand.cs +++ b/Commands/HeapDomCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/HeapDomStatsCommand.cs b/Commands/HeapDomStatsCommand.cs index baeb91b..2c109bb 100644 --- a/Commands/HeapDomStatsCommand.cs +++ b/Commands/HeapDomStatsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; using System; diff --git a/Commands/HelpCommand.cs b/Commands/HelpCommand.cs index e301043..34bb44a 100644 --- a/Commands/HelpCommand.cs +++ b/Commands/HelpCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/ListObjectsCommand.cs b/Commands/ListObjectsCommand.cs index 097a944..8ec9952 100644 --- a/Commands/ListObjectsCommand.cs +++ b/Commands/ListObjectsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/ListSegmentsCommand.cs b/Commands/ListSegmentsCommand.cs index 2966c8b..ed6c50f 100644 --- a/Commands/ListSegmentsCommand.cs +++ b/Commands/ListSegmentsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/LoadCommand.cs b/Commands/LoadCommand.cs index 116ec8c..d77bea5 100644 --- a/Commands/LoadCommand.cs +++ b/Commands/LoadCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/OptionsCommand.cs b/Commands/OptionsCommand.cs index d8efbb9..903fb9c 100644 --- a/Commands/OptionsCommand.cs +++ b/Commands/OptionsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/Commands/PrintCommand.cs b/Commands/PrintCommand.cs index 18e48c8..b1d8685 100644 --- a/Commands/PrintCommand.cs +++ b/Commands/PrintCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; using System; diff --git a/Commands/ReferenceClassifierCommand.cs b/Commands/ReferenceClassifierCommand.cs index 232b5e5..f28a091 100644 --- a/Commands/ReferenceClassifierCommand.cs +++ b/Commands/ReferenceClassifierCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; using MemorySnapshotAnalyzer.ReferenceClassifiers; diff --git a/Commands/StatsCommand.cs b/Commands/StatsCommand.cs index 0e136ca..54cb3c2 100644 --- a/Commands/StatsCommand.cs +++ b/Commands/StatsCommand.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using MemorySnapshotAnalyzer.CommandInfrastructure; diff --git a/MemorySnapshotAnalyzer/Program.cs b/MemorySnapshotAnalyzer/Program.cs index 864bd1f..5e697e4 100644 --- a/MemorySnapshotAnalyzer/Program.cs +++ b/MemorySnapshotAnalyzer/Program.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.CommandInfrastructure; using MemorySnapshotAnalyzer.Commands; diff --git a/MemorySnapshotAnalyzer/treemap.html b/MemorySnapshotAnalyzer/treemap.html index 66e166f..fdd65b4 100644 --- a/MemorySnapshotAnalyzer/treemap.html +++ b/MemorySnapshotAnalyzer/treemap.html @@ -240,4 +240,4 @@ - \ No newline at end of file + diff --git a/README.md b/README.md index 60b2ec4..93d0cc5 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ The `referenceclassifier 'load` command takes the name of a configuration file w * A *field pattern* is either a field name, which needs to match exactly, or a prefix followed by an asterisk ('`*`'). A *selector* is a *field pattern* optionally followed by a sequence of field names and/or "`[]`" (indicating array indexing). This provides support for collections; for instance, to indicate that all values in field `foo` of a generic dictionary type are owning references, an appropriate selector could be `"foo._entries[].value"`. * Specific rule keywords are: * **`OWNS`:** An "owns" rule takes a selector as an argument, enclosed in double quotes. An "owns" rule indicates that the object of the given type is the owner of objects directly reachable via the selector. A full example of an "owns" rule is: `"foo.dll:MyNamespace.MyType" OWNS "foo._entries[].value";`. - * **`WEAK`:** A "weak" rule takes a field pattern as argument. The object reached via this field pattern is considered "weakly" referenced (an analysis concept – not to be confused with a .NET `WeakReference`). If an object is referenced by multiple other objects, and some of these references are weak, while others are not, weak references will be ignored when computing backtraces (and/or the dominator tree). + * **`WEAK`:** A "weak" rule takes a field pattern as argument. The object reached via this field pattern is considered "weakly" referenced (an analysis concept - not to be confused with a .NET `WeakReference`). If an object is referenced by multiple other objects, and some of these references are weak, while others are not, weak references will be ignored when computing backtraces (and/or the dominator tree). * **`EXTERNAL`:** An "external" rule takes a field pattern as argument. The field is considered to contain a native-word sized pointer, referencing an object on another heap. This is to be used in conjunction with the `stitched` heap option. * **`TAG(tag,...)`:** A "tag" rule takes a selector as argument. The object reachable via the selector is assigned the given tags. Object tags are displayed when listing objects and in backtraces. * **`TAG_IF_ZERO(tag,...)`, `TAG_IF_NONZERO(tag,...)`:** A "conditional tag" rule takes a field pattern as argument. If the condition is true for an object (its given field is zero/non-zero), the given tags are assigned to the object containing the field. @@ -125,7 +125,7 @@ However, for individual analysis contexts, you can choose to enable a specific s ### Tips for Chasing Down Memory Leaks Using Reference Classifiers and Lifelines -When an object on a managed heap is not considered, according to the design of the program, as one that – after this point in time in the program's execution – should no longer be accessed, but that is still reachable in the object graph. The "leaked" object will, in turn, possibly hold a possibly-substantial graph of objects live (the subtree under the object's node in the dominator tree). +When an object on a managed heap is not considered, according to the design of the program, as one that - after this point in time in the program's execution - should no longer be accessed, but that is still reachable in the object graph. The "leaked" object will, in turn, possibly hold a possibly-substantial graph of objects live (the subtree under the object's node in the dominator tree). Here are some tips that can be helpful for identifying leaked objects and fixing the cause for the leak: 1. If you suspect objects of a specific type to be leaked, construct a reference classifier configuration file that identifies the "owning references" through which instances of this type would usually be reached, before they are leaked. Then use `listobj 'unowned` to dump instances of this type that are still reachable on the heap, but only in other (unintended) ways than the owning reference. diff --git a/ReferenceClassifiers/BoundRuleset.cs b/ReferenceClassifiers/BoundRuleset.cs index cd0a6a9..964dcbb 100644 --- a/ReferenceClassifiers/BoundRuleset.cs +++ b/ReferenceClassifiers/BoundRuleset.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/ReferenceClassifiers/Matcher.cs b/ReferenceClassifiers/Matcher.cs index 24b7943..d080965 100644 --- a/ReferenceClassifiers/Matcher.cs +++ b/ReferenceClassifiers/Matcher.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/ReferenceClassifiers/ReferenceClassifierFileTokenizer.cs b/ReferenceClassifiers/ReferenceClassifierFileTokenizer.cs index af9e1f7..3694b37 100644 --- a/ReferenceClassifiers/ReferenceClassifierFileTokenizer.cs +++ b/ReferenceClassifiers/ReferenceClassifierFileTokenizer.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/ReferenceClassifiers/ReferenceClassifierGroup.cs b/ReferenceClassifiers/ReferenceClassifierGroup.cs index 9fe8be9..bcda128 100644 --- a/ReferenceClassifiers/ReferenceClassifierGroup.cs +++ b/ReferenceClassifiers/ReferenceClassifierGroup.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Collections.Generic; diff --git a/ReferenceClassifiers/ReferenceClassifierParser.cs b/ReferenceClassifiers/ReferenceClassifierParser.cs index 3300c00..3b63e68 100644 --- a/ReferenceClassifiers/ReferenceClassifierParser.cs +++ b/ReferenceClassifiers/ReferenceClassifierParser.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/ReferenceClassifiers/ReferenceClassifierStore.cs b/ReferenceClassifiers/ReferenceClassifierStore.cs index 0046043..ae8bae8 100644 --- a/ReferenceClassifiers/ReferenceClassifierStore.cs +++ b/ReferenceClassifiers/ReferenceClassifierStore.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; @@ -72,4 +77,4 @@ internal BoundRuleset Bind(TypeSystem typeSystem, SortedSet activeGroups return new BoundRuleset(typeSystem, rules); } } -} \ No newline at end of file +} diff --git a/ReferenceClassifiers/RuleBasedReferenceClassifierFactory.cs b/ReferenceClassifiers/RuleBasedReferenceClassifierFactory.cs index 64c5110..507de40 100644 --- a/ReferenceClassifiers/RuleBasedReferenceClassifierFactory.cs +++ b/ReferenceClassifiers/RuleBasedReferenceClassifierFactory.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/ReferenceClassifiers/Rules.cs b/ReferenceClassifiers/Rules.cs index d2b53c1..f97c701 100644 --- a/ReferenceClassifiers/Rules.cs +++ b/ReferenceClassifiers/Rules.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System; using System.Collections.Generic; diff --git a/UnityBackend/ChapterObject.cs b/UnityBackend/ChapterObject.cs index 7020eba..c7b649f 100644 --- a/UnityBackend/ChapterObject.cs +++ b/UnityBackend/ChapterObject.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.IO.MemoryMappedFiles; diff --git a/UnityBackend/ChapterType.cs b/UnityBackend/ChapterType.cs index 53a34a4..22c6bf8 100644 --- a/UnityBackend/ChapterType.cs +++ b/UnityBackend/ChapterType.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ namespace MemorySnapshotAnalyzer.UnityBackend { @@ -16,8 +21,8 @@ namespace MemorySnapshotAnalyzer.UnityBackend + Chapter NativeTypes_NativeBaseTypeArrayIndex: array of length 319, element size 4 + Chapter NativeObjects_NativeTypeArrayIndex: array of length 175046, element size 4 - + Chapter NativeObjects_HideFlags: array of length 175046, element size 4 - + Chapter NativeObjects_Flags: array of length 175046, element size 4 + Chapter NativeObjects_HideFlags: array of length 175046, element size 4 + Chapter NativeObjects_Flags: array of length 175046, element size 4 + Chapter NativeObjects_InstanceId: array of length 175046, element size 4 + Chapter NativeObjects_Name: array of length 175046, variable element size + Chapter NativeObjects_NativeObjectAddress: array of length 175046, element size 8 diff --git a/UnityBackend/ChunkedMemoryBlock.cs b/UnityBackend/ChunkedMemoryBlock.cs index 2c793c3..f4cdb3e 100644 --- a/UnityBackend/ChunkedMemoryBlock.cs +++ b/UnityBackend/ChunkedMemoryBlock.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/UnityBackend/FileFormat.cs b/UnityBackend/FileFormat.cs index 738d979..6683aed 100644 --- a/UnityBackend/FileFormat.cs +++ b/UnityBackend/FileFormat.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using System.Runtime.InteropServices; diff --git a/UnityBackend/UnityManagedHeap.cs b/UnityBackend/UnityManagedHeap.cs index 480afe1..c487642 100644 --- a/UnityBackend/UnityManagedHeap.cs +++ b/UnityBackend/UnityManagedHeap.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System.Collections.Generic; diff --git a/UnityBackend/UnityManagedTypeSystem.cs b/UnityBackend/UnityManagedTypeSystem.cs index 7b1ebb2..a4e597d 100644 --- a/UnityBackend/UnityManagedTypeSystem.cs +++ b/UnityBackend/UnityManagedTypeSystem.cs @@ -1,8 +1,12 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; -using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text.RegularExpressions; diff --git a/UnityBackend/UnityMemorySnapshot.cs b/UnityBackend/UnityMemorySnapshot.cs index 94be8bf..5cddfe3 100644 --- a/UnityBackend/UnityMemorySnapshot.cs +++ b/UnityBackend/UnityMemorySnapshot.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; diff --git a/UnityBackend/UnityMemorySnapshotFile.cs b/UnityBackend/UnityMemorySnapshotFile.cs index d3de4bf..50058bb 100644 --- a/UnityBackend/UnityMemorySnapshotFile.cs +++ b/UnityBackend/UnityMemorySnapshotFile.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; @@ -321,7 +326,6 @@ NativeObject[] ParseNativeObjects() var typeIndices = GetChapter(ChapterType.NativeObjects_NativeTypeArrayIndex); int count = (int)typeIndices!.Length; - var hideFlags = GetArrayOfConstantSizeElementsChapter(ChapterType.NativeObjects_HideFlags, count); var instanceIds = GetArrayOfConstantSizeElementsChapter(ChapterType.NativeObjects_InstanceId, count); var names = GetArrayOfVariableSizeElementsChapter(ChapterType.NativeObjects_Name, count); var objectAddresses = GetArrayOfConstantSizeElementsChapter(ChapterType.NativeObjects_NativeObjectAddress, count); @@ -334,7 +338,6 @@ NativeObject[] ParseNativeObjects() nativeObjects[i] = new NativeObject(); typeIndices[i].Read(0, out nativeObjects[i].TypeIndex); - hideFlags[i].Read(0, out nativeObjects[i].HideFlags); instanceIds[i].Read(0, out nativeObjects[i].InstanceId); nativeObjects[i].Name = names[i].ReadString(); nativeObjects[i].ObjectAddress = Native.From(objectAddresses[i].ReadInteger()); diff --git a/UnityBackend/UnityMemorySnapshotLoader.cs b/UnityBackend/UnityMemorySnapshotLoader.cs index a31da18..6c6bc3b 100644 --- a/UnityBackend/UnityMemorySnapshotLoader.cs +++ b/UnityBackend/UnityMemorySnapshotLoader.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/UnityBackend/UnityNativeObjectHeap.cs b/UnityBackend/UnityNativeObjectHeap.cs index d3c0999..9be91da 100644 --- a/UnityBackend/UnityNativeObjectHeap.cs +++ b/UnityBackend/UnityNativeObjectHeap.cs @@ -1,9 +1,12 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; -using System; using System.Collections.Generic; -using System.Diagnostics; namespace MemorySnapshotAnalyzer.UnityBackend { @@ -18,7 +21,6 @@ sealed class NativeRootReference sealed class NativeObject { public int TypeIndex; - public int HideFlags; public int InstanceId; public string? Name; public NativeWord ObjectAddress; diff --git a/UnityBackend/UnityNativeObjectTypeSystem.cs b/UnityBackend/UnityNativeObjectTypeSystem.cs index 6051544..342efef 100644 --- a/UnityBackend/UnityNativeObjectTypeSystem.cs +++ b/UnityBackend/UnityNativeObjectTypeSystem.cs @@ -1,4 +1,9 @@ -// Copyright(c) Meta Platforms, Inc. and affiliates. +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ using MemorySnapshotAnalyzer.AbstractMemorySnapshot; using System; diff --git a/run.sh b/run.sh index 5e17a3f..9786206 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,9 @@ #!/bin/sh +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + cp MemorySnapshotAnalyzer/appsettings.json . cp MemorySnapshotAnalyzer/thirdparty.rcl . exec dotnet run --project MemorySnapshotAnalyzer/MemorySnapshotAnalyzer.csproj