I am aware there's a frequency of sample counts in gprof before it prints the flat profile. Based on the frequency of sample counts, my judgement would be longer the program runs, more is the sample collected for profiling and hence better is the data. But I am not really sure if this is true and whether long running programs are suitable for being profiled on gprof.
Any inputs will be really helpful.