Questions tagged [pgo]

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

47 questions
48
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
  • 6,356
  • 7
  • 36
  • 69
19
votes
2 answers

Why is reversed(mylist) so slow?

(Update: Might only happen in CPython 3.8 32-bit for Windows, so don't be surprised if you can't reproduce it in other versions. See tables in the Update section.) Both iter and reversed result in specialized iterators for lists: >>> iter([1, 2,…
Kelly Bundy
  • 23,480
  • 7
  • 29
  • 65
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
  • 31,633
  • 21
  • 64
  • 68
8
votes
1 answer

How can I express PGO dependencies in CMake 3.7 and higher?

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,202
  • 11
  • 19
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
5
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
  • 123
  • 2
  • 10
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

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
  • 7,242
  • 4
  • 31
  • 40
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
  • 3,187
  • 7
  • 39
  • 61
3
votes
0 answers

Can gcc's profile guided optimisation (PGO) be affected by emulation?

Let's imagine that we compiled some code with a cross-compiler for another CPU architecture with enabled PGO, so now we have to run it in order to generate profiling data. Since we can not run this binary directly on the builder machine, we use…
tambel
  • 166
  • 1
  • 8
2
votes
1 answer

PGO: Why is XCode generating an empty .profdata file?

I'm trying to use profile-guided optimization in XCode 8. I've followed the instructions here. I made sure to terminate my app using the stop button in XCode, as describe in the document. I verified that the compile and link commands included the…
Dominic Dos Santos
  • 2,623
  • 2
  • 18
  • 30
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
  • 525
  • 5
  • 18
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
  • 110,860
  • 49
  • 189
  • 262
1
vote
0 answers

.profdata file not being detected by compiler

I'm trying to enable PGO on a ps4 build on clang. I'm able to generate the .profraw files using -fprofile-instr-generate and -fprofile-coverage-mapping. I've also merged them to the required .profdata format. However after using…
1
vote
0 answers

My my Postgres-operator Pods dont transfer to new node if one node is failed?

I have a k8s cluster with one master and 3 worker nodes. I have set up crunchy operator high availability with 2 replica sets. This is my deployment file. apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: name:…
1
2 3 4