PR# 14491 Run_collector should skip creating scavenge zones if called from reclaim

Problem Report Summary
Submitter: prestoat2000
Category: Runtime
Priority: Medium
Date: 2008/06/19
Class: Bug
Severity: Non-critical
Number: 14491
Release: 6.2.73753
Confidential: No
Status: Open
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.8.1.14) Gecko/20080421 Firefox/2.0.0.14 OpenSolaris 2008.05 snv_90 on x86
Synopsis: Run_collector should skip creating scavenge zones if called from reclaim

Description
This isn't really a bug but a possible minor optimization.  While playing with
dtrace, I noticed that there were two calls to `create_scavenge_zones' but only
one call to `explode_scavenge_zones' in a particular system execution.  I then
discovered that during the final call to `reclaim', we explode the scavenge
zones if generation scavenging is on and then call `plsc' which ends up
calling `run_collector'.  This latter routine turns generation scavenging
back on if it is off and recreates the scavenge zones.

As a minor optimization, `reclaim' could set a boolean after the call to
`sc_stop' that indicates to `run_collector' that it should skip both creation
of scavenging zones and also the call to `ufill' to get urgent memory chunks,
since we're just about to exit and won't need either of these.  Probably
can't use `eif_is_in_final_collect' since it is set a little too early for
MT case, so may need a separate boolean.

I wonder if `eif_is_in_final_collect' works as expected for a MT system.
To Reproduce

										
Problem Report Interactions