1. 06 May, 2015 3 commits
    • 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
    • Chris Toshok's avatar
  2. 05 May, 2015 11 commits
  3. 04 May, 2015 4 commits
  4. 03 May, 2015 4 commits
  5. 02 May, 2015 11 commits
  6. 30 Apr, 2015 7 commits