Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
!installer/*/
bld/
[Bb]in/
[Oo]bj/
Expand Down
2 changes: 1 addition & 1 deletion installer/arm64/prepare-installer.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set %_VERSION="1.2.0"
set %_VERSION="1.2.1"

iscc.exe installer.iss /DAPP_VERSION=%_VERSION% /O%cd%
2 changes: 1 addition & 1 deletion installer/x64/prepare-installer.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
set %_VERSION="1.2.0"
set %_VERSION="1.2.1"

iscc.exe installer.iss /DAPP_VERSION=%_VERSION% /O%cd%
21 changes: 19 additions & 2 deletions src/ProfileExplorerCore/Profile/ETW/ETWProfileDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,24 @@ await LoadBinaryAndDebugFiles(rawProfile, mainProcess, imageName,
Trace.WriteLine(
$"LoadTraceAsync: Done processing trace in {processingSw.Elapsed}, {processingSw.ElapsedMilliseconds} ms");

// If the trace has registered PMU counters (from PerfInfoCollectionEnd events)
// but no PerfInfoPMCSample events, the PMU counters were used as sampling sources
// rather than as separate counting events. Create synthetic counter events from
// the regular samples, similar to how samples without stacks get a synthetic
// single-frame stack (see ProcessSamplesChunk).
if (!rawProfile.HasPerformanceCountersEvents && rawProfile.PerformanceCounters.Count > 0) {
Trace.WriteLine($"LoadTraceAsync: Generating synthetic PMC events from {rawProfile.Samples.Count} samples " +
$"for {rawProfile.PerformanceCounters.Count} PMU sampling source counter(s)");

foreach (var sample in rawProfile.Samples) {
foreach (var counter in rawProfile.PerformanceCounters) {
var counterEvent = new PerformanceCounterEvent(
sample.IP, sample.Time, sample.ContextId, (short)counter.Id);
rawProfile.AddPerformanceCounterEvent(counterEvent);
}
}
Comment thread
jhpohovey marked this conversation as resolved.
}

// Process performance counters.
if (rawProfile.HasPerformanceCountersEvents) {
Trace.WriteLine($"LoadTraceAsync: Processing {rawProfile.PerformanceCountersEvents.Count} performance counter events");
Expand Down Expand Up @@ -1340,8 +1358,7 @@ private void ProcessPerformanceCounters(RawProfileData rawProfile, List<int> pro
continue;
}

if (!profileModuleBuilder.Initialized || !profileModuleBuilder.HasDebugInfo) {
//Trace.WriteLine($"Uninitialized module {image.FileName}");
if (!profileModuleBuilder.HasDebugInfo) {
continue;
}

Expand Down
6 changes: 3 additions & 3 deletions src/ProfileExplorerUI/Document/IRDocumentHost.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,9 @@ private async Task<bool> UpdateProfilingColumns() {

// Add the columns to the View menu.
ProfileColumns.BuildColumnsVisibilityMenu(columnData, ProfileViewMenu, () => {
// TODO: Force non-async run to ensure no events from SetViewMenuItemEvents
// are set yet, can cause an infinite update loop. Find a better way.
Utils.RunSync(UpdateProfilingColumns);
// UpdateProfilingColumns handles reentrancy by calling ResetViewMenuItemEvents()
// synchronously before any await, which unsubscribes the event handlers.
Comment thread
jhpohovey marked this conversation as resolved.
_ = UpdateProfilingColumns();
});

SetViewMenuItemEvents();
Expand Down
8 changes: 4 additions & 4 deletions src/ProfileExplorerUI/ProfileExplorerUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>main.ico</ApplicationIcon>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion>
<Version>1.2.0</Version>
<AssemblyVersion>1.2.1</AssemblyVersion>
<FileVersion>1.2.1</FileVersion>
<Version>1.2.1</Version>
<Authors></Authors>
<Company>Microsoft Corporation</Company>
<Product>Profile Explorer</Product>
Expand Down Expand Up @@ -325,4 +325,4 @@
</ItemGroup>


</Project>
</Project>
Loading