new(new[]{"--reference","-r"},result=>Helpers.BuildPathDictionary(result.Tokens,false),false,"Reference metadata from the specified assembly");
publicOption<string>SystemModule{get;}=
new(new[]{"--system-module","-s"},"System module name (default: mscorlib)");
publicOption<bool>SanityChecks{get;}=
new(new[]{"--sanity-checks","-c"},"Check for valid constructs that are likely mistakes");
publicOption<string[]>Include{get;}=
new(new[]{"--include","-i"},"Use only methods/types/namespaces, which match the given regular expression(s)");
publicOption<FileInfo>IncludeFile{get;}=
newOption<FileInfo>(new[]{"--include-file"},"Same as --include, but the regular expression(s) are declared line by line in the specified file.").AcceptExistingOnly();
publicOption<string[]>Exclude{get;}=
new(new[]{"--exclude","-e"},"Skip methods/types/namespaces, which match the given regular expression(s)");
publicOption<FileInfo>ExcludeFile{get;}=
newOption<FileInfo>(new[]{"--exclude-file"},"Same as --exclude, but the regular expression(s) are declared line by line in the specified file.").AcceptExistingOnly();
publicOption<string[]>IgnoreError{get;}=
new(new[]{"--ignore-error","-g"},"Ignore errors, which match the given regular expression(s)");
publicOption<FileInfo>IgnoreErrorFile{get;}=
newOption<FileInfo>(new[]{"--ignore-error-file"},"Same as --ignore-error, but the regular expression(s) are declared line by line in the specified file.").AcceptExistingOnly();
new("--reference","-r"){CustomParser=result=>Helpers.BuildPathDictionary(result.Tokens,false),Description="Reference metadata from the specified assembly"};
publicCliOption<string>SystemModule{get;}=
new("--system-module","-s"){Description="System module name (default: mscorlib)"};
publicCliOption<bool>SanityChecks{get;}=
new("--sanity-checks","-c"){Description="Check for valid constructs that are likely mistakes"};
publicCliOption<string[]>Include{get;}=
new("--include","-i"){Description="Use only methods/types/namespaces, which match the given regular expression(s)"};
publicCliOption<FileInfo>IncludeFile{get;}=
newCliOption<FileInfo>("--include-file"){Description="Same as --include, but the regular expression(s) are declared line by line in the specified file."}.AcceptExistingOnly();
publicCliOption<string[]>Exclude{get;}=
new("--exclude","-e"){Description="Skip methods/types/namespaces, which match the given regular expression(s)"};
publicCliOption<FileInfo>ExcludeFile{get;}=
newCliOption<FileInfo>("--exclude-file"){Description="Same as --exclude, but the regular expression(s) are declared line by line in the specified file."}.AcceptExistingOnly();
publicCliOption<string[]>IgnoreError{get;}=
new("--ignore-error","-g"){Description="Ignore errors, which match the given regular expression(s)"};
publicCliOption<FileInfo>IgnoreErrorFile{get;}=
newCliOption<FileInfo>("--ignore-error-file"){Description="Same as --ignore-error, but the regular expression(s) are declared line by line in the specified file."}.AcceptExistingOnly();
new(new[]{"--input","-i"},result=>Helpers.BuildPathList(result.Tokens),false,"Input .mibc files to be merged. Multiple input arguments are specified as --input file1.mibc --input file2.mibc"){IsRequired=true,Arity=ArgumentArity.OneOrMore};
publicOption<string[]>InputFilesToCompare{get;}=
new(new[]{"--input","-i"},"The input .mibc files to be compared. Specify as --input file1.mibc --input file2.mibc"){IsRequired=true,Arity=newArgumentArity(2,2)/* exactly two */};
publicOption<string>InputFileToDump{get;}=
new(new[]{"--input","-i"},"Name of the input mibc file to dump"){IsRequired=true,Arity=ArgumentArity.ExactlyOne};
publicOption<string>TraceFilePath{get;}=
new(new[]{"--trace","-t"},"Specify the trace file to be parsed");
publicOption<string>OutputFilePath{get;}=
new(new[]{"--output","-o"},"Specify the output filename to be created");
publicOption<string>PreciseDebugInfoFile{get;}=
new(new[]{"--precise-debug-info-file"},"Name of file of newline separated JSON objects containing precise debug info");
publicOption<int>Pid{get;}=
new(new[]{"--pid"},"The pid within the trace of the process to examine. If this is a multi-process trace, at least one of --pid or --process-name must be specified");
publicOption<string>ProcessName{get;}=
new(new[]{"--process-name"},"The process name within the trace of the process to examine. If this is a multi-process trace, at least one of --pid or --process-name must be specified");
publicOption<List<string>>Reference=
new(new[]{"--reference","-r"},result=>Helpers.BuildPathList(result.Tokens),true,"If a reference is not located on disk at the same location as used in the process, it may be specified with a --reference parameter. Multiple --reference parameters may be specified. The wild cards * and ? are supported by this option");
publicOption<int>ClrInstanceId{get;}=
new("--clr-instance-id","If the process contains multiple .NET runtimes, the instance ID must be specified");
publicOption<bool>Spgo{get;}=
new("--spgo","Base profile on samples in the input. Uses last branch records if available and otherwise raw IP samples");
publicOption<int>SpgoMinSamples{get;}=
new("--spgo-min-samples",()=>50,"The minimum number of total samples a function must have before generating profile data for it with SPGO. Default: 50");
publicOption<bool>IncludeFullGraphs{get;}=
new("--include-full-graphs","Include all blocks and edges in the written .mibc file, regardless of profile counts");
publicOption<double>ExcludeEventsBefore{get;}=
new("--exclude-events-before",()=>Double.MinValue,"Exclude data from events before specified time. Time is specified as milliseconds from the start of the trace");
publicOption<double>ExcludeEventsAfter{get;}=
new("--exclude-events-after",()=>Double.MaxValue,"Exclude data from events after specified time. Time is specified as milliseconds from the start of the trace");
thrownewFormatException($"Unable to parse '{token.Value}' as an Assembly Name.");
}
}
}
returnArray.Empty<AssemblyName>();
},true,"If specified, include in Mibc file only references to the specified assemblies. Assemblies are specified as assembly names, not filenames. For instance, `System.Private.CoreLib` not `System.Private.CoreLib.dll`. Multiple --include-reference options may be specified.");
privateOption<bool>_includeReadyToRun{get;}=
new("--includeReadyToRun","Include ReadyToRun methods in the trace file");
privateOption<Verbosity>_verbosity{get;}=
new(new[]{"--verbose"},()=>Verbosity.normal,"Adjust verbosity level. Supported levels are minimal, normal, detailed, and diagnostic");
privateOption<bool>_isSorted{get;}=
new("--sorted","Generate sorted output.");
privateOption<bool>_showTimestamp{get;}=
new("--showtimestamp","Show timestamps in output");
new("--input","-i"){CustomParser=result=>Helpers.BuildPathList(result.Tokens),Description="Input .mibc files to be merged. Multiple input arguments are specified as --input file1.mibc --input file2.mibc",Required=true,Arity=ArgumentArity.OneOrMore};
new("--input","-i"){Description="The input .mibc files to be compared. Specify as --input file1.mibc --input file2.mibc",Required=true,Arity=newArgumentArity(2,2)/* exactly two */};
publicCliOption<string>InputFileToDump{get;}=
new("--input","-i"){Description="Name of the input mibc file to dump",Required=true,Arity=ArgumentArity.ExactlyOne};
publicCliOption<string>TraceFilePath{get;}=
new("--trace","-t"){Description="Specify the trace file to be parsed"};
publicCliOption<string>OutputFilePath{get;}=
new("--output","-o"){Description="Specify the output filename to be created"};
new("--precise-debug-info-file"){Description="Name of file of newline separated JSON objects containing precise debug info"};
publicCliOption<int>Pid{get;}=
new("--pid"){Description="The pid within the trace of the process to examine. If this is a multi-process trace, at least one of --pid or --process-name must be specified"};
publicCliOption<string>ProcessName{get;}=
new("--process-name"){Description="The process name within the trace of the process to examine. If this is a multi-process trace, at least one of --pid or --process-name must be specified"};
publicCliOption<List<string>>Reference=
new("--reference","-r"){CustomParser=result=>Helpers.BuildPathList(result.Tokens),DefaultValueFactory=result=>Helpers.BuildPathList(result.Tokens),Description="If a reference is not located on disk at the same location as used in the process, it may be specified with a --reference parameter. Multiple --reference parameters may be specified. The wild cards * and ? are supported by this option"};
publicCliOption<int>ClrInstanceId{get;}=
new("--clr-instance-id"){Description="If the process contains multiple .NET runtimes, the instance ID must be specified"};
publicCliOption<bool>Spgo{get;}=
new("--spgo"){Description="Base profile on samples in the input. Uses last branch records if available and otherwise raw IP samples"};
publicCliOption<int>SpgoMinSamples{get;}=
new("--spgo-min-samples"){DefaultValueFactory=_=>50,Description="The minimum number of total samples a function must have before generating profile data for it with SPGO. Default: 50"};
publicCliOption<bool>IncludeFullGraphs{get;}=
new("--include-full-graphs"){Description="Include all blocks and edges in the written .mibc file, regardless of profile counts"};
publicCliOption<double>ExcludeEventsBefore{get;}=
new("--exclude-events-before"){DefaultValueFactory=_=>Double.MinValue,Description="Exclude data from events before specified time. Time is specified as milliseconds from the start of the trace"};
publicCliOption<double>ExcludeEventsAfter{get;}=
new("--exclude-events-after"){DefaultValueFactory=_=>Double.MaxValue,Description="Exclude data from events after specified time. Time is specified as milliseconds from the start of the trace"};
new("--dump-worst-overlap-graphs"){DefaultValueFactory=_=>-1,Description="Number of graphs to dump to .dot format in dump-worst-overlap-graphs-to directory"};
new("--dump-worst-overlap-graphs-to"){Description="Number of graphs to dump to .dot format in dump-worst-overlap-graphs-to directory"};
publicCliOption<bool>AutomaticReferences{get;}=
new("--automatic-references"){DefaultValueFactory=_=>true,Description="Attempt to find references by using paths embedded in the trace file. Defaults to true"};
new("--include-reference"){CustomParser=MakeAssemblyNameArray,DefaultValueFactory=MakeAssemblyNameArray,Description="If specified, include in Mibc file only references to the specified assemblies. Assemblies are specified as assembly names, not filenames. For instance, `System.Private.CoreLib` not `System.Private.CoreLib.dll`. Multiple --include-reference options may be specified."};
privateCliOption<bool>_includeReadyToRun{get;}=
new("--includeReadyToRun"){Description="Include ReadyToRun methods in the trace file"};
privateCliOption<Verbosity>_verbosity{get;}=
new("--verbose"){DefaultValueFactory=_=>Verbosity.normal,Description="Adjust verbosity level. Supported levels are minimal, normal, detailed, and diagnostic"};
new("--in","-i"){CustomParser=result=>Helpers.BuildPathList(result.Tokens),DefaultValueFactory=result=>Helpers.BuildPathList(result.Tokens),Description="Input file(s) to dump. Expects them to by ReadyToRun images"};
publicCliOption<FileInfo>Out{get;}=
new("--out","-o"){Description="Output file path. Dumps everything to the specified file except for help message and exception messages"};
publicCliOption<bool>Raw{get;}=
new("--raw"){Description="Dump the raw bytes of each section or runtime function"};
publicCliOption<bool>Header{get;}=
new("--header"){Description="Dump R2R header"};
publicCliOption<bool>Disasm{get;}=
new("--disasm","-d"){Description="Show disassembly of methods or runtime functions"};
publicCliOption<bool>Naked{get;}=
new("--naked"){Description="Naked dump suppresses most compilation details like placement addresses"};
publicCliOption<bool>HideOffsets{get;}=
new("--hide-offsets","--ho"){Description="Hide offsets in naked disassembly"};
publicCliOption<string[]>Query{get;}=
new("--query","-q"){Description="Query method by exact name, signature, row ID or token"};
publicCliOption<string[]>Keyword{get;}=
new("--keyword","-k"){Description="Search method by keyword"};
publicCliOption<string[]>RuntimeFunction{get;}=
new("--runtimefunction","-f"){Description="Get one runtime function by id or relative virtual address"};
publicCliOption<string[]>Section{get;}=
new("--section","-s"){Description="Get section by keyword"};
publicCliOption<bool>Unwind{get;}=
new("--unwind"){Description="Dump unwindInfo"};
publicCliOption<bool>GC{get;}=
new("--gc"){Description="Dump gcInfo and slot table"};
new("--perfmap-path"){Description="PerfMap output path for --create-perfmap"};
publicCliOption<int>PerfmapFormatVersion{get;}=
new("--perfmap-format-version"){DefaultValueFactory=_=>ILCompiler.Diagnostics.PerfMapWriter.CurrentFormatVersion,Description="PerfMap format version for --create-perfmap"};
newCliOption<DirectoryInfo>("--core-root-directory","-cr"){Description="Location of the CoreCLR CORE_ROOT folder",Arity=ArgumentArity.ExactlyOne}.AcceptExistingOnly();
publicOption<DirectoryInfo[]>ReferencePath{get;}=
newOption<DirectoryInfo[]>(new[]{"--reference-path","-r"},"Folder containing assemblies to reference during compilation")
newCliOption<DirectoryInfo[]>("--reference-path","-r"){Description="Folder containing assemblies to reference during compilation",Arity=ArgumentArity.ZeroOrMore}.AcceptExistingOnly();
publicOption<FileInfo[]>MibcPath{get;}=
newOption<FileInfo[]>(new[]{"--mibc-path","-m"},"Mibc files to use in compilation")
newCliOption<FileInfo[]>("--mibc-path","-m"){Description="Mibc files to use in compilation",Arity=ArgumentArity.ZeroOrMore}.AcceptExistingOnly();
publicOption<FileInfo>Crossgen2Path{get;}=
newOption<FileInfo>(new[]{"--crossgen2-path","-c2p"},"Explicit Crossgen2 path (useful for cross-targeting)").AcceptExistingOnly();
publicCliOption<FileInfo>Crossgen2Path{get;}=
newCliOption<FileInfo>("--crossgen2-path","-c2p"){Description="Explicit Crossgen2 path (useful for cross-targeting)"}.AcceptExistingOnly();
publicOption<bool>VerifyTypeAndFieldLayout{get;}=
new(new[]{"--verify-type-and-field-layout"},"Verify that struct type layout and field offsets match between compile time and runtime. Use only for diagnostic purposes.");
new("--verify-type-and-field-layout"){Description="Verify that struct type layout and field offsets match between compile time and runtime. Use only for diagnostic purposes."};
publicOption<bool>NoJit{get;}=
new(new[]{"--nojit"},"Don't run tests in JITted mode");
publicCliOption<bool>NoJit{get;}=
new("--nojit"){Description="Don't run tests in JITted mode"};
publicOption<bool>NoCrossgen2{get;}=
new(new[]{"--nocrossgen2"},"Don't run tests in Crossgen2 mode");
publicCliOption<bool>NoCrossgen2{get;}=
new("--nocrossgen2"){Description="Don't run tests in Crossgen2 mode"};
publicOption<bool>Exe{get;}=
new(new[]{"--exe"},"Don't compile tests, just execute them");
publicCliOption<bool>Exe{get;}=
new("--exe"){Description="Don't compile tests, just execute them"};
publicOption<bool>NoExe{get;}=
new(new[]{"--noexe"},"Compilation-only mode (don't execute the built apps)");
publicCliOption<bool>NoExe{get;}=
new("--noexe"){Description="Compilation-only mode (don't execute the built apps)"};
publicOption<bool>NoEtw{get;}=
new(new[]{"--noetw"},"Don't capture jitted methods using ETW");
publicCliOption<bool>NoEtw{get;}=
new("--noetw"){Description="Don't capture jitted methods using ETW"};
publicOption<bool>NoCleanup{get;}=
new(new[]{"--nocleanup"},"Don't clean up compilation artifacts after test runs");
publicCliOption<bool>NoCleanup{get;}=
new("--nocleanup"){Description="Don't clean up compilation artifacts after test runs"};
publicOption<bool>Map{get;}=
new(new[]{"--map"},"Generate a map file (Crossgen2)");
publicCliOption<bool>Map{get;}=
new("--map"){Description="Generate a map file (Crossgen2)"};
publicOption<bool>Pdb{get;}=
new(new[]{"--pdb"},"Generate PDB symbol information (Crossgen2 / Windows only)");
publicCliOption<bool>Pdb{get;}=
new("--pdb"){Description="Generate PDB symbol information (Crossgen2 / Windows only)"};
publicOption<bool>Perfmap{get;}=
new(new[]{"--perfmap"},"Generate perfmap symbol information");
publicCliOption<bool>Perfmap{get;}=
new("--perfmap"){Description="Generate perfmap symbol information"};
publicOption<int>PerfmapFormatVersion{get;}=
new(new[]{"--perfmap-format-version"},()=>1,"Perfmap format version to generate");
publicCliOption<int>PerfmapFormatVersion{get;}=
new("--perfmap-format-version"){DefaultValueFactory=_=>1,Description="Perfmap format version to generate"};