Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit 2396abf

Browse files
committed
WPERF-997 Spe hardcode filters
See merge request Linaro/WindowsPerf/vs-extension!109 === ChangeLog === * add default SPE filters in case wperf list doesn't support it * chore: remove slopy extra empty line * feat: update SPE filters groupbox header and placeholder texts * feat: update spe sample displayed name to use the Feature name * fix: update typo when unchecking SPE checkbox * chore: make config check happen on each setting dialog call * feat: disable SPE button on if SPE is unavailable * feat: fix overhead percent in SPE output * fix: line highlighter errors * fix: lower case all filepaths * feat: added memory to the form * fix: add handleSPESamplingFinished call to the end of the sampling run * fix: trailing character on spe filter list * fix: remove default frequency on SPE * fix: update highlighter file paths to be case insensitive * feat: add SPE output handling * feat: start handling SPE sampling display * feat: add spe sampling settings
1 parent da3840c commit 2396abf

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed

WindowsPerfGUI/SDK/WperfClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// BSD 3-Clause License
1+
// BSD 3-Clause License
22
//
33
// Copyright (c) 2022, Arm Limited
44
// All rights reserved.

WindowsPerfGUI/SDK/WperfOutputs/WperfList.cs

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,36 @@
3434

3535
namespace WindowsPerfGUI.SDK.WperfOutputs
3636
{
37+
3738
public partial class WperfList
3839
{
40+
#region Default hardcoded values
41+
42+
private List<PredefinedEvent> defaultPredefinedSPEFilters = [
43+
new PredefinedEvent() {
44+
AliasName = "load_filter",
45+
RawIndex = "",
46+
Description = "Enables collection of load sampled operations, including atomic operations that return a value to a register.",
47+
EventType = "[SPE filter]"
48+
},
49+
new PredefinedEvent() {
50+
AliasName = "store_filter",
51+
RawIndex = "",
52+
Description = "Enables collection of store sampled operations, including all atomic operations.",
53+
EventType = "[SPE filter]"
54+
},
55+
new PredefinedEvent() {
56+
AliasName = "branch_filter",
57+
RawIndex = "",
58+
Description = "Enables collection of branch sampled operations, including direct and indirect branches and exception returns.",
59+
EventType = "[SPE filter]"
60+
},
61+
];
62+
public const string SPE_EVENT_BASE_NAME = "arm_spe_0";
63+
public const string SPE_EVENT_SEPARATOR = "/";
64+
65+
#endregion
66+
3967
private List<PredefinedEvent> predefinedEvents;
4068

4169
[JsonProperty("Predefined_Events")]
@@ -45,13 +73,14 @@ public List<PredefinedEvent> PredefinedEvents
4573
set
4674
{
4775
predefinedEvents = value.Where(e => e.EventType != "[Kernel PMU event]" && e.EventType != "[SPE filter]").ToList();
48-
PredefinedSPEFilters = value.Where(e => e.EventType == "[SPE filter]").ToList();
76+
List<PredefinedEvent> _speFilters = value.Where(e => e.EventType == "[SPE filter]").ToList();
77+
78+
if (_speFilters.Count == 0) _speFilters = defaultPredefinedSPEFilters;
79+
80+
PredefinedSPEFilters = _speFilters;
4981
}
5082
}
5183

52-
public const string SPE_EVENT_BASE_NAME = "arm_spe_0";
53-
public const string SPE_EVENT_SEPARATOR = "/";
54-
5584
public List<PredefinedEvent> PredefinedSPEFilters { get; set; }
5685

5786
public (PredefinedEvent, int) GetPredefinedEventFromAliasName(string aliasName)

WindowsPerfGUI/ToolWindows/SamplingExplorer/LineHighlighting/HighlighterDict.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// BSD 3-Clause License
1+
// BSD 3-Clause License
22
//
33
// Copyright (c) 2022, Arm Limited
44
// All rights reserved.

0 commit comments

Comments
 (0)