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: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 857b279067ce
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9cd0097bb0d8
Choose a head ref
  • 6 commits
  • 13 files changed
  • 1 contributor

Commits on May 31, 2016

  1. Slightly relax memory ordering for ThreadNexus::Phase.

    This ordering is slightly relaxed from the default std::memory_order_seq_cst
    but may not have any impact on typical x86 hardware.
    brixen committed May 31, 2016
    Copy the full SHA
    d092bc2 View commit details
  2. Eliminate extra halt lock.

    Since the phase_lock is recursive, and we *always* need to acquire the lock
    when transitioning to managed phase, the halting thread can just holt this
    lock unconditionally while halting. That thread will then be able to run
    stop-the-world garbage collection with the normal process which acquires and
    releases the phase lock. This eliminates the second halt lock.
    brixen committed May 31, 2016
    Copy the full SHA
    1af0ee1 View commit details
  3. Copy the full SHA
    60cf56a View commit details
  4. Copy the full SHA
    195e11a View commit details

Commits on Jun 1, 2016

  1. Copy the full SHA
    729737b View commit details

Commits on Jun 2, 2016

  1. Replaced ThreadNexus recursive mutex with atomic flag.

    Recursive mutex under C++11 plays very badly with fork(), apparently. But we
    must be able to do stuff like run garbage collection and Ruby code during
    shutdown because we process Ruby finalizers, which may run pretty much
    arbitrary Ruby code.
    
    Hence, we need a mechanism to hold all threads except the halting thread but
    also allow that thread to run arbitrary managed code, one function of which is
    running the garbage collection code, which needs to stop the world for some
    things, which relies on the ThreadNexus synchronization code, and on and on.
    
    So we use an atomic variable that holds the thread's id and if the variable
    already has a thread's id, that thread is the one who set it, and hence can
    proceed confident that no other thread is running.
    brixen committed Jun 2, 2016
    Copy the full SHA
    9cd0097 View commit details
Loading