Skip to content

Conversation

zmyzheng
Copy link
Contributor

This PR adds the statistics collection for PageFault count in Windows. Different from Linux which specifies Major Page Fault and Minor Page Fault, Windows only provides the total PageFault count.

@shirou
Copy link
Owner

shirou commented Mar 6, 2025

Sorry for keeping you waiting. After conducting a survey, it appears that all operating systems except Windows distinguish between Major and Minor faults. I believe adding "Total" solely for Windows might lead to inconsistency.

Therefore, how about adding mem.PageFaultCount to "Major" and including a comment like, "Since Windows does not distinguish between Major and Minor faults, all faults are treated as Major"?

@zmyzheng
Copy link
Contributor Author

zmyzheng commented Mar 6, 2025

Sorry for keeping you waiting. After conducting a survey, it appears that all operating systems except Windows distinguish between Major and Minor faults. I believe adding "Total" solely for Windows might lead to inconsistency.

Therefore, how about adding mem.PageFaultCount to "Major" and including a comment like, "Since Windows does not distinguish between Major and Minor faults, all faults are treated as Major"?

Sounds good. Thanks @shirou for the investigation. I updated the code based on your suggestion.

Copy link
Owner

@shirou shirou left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

@shirou shirou merged commit 6039e8f into shirou:master Mar 7, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants