1. 11 May, 2015 5 commits
  2. 10 May, 2015 4 commits
  3. 09 May, 2015 9 commits
  4. 08 May, 2015 9 commits
  5. 07 May, 2015 9 commits
  6. 06 May, 2015 4 commits
    • Chris Toshok's avatar
      Merge pull request #475 from toshok/stat-timers · 600208d0
      Chris Toshok authored
      Stat timers
      600208d0
    • Chris Toshok's avatar
    • Chris Toshok's avatar
      add stat counters for allocations · d6480fba
      Chris Toshok authored
      d6480fba
    • Chris Toshok's avatar
      add StatTimer, a lightweight cpu tick timer · addbe087
      Chris Toshok authored
      Each thread has a stack of timers (which should have automatic scope.)  pushing a timer
      onto the stack pauses the currently running one to avoid double counting, and popping a
      timer resumes the previous one.
      
      also make sure we pause the current timer, and swap out the current stack of timers when
      swapping to/from generator stacks, since otherwise pushes/pops won't line up and we hit
      asserts in StatTimer.
      
      Timers and StatTimers accumulate their durations in terms of CPU ticks, which are converted
      to microseconds only at Stats::dump() time, calculated with our estimate of CPU frequency.
      Needless to say, this only works when there is no CPU stepping/scaling.
      
      There are some additions to the Timer class that allow us to get the start/end time so that
      we can sync up StatTimers with them, if both are used in a given piece of code.
      
      getCPUTicks() is only implemented using __rdtscp() at the moment, so won't work on anything
      not recent relatively recent x86.
      
      we accumulate total ticks during dumping and output both 'ticks_in_main' and 'ticks_all_timers',
      which should be equal.
      addbe087