> Hi, > this patch fixes three sissues with -fprofile-reorder-functions: > 1) First is that tp_first_run is stored as 32bit integer while it can easily > overflow (and does so during Firefox profiling).
Actually the overflow problem is possible only with mismatched profiles (which does happen for me). This is because time is increased only if new function is found, so it can not get over 2^32 for programs that do not have more than 2^32 functions. So thinking this over, perhaps it is better to keep tp_first_run 32bit and cap it on profile corruption. I will look into that tomorrow. The other two problems are valid though, so i will fix this incrementally. Honza