Project

General

Profile

Bug #9225

[patch] add WB to NODE_CREF

Added by tmm1 (Aman Gupta) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
trunk
[ruby-core:58947]

Description

In our rails app, there are a lot of long-lived NODE_CREF:

p ObjectSpace.count_nodes
=> {:NODE_IF=>3, :NODE_CREF=>45810, :NODE_IFUNC=>11}

These are static objects, but are considered SHADY and contribute to the size of the remembered set:

GC.stat[:remembered_shady_object]
=> 49667

With the following patch, NODE_CREF are no longer shady and can be promoted: https://github.com/tmm1/ruby/commit/c5e8341

This reduces the size of the remembered set in our app, and speeds up minor GC from 22ms to 18ms per run.
After the patch:

GC.stat[:remembered_shady_object]
=> 10506

The patch is passing make test-all with RGENGC_CHECK=2

Also available in: Atom PDF