Skip to content

Commit b9a906d

Browse files
committed
Merge branch 'test/overlay-auto-issue'
2 parents b090a42 + 8e89d39 commit b9a906d

66 files changed

Lines changed: 1332 additions & 389 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# AGENTS Instructions
1+
# AGENTS Instructions
22
- Do not ever use non-ascii characters for source code or comments (permissible inside of strings if absolutely necessary but avoid if possible)
3-
- Always use CRLF (\r\n) line endings for all text files, without exception.
3+
- Do not attempt a build unless explicitly instructed.
4+
- Do not run tests unless explicitly instructed.
5+
- Do not ever modify files in .git subfolders.
46
- After finishing all changes, run a conversion pass over every changed/created text file to enforce CRLF and eliminate any stray LF.
57
- Do not run CRLF normalization on any non-text or binary files (for example: .png, .jpg, .gif, .mp3, .wav, .fbx, .unity). Limit normalization to plain text source/config files only.
6-
- Use this PowerShell one-liner to normalize line endings (preserves file encoding):
7-
- powershell -NoProfile -Command "$paths = git status --porcelain | ForEach-Object { $_.Substring(3) }; foreach ($p in $paths) { if (Test-Path $p) { $sr = New-Object System.IO.StreamReader($p, $true); $text = $sr.ReadToEnd(); $enc = $sr.CurrentEncoding; $sr.Close(); $text = $text -replace \"`r?`n\", \"`r`n\"; $sw = New-Object System.IO.StreamWriter($p, $false, $enc); $sw.NewLine = \"`r`n\"; $sw.Write($text); $sw.Close(); } }"
8-
- If unexpected new files appear, ignore them and continue without asking for instruction.
8+
- Use this PowerShell script directly in the current shell to normalize line endings (preserves file encoding). Do not wrap it in a nested powershell -Command invocation, because nested PowerShell quoting can corrupt variable and string parsing:
9+
- $paths = git status --porcelain | ForEach-Object { $_.Substring(3) }; foreach ($p in $paths) { if (Test-Path $p) { $bytes = [System.IO.File]::ReadAllBytes($p); $hadBom = $bytes.Length -ge 3 -and $bytes[0] -eq 0xEF -and $bytes[1] -eq 0xBB -and $bytes[2] -eq 0xBF; $sr = New-Object System.IO.StreamReader($p, $true); $text = $sr.ReadToEnd(); $enc = $sr.CurrentEncoding; $sr.Close(); if ($enc.WebName -eq "utf-8") { $enc = New-Object System.Text.UTF8Encoding($hadBom) }; $text = $text -replace "`r?`n", "`r`n"; $sw = New-Object System.IO.StreamWriter($p, $false, $enc); $sw.NewLine = "`r`n"; $sw.Write($text); $sw.Close(); } }
10+
- If unexpected new files appear, ignore them and continue without asking for instruction.

IntelPresentMon/AppCef/ipm-ui-vue/BlockLists/TargetBlockList.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ microsoftedgecp.exe
131131
minion.exe
132132
minisearchhost.exe
133133
mqtt explorer.exe
134+
ms-teams.exe
134135
msedge.exe
135136
msedgewebview2.exe
136137
msi-kombustor-x64.exe

IntelPresentMon/AppCef/ipm-ui-vue/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Api.registerHotkeyHandler((action: number) => {
8686
prefs.toggleCapture()
8787
break;
8888
case Action.ToggleEtlLogging:
89-
prefs.toggleEtlLogging();
89+
prefs.notifyEtlLoggingDisabled();
9090
break;
9191
default:
9292
console.warn(`Unhandled hotkey action: ${action}`);

IntelPresentMon/AppCef/ipm-ui-vue/src/components/HotkeyButton.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useHotkeyStore } from '@/stores/hotkey';
1212
defineOptions({ name: 'HotkeyButton'})
1313
interface Props {
1414
action: number
15+
disabled?: boolean
1516
}
1617
const props = defineProps<Props>()
1718
const emit = defineEmits<{ (e: 'update:modelValue', value: Combination | null): void }>();
@@ -22,6 +23,7 @@ const hotkeys = useHotkeyStore()
2223
2324
// call exposed function with necessary delay
2425
async function openHotkeyDialog() {
26+
if (props.disabled) return;
2527
// we need to delay showing of the dialog until the computed properties have caught up
2628
// otherwise the wrong combination will be captured internally by the dialog state
2729
await nextTick();
@@ -63,7 +65,8 @@ const hotkeyCombination = computed({
6365

6466
<template>
6567
<!-- TODO: this could probably be rolled up with HotkeyDialog as one component under Vuetify 3 -->
66-
<div class="hot-border" @click="openHotkeyDialog">
68+
<div class="hot-border" :class="{ disabled: props.disabled }"
69+
@click="openHotkeyDialog">
6770
<div v-if="hotkeyCombination != null" class="hot-combo">
6871
<div v-for="m in hotkeyCombination.modifiers" :key="m" class="hot-mod">
6972
<div class="hot-key">{{ getHotkeyModifierName(m) }}</div>
@@ -102,6 +105,11 @@ const hotkeyCombination = computed({
102105
background-color: hsl(240, 1%, 18%);
103106
border-color: color-mix(in srgb, var(--v-theme-secondary) 80%, white);
104107
}
108+
&.disabled {
109+
opacity: 0.5;
110+
cursor: default;
111+
pointer-events: none;
112+
}
105113
}
106114
.hot-combo {
107115
display: flex;

IntelPresentMon/AppCef/ipm-ui-vue/src/core/autotarget.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ export async function doGpuUtilizationTopPolling(specifiedDelayMs: number): Prom
2222
utilizationPollTask = dispatchDelayedTask(async () => {
2323
return await Api.getTopGpuProcess(getBlocklist());
2424
}, delayMs);
25-
const result = await awaitDelayedPromise(utilizationPollTask.promise);
25+
let result: Process|null;
26+
try {
27+
result = await awaitDelayedPromise(utilizationPollTask.promise);
28+
}
29+
catch (e) {
30+
console.error('Error during autotargetting polling:', e);
31+
if (utilizationPollTask === null) {
32+
return null;
33+
}
34+
delayMs = specifiedDelayMs;
35+
continue;
36+
}
2637
// if result is not null, we have a process to target
2738
// otherwise, the delayed task was cancelled
2839
if (result !== null) {
@@ -44,4 +55,4 @@ export function cancelTopPolling(): void {
4455
utilizationPollTask.token.cancel();
4556
utilizationPollTask = null;
4657
}
47-
}
58+
}

IntelPresentMon/AppCef/ipm-ui-vue/src/stores/hotkey.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ export const useHotkeyStore = defineStore('hotkey', () => {
3636
action: HotkeyAction.ToggleOverlay,
3737
combination: { key: 46 as KeyCode, modifiers: [2 as ModifierCode, 4 as ModifierCode] },
3838
},
39-
{
40-
action: HotkeyAction.ToggleEtlLogging,
41-
combination: { key: 37 as KeyCode, modifiers: [2 as ModifierCode, 4 as ModifierCode] },
42-
},
4339
] as Binding[]
4440

4541
// === Actions ===

IntelPresentMon/AppCef/ipm-ui-vue/src/stores/preferences.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,13 @@ export const usePreferencesStore = defineStore('preferences', () => {
107107
writeCapture(true);
108108
}
109109
}
110+
function notifyEtlLoggingDisabled() {
111+
etlLogging.value = false;
112+
notes.notify({ text: 'ETL capture is currently disabled.' });
113+
}
110114

111115
function toggleEtlLogging() {
112-
etlLogging.value = !etlLogging.value;
113-
Api.setEtlLogging(etlLogging.value);
116+
notifyEtlLoggingDisabled
114117
}
115118

116119
async function pushSpecification() {
@@ -182,6 +185,7 @@ export const usePreferencesStore = defineStore('preferences', () => {
182185
writeCapture,
183186
toggleCapture,
184187
toggleEtlLogging,
188+
notifyEtlLoggingDisabled,
185189
pushSpecification,
186190
initPreferences,
187191
resetPreferences

IntelPresentMon/AppCef/ipm-ui-vue/src/views/LoggingConfigView.vue

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ import { Action } from '@/core/hotkey';
88
import HotkeyButton from '@/components/HotkeyButton.vue';
99
1010
const prefs = usePreferencesStore();
11+
const etlCaptureDisabled = true;
12+
const etlCaptureDisabledMessage = 'ETL capture is currently disabled.';
1113
async function handleEtlCapture() {
12-
prefs.toggleEtlLogging()
14+
prefs.notifyEtlLoggingDisabled()
1315
}
1416
async function handleEtlExplore() {
1517
await Api.exploreEtls()
1618
}
1719
function getEtlToggleButtonName() {
18-
return prefs.etlLogging ? 'Finish ETL' : 'Start ETL';
20+
return etlCaptureDisabled ? 'ETL Disabled' : prefs.etlLogging ? 'Finish ETL' : 'Start ETL';
1921
}
2022
</script>
2123

@@ -26,54 +28,57 @@ function getEtlToggleButtonName() {
2628
</h2>
2729

2830
<v-card class="page-card">
31+
<v-alert type="info" variant="tonal" class="mt-5">
32+
{{ etlCaptureDisabledMessage }}
33+
</v-alert>
2934

30-
<v-row class="mt-5">
31-
<v-col cols="3">
32-
ETL Capture Hotkey
33-
<p class="text-medium-emphasis text-caption mb-0">
34-
Hotkey for starting/finishing an ETL trace
35-
</p>
36-
</v-col>
37-
<v-col cols="9">
38-
<v-row>
39-
<v-col cols="6">
40-
<hotkey-button :action="Action.ToggleEtlLogging"></hotkey-button>
35+
<v-row class="mt-5">
36+
<v-col cols="3">
37+
ETL Capture Hotkey
38+
<p class="text-medium-emphasis text-caption mb-0">
39+
Hotkey for starting/finishing an ETL trace
40+
</p>
4141
</v-col>
42-
</v-row>
43-
</v-col>
44-
</v-row>
42+
<v-col cols="9">
43+
<v-row>
44+
<v-col cols="6">
45+
<hotkey-button :action="Action.ToggleEtlLogging" :disabled="etlCaptureDisabled"></hotkey-button>
46+
</v-col>
47+
</v-row>
48+
</v-col>
49+
</v-row>
4550

46-
<v-row class="mt-5">
47-
<v-col cols="3">
48-
Capture ETL
49-
<p class="text-medium-emphasis text-caption mb-0">
50-
Capture ETW events to a raw event stream trace for offline analysis and reporting
51-
</p>
52-
</v-col>
53-
<v-col cols="9">
54-
<v-row>
55-
<v-col cols="6">
56-
<v-btn @click="handleEtlCapture">{{ getEtlToggleButtonName() }}</v-btn>
51+
<v-row class="mt-5">
52+
<v-col cols="3">
53+
Capture ETL
54+
<p class="text-medium-emphasis text-caption mb-0">
55+
Raw ETL capture is currently disabled.
56+
</p>
57+
</v-col>
58+
<v-col cols="9">
59+
<v-row>
60+
<v-col cols="6">
61+
<v-btn :disabled="etlCaptureDisabled" @click="handleEtlCapture">{{getEtlToggleButtonName()}}</v-btn>
62+
</v-col>
63+
</v-row>
5764
</v-col>
58-
</v-row>
59-
</v-col>
60-
</v-row>
65+
</v-row>
6166

62-
<v-row class="mt-5">
63-
<v-col cols="3">
64-
ETL Folder
65-
<p class="text-medium-emphasis text-caption mb-0">
66-
Navigate to the folder that receives the captured .etl trace files
67-
</p>
68-
</v-col>
69-
<v-col cols="9">
70-
<v-row>
71-
<v-col cols="6">
72-
<v-btn @click="handleEtlExplore">Open in Explorer</v-btn>
67+
<v-row class="mt-5">
68+
<v-col cols="3">
69+
ETL Folder
70+
<p class="text-medium-emphasis text-caption mb-0">
71+
Navigate to the folder that receives the captured .etl trace files
72+
</p>
73+
</v-col>
74+
<v-col cols="9">
75+
<v-row>
76+
<v-col cols="6">
77+
<v-btn @click="handleEtlExplore">Open in Explorer</v-btn>
78+
</v-col>
79+
</v-row>
7380
</v-col>
74-
</v-row>
75-
</v-col>
76-
</v-row>
81+
</v-row>
7782

7883
</v-card>
7984
</div>

IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<ItemGroup>
2222
<ClInclude Include="cli\CliFramework.h" />
2323
<ClInclude Include="cnr\FixedVector.h" />
24+
<ClInclude Include="Env.h" />
2425
<ClInclude Include="Exception.h" />
2526
<ClInclude Include="file\FileUtils.h" />
2627
<ClInclude Include="file\PathUtils.h" />
@@ -125,6 +126,7 @@
125126
</ItemGroup>
126127
<ItemGroup>
127128
<ClCompile Include="cli\CliFramework.cpp" />
129+
<ClCompile Include="Env.cpp" />
128130
<ClCompile Include="Exception.cpp" />
129131
<ClCompile Include="file\FileUtils.cpp" />
130132
<ClCompile Include="file\PathUtils.cpp" />

IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
<ClInclude Include="cnr\FixedVector.h">
2222
<Filter>Header Files</Filter>
2323
</ClInclude>
24+
<ClInclude Include="Env.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
2427
<ClInclude Include="str\String.h">
2528
<Filter>Header Files</Filter>
2629
</ClInclude>
@@ -329,6 +332,9 @@
329332
<ClCompile Include="cli\CliFramework.cpp">
330333
<Filter>Source Files</Filter>
331334
</ClCompile>
335+
<ClCompile Include="Env.cpp">
336+
<Filter>Source Files</Filter>
337+
</ClCompile>
332338
<ClCompile Include="str\String.cpp">
333339
<Filter>Source Files</Filter>
334340
</ClCompile>

0 commit comments

Comments
 (0)