Skip to content
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

GCC12 use profiled created by create_gcov doesn't work #194

Open
andyzhaozhenyu opened this issue May 13, 2024 · 3 comments
Open

GCC12 use profiled created by create_gcov doesn't work #194

andyzhaozhenyu opened this issue May 13, 2024 · 3 comments

Comments

@andyzhaozhenyu
Copy link

I tried to use Autofdo on GCC12 to optimize bubble_sort, but I checked the cfg. The count for basic block is not correct.
屏幕截图 2024-05-13 215538

@erozenfeld
Copy link
Contributor

@andyzhaozhenyu andyzhaozhenyu Can you share the command lines and the output of your invocation of perf and create_gcov?

@andyzhaozhenyu
Copy link
Author

gcc -g -O2 -o pmu test.c -fauto-profile=pmu.gcov -fdump-ipa-afdo-details
/home/zzy/used/autofdo/autofdo-0.19/build/create_gcov --binary=baseline --profile=pmu.data --gcov=pmu.gcov --gcov_version=2 --use_lbr=0

And here is the output for dump_gcov
截屏2024-05-14 09 52 26

@erozenfeld
Copy link
Contributor

@andyzhaozhenyu I tried this with my version of bubble_sort and GCC12 and I see that the counts are propagated correctly. Can you share your test.c and full output of gcc -g -O2 -o pmu test.c -fauto-profile=pmu.gcov -fdump-ipa-afdo-details ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants