Skip to content

Commit 34ed698

Browse files
committed
Add runInHost option to DisassemblyDiagnoserAttribute.
1 parent 9f6f0d9 commit 34ed698

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/BenchmarkDotNet/Attributes/DisassemblyDiagnoserAttribute.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public class DisassemblyDiagnoserAttribute : Attribute, IConfigSource
1616
/// <param name="exportCombinedDisassemblyReport">Exports all benchmarks to a single HTML report. Makes it easy to compare different runtimes or methods (each becomes a column in HTML table).</param>
1717
/// <param name="exportDiff">Exports a diff of the assembly code to the Github markdown format. False by default.</param>
1818
/// <param name="filters">Glob patterns applied to full method signatures by the the disassembler.</param>
19+
/// <param name="runInHost">
20+
/// If <see langword="true"/>, disassembly will be ran in the host process; otherwise it will be ran in the benchmark process.
21+
/// Requires host and benchmark processes to target the same platform (must have the same bit-ness) for CoreCLR.
22+
/// </param>
1923
public DisassemblyDiagnoserAttribute(
2024
int maxDepth = 1,
2125
DisassemblySyntax syntax = DisassemblySyntax.Masm,
@@ -25,6 +29,7 @@ public DisassemblyDiagnoserAttribute(
2529
bool exportHtml = false,
2630
bool exportCombinedDisassemblyReport = false,
2731
bool exportDiff = false,
32+
bool runInHost = false,
2833
params string[] filters)
2934
{
3035
Config = ManualConfig.CreateEmpty().AddDiagnoser(
@@ -38,7 +43,8 @@ public DisassemblyDiagnoserAttribute(
3843
exportGithubMarkdown: exportGithubMarkdown,
3944
exportHtml: exportHtml,
4045
exportCombinedDisassemblyReport: exportCombinedDisassemblyReport,
41-
exportDiff: exportDiff)));
46+
exportDiff: exportDiff,
47+
runInHost: runInHost)));
4248
}
4349

4450
// CLS-Compliant Code requires a constructor without an array in the argument list

0 commit comments

Comments
 (0)