Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: 169e1478d88b
Choose a base ref
...
head repository: NixOS/nix
compare: 0629601da1d1
Choose a head ref
  • 6 commits
  • 9 files changed
  • 1 contributor

Commits on Jun 12, 2018

  1. Copy the full SHA
    6ad0a2f View commit details
    Browse the repository at this point in the history
  2. Cache parse trees

    This prevents EvalState::resetFileCache() from parsing everything all
    over again.
    edolstra committed Jun 12, 2018
    Copy the full SHA
    24c6806 View commit details
    Browse the repository at this point in the history
  3. Add temporary stats

    edolstra committed Jun 12, 2018
    Copy the full SHA
    3096410 View commit details
    Browse the repository at this point in the history
  4. Don't scan for roots in dynamic libraries

    This reduces the risk of object liveness misdetection. For example,
    Glibc has an internal variable "mp_" that often points to a Boehm
    object, keeping it alive unnecessarily. Since we don't store any
    actual roots in global variables, we can just disable data segment
    scanning.
    
    With this, the max RSS doing 100 evaluations of
    nixos.tests.firefox.x86_64-linux.drvPath went from 718 MiB to 455 MiB.
    edolstra committed Jun 12, 2018
    Copy the full SHA
    455d1f0 View commit details
    Browse the repository at this point in the history
  5. GC_malloc -> GC_MALLOC

    This makes it possible to build with -DGC_DEBUG.
    edolstra committed Jun 12, 2018
    Copy the full SHA
    c905d8b View commit details
    Browse the repository at this point in the history
  6. Move EvalState from the stack to the heap

    EvalState contains a few counters (e.g. nrValues) that increase
    quickly enough that they end up being interpreted as pointers by the
    garbage collector. Moving it to the heap makes them invisible to the
    garbage collector.
    
    This reduces the max RSS doing 100 evaluations of
    nixos.tests.firefox.x86_64-linux.drvPath from 455 MiB to 292 MiB.
    
    Note: ideally, allocations would be much further up in the 64-bit
    address space to reduce the odds of an integer being misinterpreted as
    a pointer. Maybe we can use some linker magic to move the .bss segment
    to a higher address.
    edolstra committed Jun 12, 2018
    Copy the full SHA
    0629601 View commit details
    Browse the repository at this point in the history