diagnostics: improve logging of hcs helper utilities on debug builds#13971
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances diagnostic capabilities for HCS/HNS operations by adding debug-only tracing and improving error messages. The changes include adding WSL_LOG_DEBUG calls to key functions, optimizing static data caching with std::call_once, and improving error message formatting.
Key changes:
- Added WSL_LOG_DEBUG tracing to 11 HCS/HNS API wrapper functions for better diagnostics
- Refactored
GetProcessorFeatures()andGetSchemaVersion()to use static caching withstd::call_oncefor thread-safe one-time initialization - Improved error messages by standardizing format specifiers to
%lsand splitting long error messages into separate log calls
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@benhillis I've opened a new pull request, #13973, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@benhillis I've opened a new pull request, #13977, to work on those changes. Once the pull request is ready, I'll request review from you. |
| THROW_HR_MSG(static_cast<HRESULT>(response.Error->Error), "%hs", response.Error->ErrorMessage.c_str()); | ||
| } | ||
|
|
||
| g_processorFeatures = std::move(response.Response.ProcessorFeatures); |
There was a problem hiding this comment.
nit: this doesn't actually move the structure since response is a const reference
d1d7aac to
f591079
Compare
This change adds additional debug-only tracing to help diagnose HCS / HNS issues.