-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm-profgen] Add support for Linux kenrel profile #92831
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
16d50df
[llvm-profgen] Add support for Linux kenrel profile
xur-llvm fc60b77
[llvm-profgen] Add support for Linux kenrel profile
xur-llvm e22f1cc
[llvm-profgen] Add support for Linux kenrel profile
shenhanc78 15c884b
[llvm-profgen] Add support for Linux kenrel profile
shenhanc78 52c313f
[llvm-profgen] Add support for Linux kenrel profile
shenhanc78 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
Given we assume kernel binary has specific names, do we need an extra flag to tell the tool to generate profile for kernel?
If we have this flag, what happens if the flag is used but binary provided doesn't match the predefined kernel binary name? Should we error out?
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 think this interface is easier than parsing the binary name. Usually the kernel image name is vmlinux.*. But there is a chance that an user image uses the same name. Or someone changes the kernel image name to whatever. I want users to confirm this is kernel perf data file by using the option.
If the user passes a wrong binary image, most like they won't get a profile because of the symbol and address mismatch.
Compared to AutoFDO's create_llvm_prof, llvm-profgen does not check the buildid. But that's separated issue. This patch is just the basic version that provides the kernel perf support.
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.
Maybe useful to error out if kernel is requested but binary is not kernel?
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.
That actually what I want to avoid -- I don't want to assume a fixed name for the kernel. For my kernel builds, I don't change anything and the kernel image is vmlinux.*. But I don't know if others will rename the image.
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.
What I meant is error out when kernel image isn't found in mmap (we're already assuming names there). But no big deal either way.
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.
Done.