Skip to content

Commit 48b4d15

Browse files
committed
- Do not show incorrect exclusive time data in non-tree view
- Update help text and documentation to be more accurate
1 parent 1fd4155 commit 48b4d15

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/PerfView/Dialogs/RunCommandDialog.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@
321321
<CheckBox Grid.Row="0" Grid.Column="11" Name="CCWRefCountCheckBox" VerticalAlignment="Center"/>
322322

323323
<TextBlock Grid.Row="0" Grid.Column="12" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="8,2,5,2"
324-
ToolTip="Log information about .NET Runtime loading." >
324+
ToolTip="Log extended information about .NET Runtime loading including R2R and type load events." >
325325
<Hyperlink Command="Help" CommandParameter="RuntimeLoadingCheckBox">.NET Loader:</Hyperlink>
326326
</TextBlock>
327327
<CheckBox Grid.Row="0" Grid.Column="13" Name="RuntimeLoadingCheckBox" VerticalAlignment="Center" />

src/PerfView/RuntimeLoaderStats.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public static void ToTxt(string filePath, RuntimeLoaderProcessData runtimeProces
7979
bool csv = filePath.EndsWith("csv");
8080
using (var writer = File.CreateText(filePath))
8181
{
82-
writer.WriteLine("\"ThreadId \",\"Start time\",\"Inclusive\",\"Exclusive\",\"RuntimeOperation\"");
82+
bool showExclusiveTime = tree;
83+
84+
writer.WriteLine($"\"ThreadId \",\"Start time\",\"Inclusive\"{(showExclusiveTime ? ",\"Exclusive\"" : "") },\"RuntimeOperation\"");
8385
foreach (var threadData in runtimeProcessData.ThreadData)
8486
{
8587
int threadId = threadData.Key;
@@ -116,7 +118,9 @@ public static void ToTxt(string filePath, RuntimeLoaderProcessData runtimeProces
116118
if (seenEvents.Contains(eventData.End.EventId))
117119
inclusiveTimeStr = "";
118120

119-
writer.Write($"{PadIfNotCsv(threadId.ToString(), 12)},{PadIfNotCsv(startTime.ToString("F3"), 12)},{PadIfNotCsv(inclusiveTimeStr, 11)},{PadIfNotCsv(exclusiveTime.ToString("F3"), 11)},");
121+
writer.Write($"{PadIfNotCsv(threadId.ToString(), 12)},{PadIfNotCsv(startTime.ToString("F3"), 12)},{PadIfNotCsv(inclusiveTimeStr, 11)},");
122+
if (showExclusiveTime)
123+
writer.Write($"{PadIfNotCsv(exclusiveTime.ToString("F3"), 11)},");
120124

121125
StringBuilder eventName = new StringBuilder();
122126

src/PerfView/SupportFiles/HtmlReportUsersGuide.htm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ <h3>
246246
the outer operation is broken up to show the time spent around the inner operation.
247247

248248
To enable data about all loader operations set the ".NET Loader" checkbox when collecting data.
249-
Otherwise, the data captured will be restricted to JIT and assembly load operations. The /RuntimeLoading switch may also be used.
249+
Information about all loader operations is restricted to analysis of .NET Core runtimes.
250+
R2R information is only available in .NET Core 3 and above.
251+
TypeLoad information is only available in .NET 5 and above.
250252

251-
Also see the Runtime Loader stacks view, which ties this data into a view of CPU activity, to allow investigating CPU usage during specific loader operations.
253+
Otherwise, the data captured will be restricted to JIT and assembly load operations. The /RuntimeLoading switch may also be used.
252254
<hr />
253255
<p>&nbsp;</p>
254256
<p>&nbsp;</p>

0 commit comments

Comments
 (0)