mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
Ensure that djbench and gcbench compile on freebsd:
Link fmtdy with gcbench. RESERVE_ALLOC in djbench ignores the return values from mps_reserve and mps_commit. Don't include alloca.h -- alloca is in stdlib.h. Rename start, finish to begin, end to avoid "local variable shadows global" error from gcc. Copied from Perforce Change: 184691 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
d2b6956f6a
commit
cf4d9b0596
3 changed files with 7 additions and 8 deletions
|
|
@ -401,7 +401,7 @@ $(PFM)/$(VARIETY)/fotest: $(PFM)/$(VARIETY)/fotest.o \
|
|||
$(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
|
||||
|
||||
$(PFM)/$(VARIETY)/gcbench: $(PFM)/$(VARIETY)/gcbench.o \
|
||||
$(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
|
||||
$(FMTDYTSTOBJ) $(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
|
||||
|
||||
$(PFM)/$(VARIETY)/locbwcss: $(PFM)/$(VARIETY)/locbwcss.o \
|
||||
$(TESTLIBOBJ) $(PFM)/$(VARIETY)/mps.a
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ DJRUN(dj_alloc, MPS_ALLOC, MPS_FREE)
|
|||
#define RESERVE_ALLOC(p, s) \
|
||||
do { \
|
||||
size_t _s = ALIGN_UP(s, (size_t)MPS_PF_ALIGN); \
|
||||
mps_reserve(&p, ap, _s); \
|
||||
mps_commit(ap, p, _s); \
|
||||
(void)mps_reserve(&p, ap, _s); \
|
||||
(void)mps_commit(ap, p, _s); \
|
||||
} while(0)
|
||||
#define RESERVE_FREE(p, s) do { mps_free(pool, p, s); } while(0)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <alloca.h>
|
||||
#include <pthread.h>
|
||||
#include "getopt.h"
|
||||
#include "testlib.h"
|
||||
|
|
@ -219,16 +218,16 @@ static void weave1(gcthread_fn_t fn)
|
|||
|
||||
static void watch(gcthread_fn_t fn, const char *name)
|
||||
{
|
||||
clock_t start, finish;
|
||||
clock_t begin, end;
|
||||
|
||||
start = clock();
|
||||
begin = clock();
|
||||
if (nthreads == 1)
|
||||
weave1(fn);
|
||||
else
|
||||
weave(fn);
|
||||
finish = clock();
|
||||
end = clock();
|
||||
|
||||
printf("%s: %g\n", name, (double)(finish - start) / CLOCKS_PER_SEC);
|
||||
printf("%s: %g\n", name, (double)(end - begin) / CLOCKS_PER_SEC);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue