new(new[]{"--reference","-r"},result=>Helpers.BuildPathDictionary(result.Tokens,false),false,"Reference metadata from the specified assembly");
new("--reference","-r"){CustomParser=result=>Helpers.BuildPathDictionary(result.Tokens,false),Description="Reference metadata from the specified assembly"};
publicOption<string>SystemModule{get;}=
publicCliOption<string>SystemModule{get;}=
new(new[]{"--system-module","-s"},"System module name (default: mscorlib)");
new("--system-module","-s"){Description="System module name (default: mscorlib)"};
publicOption<bool>SanityChecks{get;}=
publicCliOption<bool>SanityChecks{get;}=
new(new[]{"--sanity-checks","-c"},"Check for valid constructs that are likely mistakes");
new("--sanity-checks","-c"){Description="Check for valid constructs that are likely mistakes"};
publicOption<string[]>Include{get;}=
publicCliOption<string[]>Include{get;}=
new(new[]{"--include","-i"},"Use only methods/types/namespaces, which match the given regular expression(s)");
new("--include","-i"){Description="Use only methods/types/namespaces, which match the given regular expression(s)"};
publicOption<FileInfo>IncludeFile{get;}=
publicCliOption<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();
newCliOption<FileInfo>("--include-file"){Description="Same as --include, but the regular expression(s) are declared line by line in the specified file."}.AcceptExistingOnly();
publicOption<string[]>Exclude{get;}=
publicCliOption<string[]>Exclude{get;}=
new(new[]{"--exclude","-e"},"Skip methods/types/namespaces, which match the given regular expression(s)");
new("--exclude","-e"){Description="Skip methods/types/namespaces, which match the given regular expression(s)"};
publicOption<FileInfo>ExcludeFile{get;}=
publicCliOption<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();
newCliOption<FileInfo>("--exclude-file"){Description="Same as --exclude, but the regular expression(s) are declared line by line in the specified file."}.AcceptExistingOnly();
publicOption<string[]>IgnoreError{get;}=
publicCliOption<string[]>IgnoreError{get;}=
new(new[]{"--ignore-error","-g"},"Ignore errors, which match the given regular expression(s)");
new("--ignore-error","-g"){Description="Ignore errors, which match the given regular expression(s)"};
publicOption<FileInfo>IgnoreErrorFile{get;}=
publicCliOption<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();
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};
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(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 */};
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 */};
publicOption<string>InputFileToDump{get;}=
publicCliOption<string>InputFileToDump{get;}=
new(new[]{"--input","-i"},"Name of the input mibc file to dump"){IsRequired=true,Arity=ArgumentArity.ExactlyOne};
new("--input","-i"){Description="Name of the input mibc file to dump",Required=true,Arity=ArgumentArity.ExactlyOne};
publicOption<string>TraceFilePath{get;}=
publicCliOption<string>TraceFilePath{get;}=
new(new[]{"--trace","-t"},"Specify the trace file to be parsed");
new("--trace","-t"){Description="Specify the trace file to be parsed"};
publicOption<string>OutputFilePath{get;}=
publicCliOption<string>OutputFilePath{get;}=
new(new[]{"--output","-o"},"Specify the output filename to be created");
new("--output","-o"){Description="Specify the output filename to be created"};
new(new[]{"--precise-debug-info-file"},"Name of file of newline separated JSON objects containing precise debug info");
new("--precise-debug-info-file"){Description="Name of file of newline separated JSON objects containing precise debug info"};
publicOption<int>Pid{get;}=
publicCliOption<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");
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"};
publicOption<string>ProcessName{get;}=
publicCliOption<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");
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"};
publicOption<List<string>>Reference=
publicCliOption<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");
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"};
publicOption<int>ClrInstanceId{get;}=
publicCliOption<int>ClrInstanceId{get;}=
new("--clr-instance-id","If the process contains multiple .NET runtimes, the instance ID must be specified");
new("--clr-instance-id"){Description="If the process contains multiple .NET runtimes, the instance ID must be specified"};
publicOption<bool>Spgo{get;}=
publicCliOption<bool>Spgo{get;}=
new("--spgo","Base profile on samples in the input. Uses last branch records if available and otherwise raw IP samples");
new("--spgo"){Description="Base profile on samples in the input. Uses last branch records if available and otherwise raw IP samples"};
publicOption<int>SpgoMinSamples{get;}=
publicCliOption<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");
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"};
publicOption<bool>IncludeFullGraphs{get;}=
publicCliOption<bool>IncludeFullGraphs{get;}=
new("--include-full-graphs","Include all blocks and edges in the written .mibc file, regardless of profile counts");
new("--include-full-graphs"){Description="Include all blocks and edges in the written .mibc file, regardless of profile counts"};
publicOption<double>ExcludeEventsBefore{get;}=
publicCliOption<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");
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"};
publicOption<double>ExcludeEventsAfter{get;}=
publicCliOption<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");
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",()=>-1,"Number of graphs to dump to .dot format in dump-worst-overlap-graphs-to directory");
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","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"};
publicOption<bool>AutomaticReferences{get;}=
publicCliOption<bool>AutomaticReferences{get;}=
new("--automatic-references",()=>true,"Attempt to find references by using paths embedded in the trace file. Defaults to true");
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."};
{
if(result.Tokens.Count>0)
privateCliOption<bool>_includeReadyToRun{get;}=
{
new("--includeReadyToRun"){Description="Include ReadyToRun methods in the trace file"};
varincludedAssemblies=newList<AssemblyName>();
privateCliOption<Verbosity>_verbosity{get;}=
foreach(Tokentokeninresult.Tokens)
new("--verbose"){DefaultValueFactory=_=>Verbosity.normal,Description="Adjust verbosity level. Supported levels are minimal, normal, detailed, and diagnostic"};
new("--showtimestamp"){Description="Show timestamps in output"};
}
catch
{
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(new[]{"--in","-i"},result=>Helpers.BuildPathList(result.Tokens),true,"Input file(s) to dump. Expects them to by ReadyToRun images");
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"};
publicOption<FileInfo>Out{get;}=
publicCliOption<FileInfo>Out{get;}=
new(new[]{"--out","-o"},"Output file path. Dumps everything to the specified file except for help message and exception messages");
new("--out","-o"){Description="Output file path. Dumps everything to the specified file except for help message and exception messages"};
publicOption<bool>Raw{get;}=
publicCliOption<bool>Raw{get;}=
new(new[]{"--raw"},"Dump the raw bytes of each section or runtime function");
new("--raw"){Description="Dump the raw bytes of each section or runtime function"};
publicOption<bool>Header{get;}=
publicCliOption<bool>Header{get;}=
new(new[]{"--header"},"Dump R2R header");
new("--header"){Description="Dump R2R header"};
publicOption<bool>Disasm{get;}=
publicCliOption<bool>Disasm{get;}=
new(new[]{"--disasm","-d"},"Show disassembly of methods or runtime functions");
new("--disasm","-d"){Description="Show disassembly of methods or runtime functions"};
publicOption<bool>Naked{get;}=
publicCliOption<bool>Naked{get;}=
new(new[]{"--naked"},"Naked dump suppresses most compilation details like placement addresses");
new("--naked"){Description="Naked dump suppresses most compilation details like placement addresses"};
publicOption<bool>HideOffsets{get;}=
publicCliOption<bool>HideOffsets{get;}=
new(new[]{"--hide-offsets","--ho"},"Hide offsets in naked disassembly");
new("--hide-offsets","--ho"){Description="Hide offsets in naked disassembly"};
publicOption<string[]>Query{get;}=
publicCliOption<string[]>Query{get;}=
new(new[]{"--query","-q"},"Query method by exact name, signature, row ID or token");
new("--query","-q"){Description="Query method by exact name, signature, row ID or token"};
publicOption<string[]>Keyword{get;}=
publicCliOption<string[]>Keyword{get;}=
new(new[]{"--keyword","-k"},"Search method by keyword");
new("--keyword","-k"){Description="Search method by keyword"};
publicOption<string[]>RuntimeFunction{get;}=
publicCliOption<string[]>RuntimeFunction{get;}=
new(new[]{"--runtimefunction","-f"},"Get one runtime function by id or relative virtual address");
new("--runtimefunction","-f"){Description="Get one runtime function by id or relative virtual address"};
publicOption<string[]>Section{get;}=
publicCliOption<string[]>Section{get;}=
new(new[]{"--section","-s"},"Get section by keyword");
new("--section","-s"){Description="Get section by keyword"};
publicOption<bool>Unwind{get;}=
publicCliOption<bool>Unwind{get;}=
new(new[]{"--unwind"},"Dump unwindInfo");
new("--unwind"){Description="Dump unwindInfo"};
publicOption<bool>GC{get;}=
publicCliOption<bool>GC{get;}=
new(new[]{"--gc"},"Dump gcInfo and slot table");
new("--gc"){Description="Dump gcInfo and slot table"};
new(new[]{"--perfmap-path"},"PerfMap output path for --create-perfmap");
new("--perfmap-path"){Description="PerfMap output path for --create-perfmap"};
publicOption<int>PerfmapFormatVersion{get;}=
publicCliOption<int>PerfmapFormatVersion{get;}=
new(new[]{"--perfmap-format-version"},()=>ILCompiler.Diagnostics.PerfMapWriter.CurrentFormatVersion,"PerfMap format version for --create-perfmap");
new("--perfmap-format-version"){DefaultValueFactory=_=>ILCompiler.Diagnostics.PerfMapWriter.CurrentFormatVersion,Description="PerfMap format version for --create-perfmap"};
newOption<DirectoryInfo>(new[]{"--core-root-directory","-cr"},"Location of the CoreCLR CORE_ROOT folder")
newCliOption<DirectoryInfo>("--core-root-directory","-cr"){Description="Location of the CoreCLR CORE_ROOT folder",Arity=ArgumentArity.ExactlyOne}.AcceptExistingOnly();
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();
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;}=
publicCliOption<bool>NoJit{get;}=
new(new[]{"--nojit"},"Don't run tests in JITted mode");
new("--nojit"){Description="Don't run tests in JITted mode"};
publicOption<bool>NoCrossgen2{get;}=
publicCliOption<bool>NoCrossgen2{get;}=
new(new[]{"--nocrossgen2"},"Don't run tests in Crossgen2 mode");
new("--nocrossgen2"){Description="Don't run tests in Crossgen2 mode"};
publicOption<bool>Exe{get;}=
publicCliOption<bool>Exe{get;}=
new(new[]{"--exe"},"Don't compile tests, just execute them");
new("--exe"){Description="Don't compile tests, just execute them"};
publicOption<bool>NoExe{get;}=
publicCliOption<bool>NoExe{get;}=
new(new[]{"--noexe"},"Compilation-only mode (don't execute the built apps)");
new("--noexe"){Description="Compilation-only mode (don't execute the built apps)"};
publicOption<bool>NoEtw{get;}=
publicCliOption<bool>NoEtw{get;}=
new(new[]{"--noetw"},"Don't capture jitted methods using ETW");
new("--noetw"){Description="Don't capture jitted methods using ETW"};
publicOption<bool>NoCleanup{get;}=
publicCliOption<bool>NoCleanup{get;}=
new(new[]{"--nocleanup"},"Don't clean up compilation artifacts after test runs");
new("--nocleanup"){Description="Don't clean up compilation artifacts after test runs"};
publicOption<bool>Map{get;}=
publicCliOption<bool>Map{get;}=
new(new[]{"--map"},"Generate a map file (Crossgen2)");
new("--map"){Description="Generate a map file (Crossgen2)"};
publicOption<bool>Pdb{get;}=
publicCliOption<bool>Pdb{get;}=
new(new[]{"--pdb"},"Generate PDB symbol information (Crossgen2 / Windows only)");
new("--pdb"){Description="Generate PDB symbol information (Crossgen2 / Windows only)"};
publicOption<bool>Perfmap{get;}=
publicCliOption<bool>Perfmap{get;}=
new(new[]{"--perfmap"},"Generate perfmap symbol information");
new("--perfmap"){Description="Generate perfmap symbol information"};
publicOption<int>PerfmapFormatVersion{get;}=
publicCliOption<int>PerfmapFormatVersion{get;}=
new(new[]{"--perfmap-format-version"},()=>1,"Perfmap format version to generate");
new("--perfmap-format-version"){DefaultValueFactory=_=>1,Description="Perfmap format version to generate"};