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

PGO in gcc-8 #42

Closed
Alexei1981 opened this issue Aug 31, 2018 · 2 comments
Closed

PGO in gcc-8 #42

Alexei1981 opened this issue Aug 31, 2018 · 2 comments

Comments

@Alexei1981
Copy link

Hey.Is PGO Disabled in the GCC-8 (7.6) compiler?
I tried to profile one program with the flag -fprofile-generate and -lgcov,but the file .gcda did not appear.Why?

@its-pointless
Copy link
Owner

This is needed in your code. Otherwise it exits before writing the file.
__gcov_flush();

@its-pointless
Copy link
Owner

its-pointless commented Sep 2, 2018

I suppose a better answer would be appropriate. Because of the way android linker works it doesn't pull in enough from libgcov.a to work. The android ndk itself has there libgcov src in it.
Also you can mv libgcc.a from $PREFIX/lib and gcc will use its own libgcc.a and it will also work. (This is largely untested though)

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