On Mon, Jul 20, 2020 at 6:48 AM Sandra Loosemore <san...@codesourcery.com> wrote: > > I was looking at some timeout failures in nios2-linux-gnu test results > and found several tree-prof.exp tests were doing what appears to be an > excessive number of iterations (350 million?). Even though this is > hardware and not a simulator, I thought it would be reasonable to tell > the test harness to treat it like a simulator, and make these tests pay > attention to the is_simulator flag to run fewer iterations, as a number > of other test cases do to scale down long-running tests. > > I somewhat randomly chose to reduce the counts by a factor of 100 so the > longest-running one takes just over 10 seconds on this target. But, the > original numbers seem pretty random to me as well. Is there actually > any benefit to running more iterations even on a fast target?
I think at least parts of tree-prof.exp exercises sample-based profiling which might require more iterations. For example cold_partition_label.c was changed by commit f63ba78ce6d50bf627dd18018179eb03bf89716f Author: Andi Kleen <a...@linux.intel.com> Date: Thu Jul 14 02:14:56 2016 +0000 Some fixes for profile test cases for autofdo This fixes some basic issues with the profile test cases with autofdo. - Disable checking for value transformations that autofdo does not support. - Disable checking for fixed hit counts which autofdo does not support - Enable dumping of afdo log file and check right log file. - Increase run time of test cases to 1M iterations because autofdo needs a few samples to make sense of a program. The test case don't run noticeable slower with that. There are still failures unfortunately, especially the indirect call transformations do not trigger because autofdo thinks they are not hot. This can be addressed later. so the change to a larger number of iterations was intended. Maybe we can arrange to pass -DFOR_AUTOFDO_TESTING for the autofdo compiles and gate the larger number of iterations on that (most targets do not support autofdo and to not run that mode)? Richard. > -Sandra