Oilpan: support eager tracing of objects when marking.

This adds support for eager tracing of objects when marking. That is,
instead of pushing an unmarked object's trace callback onto a marker
stack for later processing, the trace callback is invoked there & then.
This may enable inlining of eager trace() methods at their call sites,
leading to potentially faster marking overall.

Eager tracing runs counter to the common approach of GC marking passes,
where an explicit mark stack is used. The marking phase pushes the
trace callbacks of unmarked objects onto this explicit stack, performing
instead an iterative deepening traversal of the object graph. This
ensures bounded system stack use, and any overflow of the marker stack
can be explicitly handled. The use of eager tracing must be carefully
considered with respect to the system stack use that it will bring:
uncontrollably deep object structures should not be eagerly traced as
that will risk overflowing the system stack at little or no gain. The
GC does not have a recovery or trapping mechanism against such overflows.

To eagerly call trace() over GCed objects at class type T, you declare
a specialization of the boolean-valued TraceEagerlyTrait<T> trait.

The default is currently not to perform any eager tracing.

R=kouhei,haraken
BUG=420515

Review URL: https://codereview.chromium.org/765673004

git-svn-id: svn://svn.chromium.org/blink/trunk@186355 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed
tree: 7b7cc19410c342716421c4a337482c9d70bc8c82
  1. third_party/