1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Park the arena before calling mps_chain_destroy.

Speed up mpsicv by reducing number of objects and by only running the test once (there's no inlined mps_tramp any more).

Copied from Perforce
 Change: 186024
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-05-12 12:53:46 +01:00
parent a80d297099
commit 367ae76614
9 changed files with 14 additions and 2 deletions

View file

@ -250,6 +250,7 @@ static void *test(void *arg, size_t s)
(ulongest_t)object_count);
}
mps_arena_park(arena);
mps_ap_destroy(ap);
mps_root_destroy(mps_root);
mps_pool_destroy(amc);

View file

@ -199,6 +199,7 @@ static void *test(void *arg, size_t s)
/* @@@@ <design/poolmrg/#test.promise.ut.nofinal.check> missing */
mps_arena_park(arena);
mps_ap_destroy(ap);
mps_root_destroy(mps_root[1]);
mps_root_destroy(mps_root[0]);

View file

@ -284,6 +284,7 @@ int main(int argc, char *argv[])
test_mode(ModePOLL, arena, chain);
test_mode(ModePARK, arena, NULL);
mps_arena_park(arena);
mps_chain_destroy(chain);
mps_thread_dereg(thread);
mps_arena_destroy(arena);

View file

@ -243,6 +243,7 @@ static void arena_setup(gcthread_fn_t fn,
RESMUST(mps_pool_create_k(&pool, arena, pool_class, args));
} MPS_ARGS_END(args);
watch(fn, name);
mps_arena_park(arena);
mps_pool_destroy(pool);
mps_fmt_destroy(format);
if (ngen > 0)

View file

@ -21,7 +21,7 @@
#define exactRootsCOUNT 49
#define ambigRootsCOUNT 49
#define OBJECTS 200000
#define OBJECTS 100000
#define patternFREQ 100
/* objNULL needs to be odd so that it's ignored in exactRoots. */
@ -552,6 +552,8 @@ static void *test(void *arg, size_t s)
mps_free(mv, alloced_obj, 32);
alloc_v_test(mv);
mps_arena_park(arena);
mps_pool_destroy(mv);
mps_ap_destroy(ap);
mps_root_destroy(fmtRoot);
@ -589,7 +591,6 @@ int main(int argc, char *argv[])
marker, (size_t)0),
"root_create_reg");
(mps_tramp)(&r, test, arena, 0); /* non-inlined trampoline */
mps_tramp(&r, test, arena, 0);
mps_root_destroy(reg_root);
mps_thread_dereg(thread);

View file

@ -478,6 +478,8 @@ static void *test(void *arg, size_t s)
printf(" %"PRIuLONGEST" clock reads; ", (ulongest_t)clock_reads);
print_time("", total_clock_time / clock_reads, " per read;");
print_time(" recently measured as ", clock_time, ").\n");
mps_arena_park(arena);
mps_ap_destroy(ap);
mps_root_destroy(exactRoot);
mps_root_destroy(ambigRoot);

View file

@ -191,11 +191,14 @@ static void *test(mps_arena_t arena, mps_class_t pool_class)
/* Note: stepper finds more than we expect, due to pad objects */
/* printf("stepper found %ld objs\n", sd->count); */
mps_arena_park(arena);
mps_ap_destroy(ap);
mps_root_destroy(exactRoot);
mps_pool_destroy(pool);
mps_chain_destroy(chain);
mps_fmt_destroy(format);
mps_arena_release(arena);
return NULL;
}

View file

@ -774,6 +774,7 @@ static void *testscriptB(void *arg, size_t s)
testscriptC(arena, ap, script);
printf(" Destroy roots, pools, arena etc.\n\n");
mps_arena_park(arena);
mps_root_destroy(root_stackreg);
mps_ap_destroy(ap);
mps_root_destroy(root_table_Exact);

View file

@ -381,6 +381,7 @@ static void *testscriptB(void *arg, size_t s)
testscriptC(arena, script);
mps_arena_park(arena);
mps_ap_destroy(ap);
mps_root_destroy(root_table);
mps_pool_destroy(amc);