-
Notifications
You must be signed in to change notification settings - Fork 114
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
Patch for Kernel 4.8.0 #37
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
H Jonas, I've just tried your patch with 4.8.4 kernel and see That's my kernel info:
That's how I got my perf.data (trying to follow this article as close as possible - https://gcc.gnu.org/wiki/AutoFDO/Tutorial):
And finally running
I'm wondering if the same works fine for you? Regards, |
I've tried the following on my machine. Note that I have Kernel 4.8.0; your version might have changes related to Perf. # Works
gcc -O3 sort.c -o sort_optimized
perf record -b -- ./sort_optimized
create_gcov --binary=./sort_optimized --profile=perf.data --gcov=sort.gcov -gcov_version=1
# This one works, too
perf record -b -e branches -- ./sort_optimized
create_gcov --binary=./sort_optimized --profile=perf.data --gcov=sort.gcov -gcov_version=1
# This one doesn't... it doesnt' seem to recognize br_inst_retired.near_taken:pp
perf record -b -e br_inst_retired.near_taken:pp -- ./sort_optimized I don't have ocperf.py... not sure what it does. One of my motivations to write the patch was that I saw very similar error messages to you. I got Maybe you could check your kernel sources (kernel/perf_event.h) to see what |
ocperf is available here - https://github.com/andikleen/pmu-tools. Well 79 looks like a bogus event, it is way too big number to be a real event. So I would assume this is because we're interpreting some data incorrectly but not sure which data - that definitely requires more in-depth look. |
ocperf.py is just perf wrapper. So,
call results in
for me. But it depends on host machine architecture. |
This is a set of changes that I did to make autofdo work with Linux 4.8.0.
This works for me, but no guarantees that it is correct. I basically copied content from various Kernel header files, and pattern-matched it against what was already in autofdo. My hope is that this pull request might nevertheless be a good starting point for an update.