-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS: buildTopology in kernel now fills output buffer directly #440
Open
nealsid
wants to merge
1
commit into
intel:master
Choose a base branch
from
nealsid:macos-toplogy-structure-mismatch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please try to move TopologyEntry out of cpucounters.h to a separate header that could be included into both UserKernelShared.h and cpucounters.h ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I can look into this. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent some time on this today, and I see a couple of options - let me know if I missed something:
When trying the second, I ran into a lot of, e.g. iostream use in the header files, and, to start, I tried moving the calls in types.h to a new types.cpp file and using forward declarations but it ended up getting pretty messy and involving changes through a bunch of other headers (Some files which #include types.h need its includes)
I could do the first option, but it seems to me that some work such as running clang's "include-what-you-use" would help a great deal, and then it would be easier to have a header file for TopologyEntry and any other types that need to be included without pulling in the standard library. Put another way, once the include graph is a little cleaner, we would probably undo the first option if we did that now.
Can I propose to keep the duplicate TopologyEntry structure, and take it on as a TODO to start working on header file dependencies? For me it's a bit too big of a change to clean up all the headers at once on a new codebase, but I can definitely start going file by file, and keeping a duplicate TopologyEntry structure is not technically a regression to today.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for proposing the options. I agree with you that "include-what-you-use" is something we should do but it will take time... Thanks to you your work I realized that we have two topology structs and it is a significant issue that we need to address asap. Option 1 is easy to implement and I prefer to have it implemented in this patch rather than waiting for a later major change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds great, I'll make the change.