https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119719
--- Comment #5 from duane ellis <duane at duaneellis dot com> --- (In reply to Andrew Pinski from comment #1) > So this sounds like what autofdo does. I suspect you could hook up a similar > method for any profiling like program to autofdo. Currently the autofdo uses > perf (the Linux kernel userland tool) output to do it. but it is just a > bunch of scripts which creates the autofdo output to the PC. yea autofdo is too fat. one chip has 64k total ram about 15-16k free the app is using about 45k now for self and there is a minimal amount of stack space for each tasks run time stack.(we count bytes of stack space and adjust each tasks stack to +128 bytes of margin) because there is so little space left there is no usable malloc so anything c++ is a big fat memory hog and needs new/delete resource constrained is hard, this is not what i am using but it is very similar https://www.st.com/en/microcontrollers-microprocessors/stm32f107vc.html depending on the chip variant it has more ram but ours does not and i cannot change the chip on the board i have to use the designed in chip resource constrained is non trivial