mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-24 07:41:54 -07:00
Mps br/diag: start to demonstrate job001658 defect:
Show that after finding one RankFINAL segment, traceFindGrey then goes back to RankEXACT segs before tracing the next RankFINAL segment. Copied from Perforce Change: 162626 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
8d8b674765
commit
798f8b14fc
3 changed files with 36 additions and 4 deletions
|
|
@ -20,9 +20,6 @@
|
|||
* The modifications are to make lots of guardians, such that they
|
||||
* don't all fit on one segment, in order to test for the (suspected)
|
||||
* finalization promptness defect described in job001658.
|
||||
*
|
||||
***** NOTE: It doesn't do that yet! Currently it's just a copy of
|
||||
***** finalcv.c. RHSK 2007-06-21
|
||||
*/
|
||||
|
||||
#include "testlib.h"
|
||||
|
|
@ -39,7 +36,11 @@
|
|||
|
||||
|
||||
#define testArenaSIZE ((size_t)16<<20)
|
||||
#define rootCOUNT 20
|
||||
|
||||
/* usually (ArenaAlign / sizeof(Ref)) = 1024 */
|
||||
/* so choose 2050 to force 3 segments of guardians */
|
||||
#define rootCOUNT 2050
|
||||
|
||||
#define churnFACTOR 10
|
||||
#define finalizationRATE 6
|
||||
#define gcINTERVAL ((size_t)150 * 1024)
|
||||
|
|
|
|||
|
|
@ -634,6 +634,9 @@ static Res MRGInit(Pool pool, va_list args)
|
|||
mrg->sig = MRGSig;
|
||||
|
||||
AVERT(MRG, mrg);
|
||||
DIAG_PRINTF(( "mrg->extendBy = %u, MRGGuardiansPerSeg = %u\n",
|
||||
(unsigned int) mrg->extendBy,
|
||||
(unsigned int) MRGGuardiansPerSeg(mrg) ));
|
||||
EVENT_PPP(PoolInit, pool, PoolArena(pool), ClassOfPool(pool));
|
||||
return ResOK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -993,8 +993,36 @@ static void traceReclaim(Trace trace)
|
|||
* which does not have a higher rank than any other such segment (i.e.,
|
||||
* a next segment to scan). */
|
||||
|
||||
static Bool traceFindGreyORIGINAL(Seg *segReturn, Rank *rankReturn,
|
||||
Arena arena, TraceId ti);
|
||||
/* wrap debugging around original traceFindGrey */
|
||||
static Bool traceFindGrey(Seg *segReturn, Rank *rankReturn,
|
||||
Arena arena, TraceId ti)
|
||||
{
|
||||
Bool found;
|
||||
char this;
|
||||
|
||||
found = traceFindGreyORIGINAL(segReturn, rankReturn, arena, ti);
|
||||
|
||||
this = !found ? '0'
|
||||
: (*rankReturn == RankAMBIG) ? 'A'
|
||||
: (*rankReturn == RankEXACT) ? 'E'
|
||||
: (*rankReturn == RankFINAL) ? 'F'
|
||||
: (*rankReturn == RankWEAK) ? 'W'
|
||||
: '?';
|
||||
|
||||
DIAG_PRINTF(( "%c", this ));
|
||||
if(!found) {
|
||||
/* that's the end of the trace */
|
||||
DIAG_PRINTF(( "\n" ));
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/* original traceFindGrey */
|
||||
static Bool traceFindGreyORIGINAL(Seg *segReturn, Rank *rankReturn,
|
||||
Arena arena, TraceId ti)
|
||||
{
|
||||
Rank rank;
|
||||
Trace trace;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue