From: Max Vilimpoc Date: Sat, 29 Aug 2026 17:46:46 +0000 (+0200) Subject: dotfiles: report Intel VTune rather than installing it X-Git-Url: https://vilimpoc.org/repos/dotfiles/commitdiff_plain/1e91b38f9f50d0f6e706c8f710ad6a77c974799e dotfiles: report Intel VTune rather than installing it The elevated half now prints whether VTune is on the box, its version and the path to vtune.exe, and prints the download page when it is not -- adding that the CPU is not Intel, when it is not. Not automated on purpose. The offline installer is a ~750 MB download from registrationcenter-download.intel.com/akdlm/IRC_NAS//, and that GUID is per-release with no "latest" redirect behind it, so every new build would mean editing a hard-coded link in a script whose whole point is running unattended on a fresh box. It also only earns its place on Intel silicon, since hardware event-based sampling reads Intel PMU counters. The unattended incantation is recorded in the comment and the README for anyone who does want to script it: -a --silent --cli --eula accept Detection reads the two Uninstall hives rather than probing a path, so it follows the install wherever it went, and the CLI path goes through the oneAPI `latest` junction so it stays right across upgrades. Exercised against the 2026.2.0 install on this box: reports the version and a vtune.exe that exists. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01YMh8i2QzkHNdE3MkKfcaT6 --- diff --git a/README.md b/README.md index 9615def..e0ef744 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,20 @@ throwaway VM reachable from a Linux host. msstore`); it is not installed here because the Store source needs an interactive, signed-in session, which the unattended elevated half does not have. +- **Intel VTune Profiler is reported, not installed.** The elevated half prints + whether it is on the box, its version, and the path to `vtune.exe`; if it is + missing it prints the download page instead (and says so if the CPU is not + Intel). Automating the install is not worth it here: the offline installer is a + ~750 MB download from a URL carrying a per-release GUID with no "latest" + redirect behind it, so every new build would mean editing a hard-coded link, + and it is only worth having on Intel silicon since hardware event-based + sampling reads Intel PMU counters. It does install unattended if you want it + scripted elsewhere: + + ```powershell + intel-vtune-_offline.exe -a --silent --cli --eula accept + ``` + - **Tracing without a UAC prompt.** `xperf` and `wpr` fail for a standard user in two different ways, because two different things are missing: diff --git a/setup-windows-with-uac.ps1 b/setup-windows-with-uac.ps1 index 8e8e797..34bfa8b 100644 --- a/setup-windows-with-uac.ps1 +++ b/setup-windows-with-uac.ps1 @@ -946,6 +946,46 @@ if ($WptDir) { } +# --------------------------------------------------------------------------- +# Intel VTune Profiler - reported, not installed +# +# Deliberately NOT automated, unlike everything above. The offline installer is +# a ~750 MB download from a URL carrying a per-release GUID +# (registrationcenter-download.intel.com/akdlm/IRC_NAS//intel-vtune-_offline.exe) +# with no "latest" redirect behind it, so every new build means editing a +# hard-coded link in here - and it is only worth having on Intel silicon, since +# hardware event-based sampling reads Intel PMU counters. Not a good trade for a +# script that has to keep working unattended on any box. +# +# So this step only reports. To install it, take the Windows offline installer +# from +# https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler-download.html +# and run it elevated; it installs unattended with +# intel-vtune-_offline.exe -a --silent --cli --eula accept +# --------------------------------------------------------------------------- +Write-Step 'Intel VTune Profiler (status only)' +$UninstallKeys = @( + 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' + 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' +) +$vtune = Get-ItemProperty $UninstallKeys -ErrorAction SilentlyContinue | + Where-Object { $_.DisplayName -match 'VTune' } | + Select-Object -First 1 +if ($vtune) { + Write-Host " Installed: $($vtune.DisplayName.Trim()) $($vtune.DisplayVersion)" -ForegroundColor Green + # The oneAPI layout keeps a `latest` junction beside the versioned directory, + # so this path stays right across upgrades. + $VTuneCli = Join-Path $vtune.InstallLocation 'vtune\latest\bin64\vtune.exe' + if (Test-Path $VTuneCli) { Write-Host " CLI: $VTuneCli" } +} else { + Write-Host ' Not installed.' -ForegroundColor Yellow + Write-Host ' https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler-download.html' -ForegroundColor Yellow + $cpu = (Get-CimInstance Win32_Processor -ErrorAction SilentlyContinue | Select-Object -First 1).Manufacturer + if ($cpu -and $cpu -notmatch 'Intel') { + Write-Host " (This CPU reports itself as '$cpu' - VTune's hardware event-based sampling wants Intel silicon.)" -ForegroundColor Yellow + } +} + # --------------------------------------------------------------------------- Write-Host "`nAll done." -ForegroundColor Green Write-Host 'If a reboot was flagged above, restart before opening VS or building drivers.'