Skip to content
Snippets Groups Projects
  1. May 18, 2018
  2. May 17, 2018
  3. May 16, 2018
  4. May 15, 2018
  5. May 14, 2018
  6. May 13, 2018
    • Damien George's avatar
      py/mpstate.h: Adjust start of root pointer section to exclude non-ptrs. · 749b1617
      Damien George authored
      This patch moves the start of the root pointer section in mp_state_ctx_t
      so that it skips entries that are not pointers and don't need scanning.
      
      Previously, the start of the root pointer section was at the very beginning
      of the mp_state_ctx_t struct (which is the beginning of mp_state_thread_t).
      This was the original assembler version of the NLR code was hard-coded to
      have the nlr_top pointer at the start of this state structure.  But now
      that the NLR code is partially written in C there is no longer this
      restriction on the location of nlr_top (and a comment to this effect has
      been removed in this patch).
      
      So now the root pointer section starts part way through the
      mp_state_thread_t structure, after the entries which are not root pointers.
      
      This patch also moves the non-pointer entries for MICROPY_ENABLE_SCHEDULER
      outside the root pointer section.
      
      Moving non-pointer entries out of the root pointer section helps to make
      the GC more precise and should help to prevent some cases of collectable
      garbage being kept.
      
      This patch also has a measurable improvement in performance of the
      pystone.py benchmark: on unix x86-64 and stm32 there was an improvement of
      roughly 0.6% (tested with both gcc 7.3 and gcc 8.1).
      749b1617
  7. May 11, 2018
Loading