Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4eaebdc
draft 1 coordinator+provider
planetchili Mar 12, 2026
33a4360
device metric use mapping
planetchili Mar 13, 2026
bf1928a
making igcl
planetchili Mar 13, 2026
e7d9e7c
igcl dumping verbose
planetchili Mar 13, 2026
0673795
better sample handling w/ double buffer etc.
planetchili Mar 13, 2026
9cebb49
nvapi provider draft
planetchili Mar 13, 2026
31e5a6a
nvml draft
planetchili Mar 13, 2026
fddb1ba
draft wmi provider
planetchili Mar 14, 2026
51be969
construct providers
planetchili Mar 14, 2026
6446a7f
switchover success w/ cpu+gpu thread merger
planetchili Mar 14, 2026
58a6aaf
adl added
planetchili Mar 14, 2026
4d95387
move remaining 3rd party, delete bitset, shims, legacy provider/adapter
planetchili Mar 15, 2026
87e4c13
LUID restoration for igcl
planetchili Mar 15, 2026
e3cae4e
fix nvapi absence reporting and window.h inclusion warnings
planetchili Mar 15, 2026
c8152db
namespace cleanup
planetchili Mar 15, 2026
7786291
fix luid
planetchili Mar 15, 2026
8a274cc
dump telemetry caps with pretty metric names
planetchili Mar 15, 2026
e52ee9f
default device discrete
planetchili Mar 15, 2026
7229c96
log id decision
planetchili Mar 15, 2026
7974ea5
advanced adapter ordering
planetchili Mar 15, 2026
b106ecd
simple default device
planetchili Mar 15, 2026
9b95f42
uci provider working
planetchili Mar 16, 2026
24a1f19
log poll/parse errors uci
planetchili Mar 17, 2026
d17b0ce
uci lifecycle logging
planetchili Mar 17, 2026
73212c9
cleanup
planetchili Mar 20, 2026
88c6d09
per core and all core cpu temperature
planetchili Mar 20, 2026
c147b32
update uci to fix collection lifecycle bug
planetchili Mar 20, 2026
d99f34b
remove legacy getters/action
planetchili Mar 22, 2026
721cd50
more unused actions
planetchili Mar 22, 2026
5dd8b24
remove unnecessary telemetry cache and use chrono literals
planetchili Mar 22, 2026
742ac41
nv ml adl in place
planetchili Mar 22, 2026
d9c9cc5
targeted generated verbose dumps
planetchili Mar 23, 2026
bd12afa
unifying exceptions
planetchili Mar 30, 2026
af87c33
rename amd -> adl provider
planetchili Mar 30, 2026
ccd1cff
post-rebase fix
planetchili May 26, 2026
784e1cd
allow running without UCI present/usable
planetchili May 26, 2026
0fe797c
UCI availability check in provider ctor
planetchili May 27, 2026
2fcddc0
detect integrated gpus for amd
planetchili May 27, 2026
0df0782
fix amd memory usage reporting
planetchili May 27, 2026
f73059c
allow build when uci dist files are absent
planetchili May 27, 2026
067811e
Externalize UCI SDK payload
planetchili May 29, 2026
16d1e17
fix uci installer deployment
planetchili May 29, 2026
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
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
- 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:
- $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(); } }
- If unexpected new files appear, ignore them and continue without asking for instruction.
- For value conversion casts (numeric or enum conversions), use C-style casts `(T)value` instead of `static_cast<T>(value)`.
- For const, pointer, reference, up/down, or reinterpret casts, use C++ cast syntax (`const_cast`, `dynamic_cast`, `reinterpret_cast`, etc.).
- Do not bind unused names in structured bindings. Prefer binding only needed values (for example use `.first` from `emplace()` or iterate entries without destructuring unused keys).
- Do not fully qualify namespaces when not needed by local scope (for example prefer `MetricUse` or `svc::MetricUse` over `pmon::svc::MetricUse` when already inside `pmon::svc::acts` or with suitable using scope).
11 changes: 2 additions & 9 deletions IntelPresentMon/AppCef/ipm-ui-vue/src/core/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ export class Api {
static async loadEnvVars(): Promise<EnvVars> {
return await this.invokeEndpointFuture('loadEnvVars', {});
}
static async introspect(): Promise<{metrics: Metric[], stats: Stat[], units: Unit[], systemDeviceId: number, defaultAdapterId: number}> {
static async introspect(): Promise<{metrics: Metric[], stats: Stat[], units: Unit[], adapters: Adapter[], systemDeviceId: number, defaultAdapterId: number}> {
const introData = await this.invokeEndpointFuture('Introspect', {});
if (!Array.isArray(introData.metrics) || !Array.isArray(introData.stats) ||
!Array.isArray(introData.units) || typeof introData.systemDeviceId !== 'number' ||
!Array.isArray(introData.units) || !Array.isArray(introData.adapters) || typeof introData.systemDeviceId !== 'number' ||
typeof introData.defaultAdapterId !== 'number') {
console.log("error intro call");
throw new Error('Bad member type returned from introspect');
Expand All @@ -75,13 +75,6 @@ export class Api {
const {top} = await this.invokeEndpointFuture('getTopGpuProcess', {blacklist});
return top;
}
static async enumerateAdapters(): Promise<Adapter[]> {
const {adapters} = await this.invokeEndpointFuture('EnumerateAdapters', {});
if (!Array.isArray(adapters)) {
throw new Error('Bad (non-array) type returned from enumerateAdapters');
}
return adapters;
}
static async bindHotkey(binding: Binding): Promise<void> {
await this.invokeEndpointFuture('BindHotkey', binding);
}
Expand Down
6 changes: 2 additions & 4 deletions IntelPresentMon/AppCef/ipm-ui-vue/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@/assets/global.css'
import '@/assets/global.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
Expand All @@ -17,7 +17,6 @@ import { md2 } from 'vuetify/blueprints'

import { useHotkeyStore } from '@/stores/hotkey';
import { useIntrospectionStore } from '@/stores/introspection';
import { useAdaptersStore } from './stores/adapters'
import { loadBlocklists } from './core/block-list'
import { usePreferencesStore } from './stores/preferences'

Expand Down Expand Up @@ -100,7 +99,6 @@ async function initStores() {
await Promise.all([
useHotkeyStore().refreshOptions(),
useIntrospectionStore().load(),
useAdaptersStore().refresh(),
loadBlocklists(),
])
await usePreferencesStore().initPreferences()
Expand All @@ -117,4 +115,4 @@ async function boot() {
app.mount('#app')
}

boot()
boot()
22 changes: 0 additions & 22 deletions IntelPresentMon/AppCef/ipm-ui-vue/src/stores/adapters.ts

This file was deleted.

4 changes: 4 additions & 0 deletions IntelPresentMon/AppCef/ipm-ui-vue/src/stores/introspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ import type { Metric } from '@/core/metric';
import type { Stat } from '@/core/stat';
import type { Unit } from '@/core/unit';
import type { MetricOption } from '@/core/metric-option';
import type { Adapter } from '@/core/adapter';

export const useIntrospectionStore = defineStore('introspection', () => {
// === State ===
const metrics = ref<Metric[]>([]);
const stats = ref<Stat[]>([]);
const units = ref<Unit[]>([]);
const adapters = ref<Adapter[]>([]);
const systemDeviceId = ref<number>(0);
const defaultAdapterId = ref<number>(0);

Expand All @@ -32,6 +34,7 @@ export const useIntrospectionStore = defineStore('introspection', () => {
metrics.value = intro.metrics;
stats.value = intro.stats;
units.value = intro.units;
adapters.value = intro.adapters;
systemDeviceId.value = intro.systemDeviceId;
defaultAdapterId.value = intro.defaultAdapterId;
}
Expand All @@ -42,6 +45,7 @@ export const useIntrospectionStore = defineStore('introspection', () => {
metrics,
stats,
units,
adapters,
systemDeviceId,
defaultAdapterId,
metricOptions,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<!-- Copyright (C) 2022 Intel Corporation -->
<!-- Copyright (C) 2022 Intel Corporation -->
<!-- SPDX-License-Identifier: MIT -->

<script setup lang="ts">
import { computed } from 'vue';
import { usePreferencesStore } from '@/stores/preferences';
import { isDevelopment } from '@/core/env-vars';
import { useAdaptersStore } from '@/stores/adapters';
import { useIntrospectionStore } from '@/stores/introspection';

const prefs = usePreferencesStore();
const adaptersStore = useAdaptersStore();
const intro = useIntrospectionStore();

const metricPollMessages = computed(() => {
if (prefs.preferences.metricPollRate % prefs.preferences.overlayDrawRate !== 0) {
Expand Down Expand Up @@ -142,7 +142,7 @@ const metricPollMessages = computed(() => {
<v-col cols="9">
<v-select
v-model="prefs.preferences.adapterId"
:items="adaptersStore.adapters"
:items="intro.adapters"
item-value="id"
item-title="name"
placeholder="Default adapter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace p2c::client::util::kact {
IpcActionRegistrator() { ::p2c::client::util::IpcInvocationManager::RegisterDispatchBinding<A>(); }
};

IpcActionRegistrator<kproc::kact::EnumerateAdapters> reg_ibind_EnumerateAdapters_;
IpcActionRegistrator<kproc::kact::Introspect> reg_ibind_Introspect_;
IpcActionRegistrator<kproc::kact::PushSpecification> reg_ibind_PushSpecification_;
IpcActionRegistrator<kproc::kact::SetCapture> reg_ibind_SetCapture_;
Expand Down
4 changes: 4 additions & 0 deletions IntelPresentMon/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<OutDir>$(SolutionDir)build\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\obj\$(ProjectName)-$(Platform)-$(Configuration)\</IntDir>
<LocalDebuggerWorkingDirectory>$(OutDir)</LocalDebuggerWorkingDirectory>
<UciSdkDir Condition="'$(PMON_UCI_SDK_DIR)'!=''">$(PMON_UCI_SDK_DIR)</UciSdkDir>
<UciSdkDir Condition="'$(UciSdkDir)'==''">$(MSBuildThisFileDirectory)ControlLib\uci\external</UciSdkDir>
<UciSdkIncludeDir>$(UciSdkDir)\include</UciSdkIncludeDir>
<UciSdkBinDir>$(UciSdkDir)\bin</UciSdkBinDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile />
Expand Down
4 changes: 2 additions & 2 deletions IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
Expand Down Expand Up @@ -406,4 +406,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
1 change: 1 addition & 0 deletions IntelPresentMon/CommonUtilities/log/Verbose.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace pmon::util::log
v8async,
procwatch,
tele_gpu,
uci,
core_metric,
core_hotkey,
core_window,
Expand Down
67 changes: 51 additions & 16 deletions IntelPresentMon/CommonUtilities/ref/GeneratedReflectionHelpers.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <string>
#include <concepts>
#include "GeneratedReflection.h"
Expand All @@ -8,28 +8,44 @@ namespace pmon::util::ref::gen
namespace {
using namespace std::literals;

template<typename T, size_t N, bool Primitive>
std::string DumpArray_(const void* pArray)
template<typename T, size_t N>
std::string DumpArray_(const T(&arr)[N])
{
auto& arr = *reinterpret_cast<const T(*)[N]>(pArray);
std::ostringstream oss;
oss << "[";
// TODO: push this up to the static layer, simplify this helper and C# generation
if constexpr (Primitive) {
if constexpr (std::same_as<T, char> || std::same_as<T, unsigned char>) {
for (size_t i = 0; i < N; i++) {
oss << " " << (int)arr[i] << ",";
}
if constexpr (std::is_array_v<T>) {
for (size_t i = 0; i < N; i++) {
oss << " " << DumpArray_(arr[i]) << ",";
}
else {
for (size_t i = 0; i < N; i++) {
oss << " " << arr[i] << ",";
}
}
else if constexpr (std::same_as<T, char>) {
for (size_t i = 0; i < N; i++) {
oss << " " << arr[i] << ",";
}
}
else if constexpr (std::same_as<T, unsigned char>) {
for (size_t i = 0; i < N; i++) {
oss << " " << (int)arr[i] << ",";
}
}
else if constexpr (
std::same_as<T, signed char> ||
std::same_as<T, wchar_t> ||
std::same_as<T, char8_t> ||
std::same_as<T, char16_t> ||
std::same_as<T, char32_t>) {
for (size_t i = 0; i < N; i++) {
oss << " " << (uint32_t)arr[i] << ",";
}
}
else if constexpr (std::is_arithmetic_v<T>) {
for (size_t i = 0; i < N; i++) {
oss << " " << arr[i] << ",";
}
}
else if constexpr (std::is_pointer_v<T>) {
for (size_t i = 0; i < N; i++) {
oss << " " << (arr[i] ? std::format("0x{{:016X}}", reinterpret_cast<std::uintptr_t>(arr[i])) : "null"s) << ",";
oss << " " << (arr[i] ? std::format("0x{:016X}", reinterpret_cast<std::uintptr_t>(arr[i])) : "null"s) << ",";
}
}
else {
Expand All @@ -45,5 +61,24 @@ namespace pmon::util::ref::gen
oss << "]";
return oss.str();
}

template<typename T, size_t N, bool Primitive>
std::string DumpArray_(const void* pArray)
{
(void)Primitive;
return DumpArray_(*reinterpret_cast<const T(*)[N]>(pArray));
}

template<typename T, size_t N, typename F>
std::string DumpArray_(const T(&arr)[N], F&& formatter)
{
std::ostringstream oss;
oss << "[";
for (size_t i = 0; i < N; i++) {
oss << " " << formatter(arr[i]) << ",";
}
oss << "]";
return oss.str();
}
}
}
}
Loading