Questions tagged [pgo]

Profile Guided Optimization is a method of supplying the compiler with data about common flows which should be optimized.

34 questions
44
votes
2 answers

What information does GCC Profile Guided Optimization (PGO) collect and which optimizations use it?

Which information does GCC collect when I enable -fprofile-generate and which optimization does in fact uses the collected information (when setting the -fprofile-use flag) ? I need citations here. I've searched for a while but didn't found anything…
JohnTortugo
  • 5,435
  • 7
  • 33
  • 63
13
votes
4 answers

profile-guided optimization (C)

Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops? (this question is specific, not about optimization in general, thanks)
elmarco
  • 27,816
  • 21
  • 58
  • 68
5
votes
0 answers

How express PGO dependencies in CMake 3.7?

I have a C++ program that I'm building with Clang 3.9's profile-guided optimization feature. Here's what's supposed to happen: I build the program with instrumentation enabled. I run that program, creating a file with profile-data: prof.raw. I use…
Christian Convey
  • 1,072
  • 7
  • 18
5
votes
1 answer

Compiling Chrome/Chromium with performance considerations

I am currently weighing the potential pros and cons of running local builds of Chromium. I have never built Chromium from source before, but I understand it is a huge project and the compilation requirements are hefty and time-consuming. I have…
Josh H.
  • 51
  • 4
4
votes
0 answers

How do you use PGO + LTO optimization with GCC

I've been researching a lot lately on how PGO and LTO can significantly optimize a programs speed (some say around 20%). I currently just program in C and build GUI's with GTK+ in Windows (compiling everything through GCC) and only use -O2 for…
Snorklebort
  • 103
  • 9
4
votes
0 answers

Why is GCC not able to inline functions with -flto and profile guided optimization within a static library?

I'm using GCC version 4.7.2. I create a static library having two files "ctest1.cpp" and "ctest2.cpp". ctest1.cpp #include #include "ctest2.h" void ctest1() { printf("In ctest1"); ctest2(); } ctest2.cpp #include…
Akanksha
  • 41
  • 1
4
votes
1 answer

The risks of using PGO (profile-guided optimization) with production environment

I have a system (Linux & C++) doing intensive signal/image processing operations. I would like to use PGO to improve performance of our application. Are there any risks / potential issues I should be aware of when using PGO ? Are unit tests + E2E…
tommyk
  • 2,853
  • 4
  • 33
  • 54
2
votes
2 answers

Optimization report from gcc's pgo

I can see that gcc's PGO (profile guided optimization) works fine with my application (~15% faster execution). I'm using '-fprofile-generate' and then '-fprofile-use'. But is there any way to generate some report describing what and how has been…
mszabc
  • 495
  • 4
  • 16
2
votes
1 answer

gcc macro when -fprofile-generate is used

Does gcc define a macro of some sort when the flag -fprofile-generate is specified? Basically, I want to disable multithreading when I'm profiling--it seems to have a way of corrupting the .gcda files.
cleong
  • 6,297
  • 2
  • 26
  • 38
2
votes
0 answers

Failing to use PGO with error LNK1270

I'm trying to use Profile Guided Optimization (PGO) with VS8. After instrumenting the DLL in question I copy it over to a machine that has our application installed and run the training scenario. I then copy the pgc training files back to my dev box…
Motti
  • 99,411
  • 44
  • 178
  • 249
1
vote
0 answers

G++/CMake Profile Guided Optimization cannot find generated .gcda files

I am compiling an application using CMake 3.16.3 and G++ 9.3 on Ubuntu 20.04. This is the current source directory: . (this is called MyApp) ├── src │   ├── /* source files */ │   └── CMakeLists.txt ├── tests │   ├── /* source files */ │   └──…
featherless biped
  • 153
  • 1
  • 4
  • 14
1
vote
0 answers

Is -fprofile-reorder-functions supported with Autofdo?

Autofdo allows gathering more accurate profile data than when using -fprofile-generate but it’s not used -fauto-profile unlike -fprofile-use. Does it means it only works with -fprofile-use?
user2284570
  • 2,425
  • 3
  • 18
  • 59
1
vote
0 answers

How to use the -pgo-instr-gen arguments with llvm opt

I want to test the PGO with llvm and I find most of the tutorial in the internet uses clang with argument -fprofile-instr-use to enable PGO instrumentation. However, what I have is an llvm bitcode file instead of the source code and I want to apply…
1
vote
1 answer

Profile Guided Optimization - __gcov

I am trying to run profile guided optimization on my code with -fprofile-generate flag. When I compile with it, I am getting the following error. obj\Debug\main.o||In function…
1
vote
0 answers

GPEncryptedDataList found where PGPPublicKeyRing expected

I am encrypting a text file with public key which i already have, I have a method which basically reads public key from the input stream, while creating an object at the following line i am getting exception public static PGPPublicKey…
1
2 3