as woken up from idle to execute
  // different types of work (e.g., timer work) and the time the CPU had been
  // idle before that.
  // See https://goo.gl/l7V5xg.
  function findWakeUpsOnThread(thread) {
    var wakeUps = {};
    var foundWakeUps = false;
    var lastTaskEnd = undefined;
    for (var event of thread.getDescendantEvents()) {
      if (!event.isTopLevel)
        continue;
      var taskEnd = event.start + event.duration;
      if (lastTaskEnd === undefined) {
        lastTaskEnd = taskEnd;