On 9 November 2015 at 11:46, Peter Maydell <peter.mayd...@linaro.org> wrote: > Yep, just confirmed that current master with commit b553a0428 > reverted displays the bug again.
After a bunch of "try building specific object files with optimization off to see where the problem goes away" tests, I've narrowed the problem down further: if you tell clang to disable optimization by adding __attribute__ ((optnone)) to the two functions hpet_time_after() and hpet_time_after64() in hw/timer/hpet.c then the problem goes away. My current theory is that we're doing something here that's not valid C and the compiler ends up optimizing it into something that results in the timer setting the next-timeout to a very short interval and that's what's hogging the main-loop time. I'll look in more detail after lunch. thanks -- PMM