Skip to content

Conversation

@shatyuka
Copy link

@shatyuka shatyuka commented Jan 8, 2026

No description provided.

CFDictionaryRef perfStats = IORegistryEntryCreateCFProperty(dhost->GPUService, CFSTR("PerformanceStatistics"), kCFAllocatorDefault, kNilOptions);
if (!perfStats)
goto cleanup;
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change misses the final assignment of mtr->values[0] = *totalUsage;

Copy link
Author

@shatyuka shatyuka Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an issue with the original code, which directly returns and skips the assignment after IORegistryEntryCreateCFProperties fails.
We have mtr->values[0] = NAN; before.

@BenBE BenBE added code quality ♻️ Code quality enhancement MacOS 🍏 MacOS / Darwin related issues labels Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality ♻️ Code quality enhancement MacOS 🍏 MacOS / Darwin related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants