1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-06 14:22:31 -07:00

Merge mmdevel_event_string

Copied from Perforce
 Change: 18465
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gavin Matthews 1997-07-17 19:40:45 +01:00
parent 832f52ccfa
commit bac6b39c9f
10 changed files with 287 additions and 195 deletions

View file

@ -1,6 +1,6 @@
/* impl.c.arenavm: VIRTUAL MEMORY BASED ARENA IMPLEMENTATION
*
* $HopeName: MMsrc!arenavm.c(trunk.23) $
* $HopeName: MMsrc!arenavm.c(trunk.24) $
* Copyright (C) 1997 The Harlequin Group Limited. All rights reserved.
*
* This is the implementation of the Segment abstraction from the VM
@ -37,7 +37,7 @@
#include "mpm.h"
SRCID(arenavm, "$HopeName: MMsrc!arenavm.c(trunk.23) $");
SRCID(arenavm, "$HopeName: MMsrc!arenavm.c(trunk.24) $");
/* Space Arena Projection
@ -540,7 +540,7 @@ Res SegAlloc(Seg *segReturn, SegPref pref, Space space, Size size, Pool pool)
AVERT(Seg, seg);
EVENT_PPAUP(SegAlloc, arena, seg, addr, size, pool);
EVENT_PPAWP(SegAlloc, arena, seg, addr, size, pool);
*segReturn = seg;
return ResOK;

View file

@ -1,6 +1,6 @@
/* impl.c.bt: BIT TABLES
*
* $HopeName: MMsrc!bt.c(trunk.6) $
* $HopeName: MMsrc!bt.c(trunk.7) $
* Copyright (C) 1997 Harlequin Group, all rights reserved
*
* READERSHIP
@ -19,7 +19,7 @@
#include "mpm.h"
SRCID(bt, "$HopeName: MMsrc!bt.c(trunk.6) $");
SRCID(bt, "$HopeName: MMsrc!bt.c(trunk.7) $");
/* BTCheck -- check the validity of a bit table
@ -37,12 +37,12 @@ static Bool BTCheck(BT bt)
/* design.mps.bt.fun.size */
Size BTSize(unsigned long n)
Size (BTSize)(unsigned long n)
{
/* check that the expression used in rounding up doesn't overflow */
AVER(n+MPS_WORD_WIDTH-1 > n);
return (n+MPS_WORD_WIDTH-1)/MPS_WORD_WIDTH*sizeof(Word);
return BTSize(n);
}

View file

@ -1,6 +1,6 @@
/* impl.c.event: EVENT LOGGING
*
* $HopeName: MMsrc!event.c(trunk.2) $
* $HopeName: MMsrc!event.c(trunk.3) $
* Copyright (C) 1997 Harlequin Group, all rights reserved.
*
* .readership: MPS developers.
@ -26,7 +26,7 @@
#include "event.h"
#include "mpsio.h"
SRCID(event, "$HopeName: MMsrc!event.c(trunk.2) $");
SRCID(event, "$HopeName: MMsrc!event.c(trunk.3) $");
#ifdef EVENT /* .trans.ifdef */
@ -34,9 +34,11 @@ static Bool eventInited = FALSE;
static mps_io_t eventIO;
static char eventBuffer[EVENT_BUFFER_SIZE];
static Count eventUserCount;
static Word EventKindControlBuffer[BTSize(EventKindNumber)];
EventUnion Event; /* Used by macros in impl.h.event */
char *EventNext, *EventLimit; /* Used by macros in impl.h.event */
BT EventKindControl; /* Used to control output. */
Res EventFlush(void)
{
@ -68,6 +70,8 @@ Res (EventInit)(void)
EventLimit = &eventBuffer[EVENT_BUFFER_SIZE];
eventUserCount = 0;
eventInited = TRUE;
EventKindControl = (BT)EventKindControlBuffer;
BTSetRange(EventKindControl, 0, EventKindNumber);
}
++eventUserCount;

View file

@ -1,7 +1,7 @@
/* impl.h.event -- Event Logging Interface
*
* Copyright (C) 1997 Harlequin Group, all rights reserved.
* $HopeName: MMsrc!event.h(trunk.2) $
* $HopeName: MMsrc!event.h(trunk.3) $
*
* .readership: MPS developers.
* .sources: mps.design.event
@ -11,47 +11,90 @@
#define event_h
#include "mpm.h"
#include "eventcom.h"
#include "eventgen.h"
extern Res EventFlush(void);
extern Res EventInit(void);
extern void EventFinish(void);
#include "eventgen.h"
typedef Index EventKind;
/* Event Kinds --- see design.mps.telemetry
*
* All events are classified as being of one event type.
* They are small enough to be able to be used as shifts within a word.
*/
#define EventKindArena ((EventType)0) /* Per space or arena */
#define EventKindPool ((EventType)1) /* Per pool */
#define EventKindTrace ((EventType)2) /* Per trace or scan */
#define EventKindSeg ((EventType)3) /* Per seg */
#define EventKindRef ((EventType)4) /* Per ref or fix */
#define EventKindObject ((EventType)5) /* Per alloc or object */
#define EventKindNumber ((Count)6) /* Number of event kinds */
#ifdef EVENT
/* Note that enum values can be up to fifteen bits long portably. */
#define RELATION(type, code, always, kind, format) \
enum { \
Event ## type ## High = ((code >> 8) & 0xFF), \
Event ## type ## Low = (code & 0xFF), \
Event ## type ## Always = always,\
Event ## type ## Kind = EventKind ## kind, \
Event ## type ## Format = EventFormat ## format \
};
#include "eventdef.h"
#undef RELATION
/* @@@@ We can't use memcpy, because it's a dependence on the ANSI C
* library, despite the fact that many compilers will inline it.
* Also, because we're always dealing with aligned words, we could
* copy more efficiently.
*/
#define _memcpy(to, from, length) \
BEGIN \
Index _i; \
char *_to = (char *)(to); \
char *_from = (char *)(from); \
Count _length2 = (length); \
for(_i = 0; _i < _length2; _i++) \
_to[_i] = _from[_i]; \
END
extern EventUnion Event;
#define EVENT_BEGIN(type, _length) \
#define EVENT_BEGIN(type, format, _length) \
BEGIN \
unsigned _i; \
AVER(EventFormat ## format == Event ## type ## Format); \
/* @@@@ As an interim measure, send the old event codes */ \
Event.any.code = Event ## type; \
/* @@@ Length is in words, excluding header; this will change */ \
/* @@@@ Length is in words, excluding header; this will change */ \
/* We know that _length is aligned to word size */ \
Event.any.length = ((_length / sizeof(Word)) - 3); \
Event.any.clock = mps_clock();
/* @@@@ We'd like to be able to use memcpy here, for performance.
* We can't use structure copy because EventNext isn't guaranteed
* to be aligned; we can't force it to be aligned without both
* changing the log format and bloating its size.
*/
#define EVENT_END(type, length) \
if(length > EventLimit - EventNext) \
EventFlush(); /* @@@ should pass length */ \
AVER((length) <= EventLimit - EventNext); \
/* memcpy(EventNext, (char *)&Event, length); */ \
for(_i = 0; _i < length; _i++) \
EventNext[_i] = ((char *)&Event)[_i]; \
EventNext += length; \
if(BTGet(EventKindControl, ((Index)Event ## type ## Kind))) { \
if((length) > EventLimit - EventNext) \
EventFlush(); /* @@@ should pass length */ \
AVER((length) <= EventLimit - EventNext); \
_memcpy(EventNext, &Event, (length)); \
EventNext += (length); \
} \
END
extern char *EventNext, *EventLimit;
#define EVENT_0(type) \
EVENT_BEGIN(type, sizeof(EventStruct)) \
EVENT_END(type, sizeof(EventStruct))
extern BT EventKindControl;
#else /* EVENT not */

View file

@ -1,7 +1,7 @@
/* impl.h.eventgen -- Automatic event header
*
* Copyright (C) 1997 Harlequin Group, all rights reserved.
* $HopeName: MMsrc!eventgen.h(MMdevel_event_format.1) $
* $HopeName: MMsrc!eventgen.h(trunk.2) $
*
* !!! DO NOT EDIT THIS FILE !!!
* This file was generated by eventgen.pl
@ -19,59 +19,59 @@ typedef struct {
Word code;
Word length;
Word clock;
Addr a0;
struct AddrStruct * a0;
} EventAStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void * p0;
} EventPStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
Addr a1;
Addr a2;
void * p0;
struct AddrStruct * a1;
struct AddrStruct * a2;
} EventPAAStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
Addr a1;
unsigned u2;
} EventPAUStruct;
void * p0;
struct AddrStruct * a1;
Word w2;
} EventPAWStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
void * p0;
void * p1;
} EventPPStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
Addr a2;
Addr a3;
void * p0;
void * p1;
struct AddrStruct * a2;
struct AddrStruct * a3;
} EventPPAAStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
Addr a2;
void * p0;
void * p1;
struct AddrStruct * a2;
unsigned u3;
} EventPPAUStruct;
@ -79,39 +79,39 @@ typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
Addr a2;
unsigned u3;
void *p4;
} EventPPAUPStruct;
void * p0;
void * p1;
struct AddrStruct * a2;
Word w3;
void * p4;
} EventPPAWPStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
void *p2;
void * p0;
void * p1;
void * p2;
} EventPPPStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
void *p2;
void *p3;
void * p0;
void * p1;
void * p2;
void * p3;
} EventPPPPStruct;
typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
void *p2;
void * p0;
void * p1;
void * p2;
unsigned u3;
} EventPPPUStruct;
@ -119,8 +119,8 @@ typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
void * p0;
void * p1;
unsigned u2;
} EventPPUStruct;
@ -128,12 +128,21 @@ typedef struct {
Word code;
Word length;
Word clock;
void *p0;
void *p1;
unsigned u2;
Addr a3;
unsigned u4;
} EventPPUAUStruct;
void * p0;
void * p1;
Word w2;
} EventPPWStruct;
typedef struct {
Word code;
Word length;
Word clock;
void * p0;
void * p1;
Word w2;
struct AddrStruct * a3;
Word w4;
} EventPPWAWStruct;
typedef struct {
Word code;
@ -141,9 +150,9 @@ typedef struct {
Word clock;
unsigned u0;
unsigned u1;
void *p2;
void *p3;
void *p4;
void * p2;
void * p3;
void * p4;
} EventUUPPPStruct;
@ -152,127 +161,196 @@ typedef union {
EventAStruct a;
EventPStruct p;
EventPAAStruct paa;
EventPAUStruct pau;
EventPAWStruct paw;
EventPPStruct pp;
EventPPAAStruct ppaa;
EventPPAUStruct ppau;
EventPPAUPStruct ppaup;
EventPPAWPStruct ppawp;
EventPPPStruct ppp;
EventPPPPStruct pppp;
EventPPPUStruct pppu;
EventPPUStruct ppu;
EventPPUAUStruct ppuau;
EventPPWStruct ppw;
EventPPWAWStruct ppwaw;
EventUUPPPStruct uuppp;
} EventUnion;
#define EVENT_0(type) \
EVENT_BEGIN(type, sizeof(EventStruct)) \
EVENT_BEGIN(type, 0, sizeof(EventStruct)) \
EVENT_END(type, sizeof(EventStruct))
#define EVENT_A(type, _a0) \
EVENT_BEGIN(type, sizeof(EventAStruct)) \
BEGIN \
size_t _length = sizeof(EventAStruct); \
EVENT_BEGIN(type, A, _length); \
Event.a.a0 = (_a0); \
EVENT_END(type, sizeof(EventAStruct))
EVENT_END(type, _length); \
END
#define EVENT_P(type, _p0) \
EVENT_BEGIN(type, sizeof(EventPStruct)) \
BEGIN \
size_t _length = sizeof(EventPStruct); \
EVENT_BEGIN(type, P, _length); \
Event.p.p0 = (_p0); \
EVENT_END(type, sizeof(EventPStruct))
EVENT_END(type, _length); \
END
#define EVENT_PAA(type, _p0, _a1, _a2) \
EVENT_BEGIN(type, sizeof(EventPAAStruct)) \
BEGIN \
size_t _length = sizeof(EventPAAStruct); \
EVENT_BEGIN(type, PAA, _length); \
Event.paa.p0 = (_p0); \
Event.paa.a1 = (_a1); \
Event.paa.a2 = (_a2); \
EVENT_END(type, sizeof(EventPAAStruct))
EVENT_END(type, _length); \
END
#define EVENT_PAU(type, _p0, _a1, _u2) \
EVENT_BEGIN(type, sizeof(EventPAUStruct)) \
Event.pau.p0 = (_p0); \
Event.pau.a1 = (_a1); \
Event.pau.u2 = (_u2); \
EVENT_END(type, sizeof(EventPAUStruct))
#define EVENT_PAW(type, _p0, _a1, _w2) \
BEGIN \
size_t _length = sizeof(EventPAWStruct); \
EVENT_BEGIN(type, PAW, _length); \
Event.paw.p0 = (_p0); \
Event.paw.a1 = (_a1); \
Event.paw.w2 = (_w2); \
EVENT_END(type, _length); \
END
#define EVENT_PP(type, _p0, _p1) \
EVENT_BEGIN(type, sizeof(EventPPStruct)) \
BEGIN \
size_t _length = sizeof(EventPPStruct); \
EVENT_BEGIN(type, PP, _length); \
Event.pp.p0 = (_p0); \
Event.pp.p1 = (_p1); \
EVENT_END(type, sizeof(EventPPStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPAA(type, _p0, _p1, _a2, _a3) \
EVENT_BEGIN(type, sizeof(EventPPAAStruct)) \
BEGIN \
size_t _length = sizeof(EventPPAAStruct); \
EVENT_BEGIN(type, PPAA, _length); \
Event.ppaa.p0 = (_p0); \
Event.ppaa.p1 = (_p1); \
Event.ppaa.a2 = (_a2); \
Event.ppaa.a3 = (_a3); \
EVENT_END(type, sizeof(EventPPAAStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPAU(type, _p0, _p1, _a2, _u3) \
EVENT_BEGIN(type, sizeof(EventPPAUStruct)) \
BEGIN \
size_t _length = sizeof(EventPPAUStruct); \
EVENT_BEGIN(type, PPAU, _length); \
Event.ppau.p0 = (_p0); \
Event.ppau.p1 = (_p1); \
Event.ppau.a2 = (_a2); \
Event.ppau.u3 = (_u3); \
EVENT_END(type, sizeof(EventPPAUStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPAUP(type, _p0, _p1, _a2, _u3, _p4) \
EVENT_BEGIN(type, sizeof(EventPPAUPStruct)) \
Event.ppaup.p0 = (_p0); \
Event.ppaup.p1 = (_p1); \
Event.ppaup.a2 = (_a2); \
Event.ppaup.u3 = (_u3); \
Event.ppaup.p4 = (_p4); \
EVENT_END(type, sizeof(EventPPAUPStruct))
#define EVENT_PPAWP(type, _p0, _p1, _a2, _w3, _p4) \
BEGIN \
size_t _length = sizeof(EventPPAWPStruct); \
EVENT_BEGIN(type, PPAWP, _length); \
Event.ppawp.p0 = (_p0); \
Event.ppawp.p1 = (_p1); \
Event.ppawp.a2 = (_a2); \
Event.ppawp.w3 = (_w3); \
Event.ppawp.p4 = (_p4); \
EVENT_END(type, _length); \
END
#define EVENT_PPP(type, _p0, _p1, _p2) \
EVENT_BEGIN(type, sizeof(EventPPPStruct)) \
BEGIN \
size_t _length = sizeof(EventPPPStruct); \
EVENT_BEGIN(type, PPP, _length); \
Event.ppp.p0 = (_p0); \
Event.ppp.p1 = (_p1); \
Event.ppp.p2 = (_p2); \
EVENT_END(type, sizeof(EventPPPStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPPP(type, _p0, _p1, _p2, _p3) \
EVENT_BEGIN(type, sizeof(EventPPPPStruct)) \
BEGIN \
size_t _length = sizeof(EventPPPPStruct); \
EVENT_BEGIN(type, PPPP, _length); \
Event.pppp.p0 = (_p0); \
Event.pppp.p1 = (_p1); \
Event.pppp.p2 = (_p2); \
Event.pppp.p3 = (_p3); \
EVENT_END(type, sizeof(EventPPPPStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPPU(type, _p0, _p1, _p2, _u3) \
EVENT_BEGIN(type, sizeof(EventPPPUStruct)) \
BEGIN \
size_t _length = sizeof(EventPPPUStruct); \
EVENT_BEGIN(type, PPPU, _length); \
Event.pppu.p0 = (_p0); \
Event.pppu.p1 = (_p1); \
Event.pppu.p2 = (_p2); \
Event.pppu.u3 = (_u3); \
EVENT_END(type, sizeof(EventPPPUStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPU(type, _p0, _p1, _u2) \
EVENT_BEGIN(type, sizeof(EventPPUStruct)) \
BEGIN \
size_t _length = sizeof(EventPPUStruct); \
EVENT_BEGIN(type, PPU, _length); \
Event.ppu.p0 = (_p0); \
Event.ppu.p1 = (_p1); \
Event.ppu.u2 = (_u2); \
EVENT_END(type, sizeof(EventPPUStruct))
EVENT_END(type, _length); \
END
#define EVENT_PPUAU(type, _p0, _p1, _u2, _a3, _u4) \
EVENT_BEGIN(type, sizeof(EventPPUAUStruct)) \
Event.ppuau.p0 = (_p0); \
Event.ppuau.p1 = (_p1); \
Event.ppuau.u2 = (_u2); \
Event.ppuau.a3 = (_a3); \
Event.ppuau.u4 = (_u4); \
EVENT_END(type, sizeof(EventPPUAUStruct))
#define EVENT_PPW(type, _p0, _p1, _w2) \
BEGIN \
size_t _length = sizeof(EventPPWStruct); \
EVENT_BEGIN(type, PPW, _length); \
Event.ppw.p0 = (_p0); \
Event.ppw.p1 = (_p1); \
Event.ppw.w2 = (_w2); \
EVENT_END(type, _length); \
END
#define EVENT_PPWAW(type, _p0, _p1, _w2, _a3, _w4) \
BEGIN \
size_t _length = sizeof(EventPPWAWStruct); \
EVENT_BEGIN(type, PPWAW, _length); \
Event.ppwaw.p0 = (_p0); \
Event.ppwaw.p1 = (_p1); \
Event.ppwaw.w2 = (_w2); \
Event.ppwaw.a3 = (_a3); \
Event.ppwaw.w4 = (_w4); \
EVENT_END(type, _length); \
END
#define EVENT_UUPPP(type, _u0, _u1, _p2, _p3, _p4) \
EVENT_BEGIN(type, sizeof(EventUUPPPStruct)) \
BEGIN \
size_t _length = sizeof(EventUUPPPStruct); \
EVENT_BEGIN(type, UUPPP, _length); \
Event.uuppp.u0 = (_u0); \
Event.uuppp.u1 = (_u1); \
Event.uuppp.p2 = (_p2); \
Event.uuppp.p3 = (_p3); \
Event.uuppp.p4 = (_p4); \
EVENT_END(type, sizeof(EventUUPPPStruct))
EVENT_END(type, _length); \
END
#define EventFormat0 0
#define EventFormatA 1
#define EventFormatP 2
#define EventFormatPAA 3
#define EventFormatPAW 4
#define EventFormatPP 5
#define EventFormatPPAA 6
#define EventFormatPPAU 7
#define EventFormatPPAWP 8
#define EventFormatPPP 9
#define EventFormatPPPP 10
#define EventFormatPPPU 11
#define EventFormatPPU 12
#define EventFormatPPW 13
#define EventFormatPPWAW 14
#define EventFormatUUPPP 15
#else /* EVENT not */
@ -280,16 +358,17 @@ typedef union {
#define EVENT_A(type, p0) NOOP
#define EVENT_P(type, p0) NOOP
#define EVENT_PAA(type, p0, p1, p2) NOOP
#define EVENT_PAU(type, p0, p1, p2) NOOP
#define EVENT_PAW(type, p0, p1, p2) NOOP
#define EVENT_PP(type, p0, p1) NOOP
#define EVENT_PPAA(type, p0, p1, p2, p3) NOOP
#define EVENT_PPAU(type, p0, p1, p2, p3) NOOP
#define EVENT_PPAUP(type, p0, p1, p2, p3, p4) NOOP
#define EVENT_PPAWP(type, p0, p1, p2, p3, p4) NOOP
#define EVENT_PPP(type, p0, p1, p2) NOOP
#define EVENT_PPPP(type, p0, p1, p2, p3) NOOP
#define EVENT_PPPU(type, p0, p1, p2, p3) NOOP
#define EVENT_PPU(type, p0, p1, p2) NOOP
#define EVENT_PPUAU(type, p0, p1, p2, p3, p4) NOOP
#define EVENT_PPW(type, p0, p1, p2) NOOP
#define EVENT_PPWAW(type, p0, p1, p2, p3, p4) NOOP
#define EVENT_UUPPP(type, p0, p1, p2, p3, p4) NOOP
#endif /* EVENT */

View file

@ -1,6 +1,6 @@
/* impl.c.mpm: GENERAL MPM SUPPORT
*
* $HopeName: MMsrc!mpm.c(trunk.14) $
* $HopeName: MMsrc!mpm.c(trunk.15) $
* Copyright (C) 1996 Harlequin Group, all rights reserved.
*
* .readership: MM developers.
@ -13,7 +13,7 @@
#include "mpm.h"
SRCID(mpm, "$HopeName: MMsrc!mpm.c(trunk.14) $");
SRCID(mpm, "$HopeName: MMsrc!mpm.c(trunk.15) $");
/* MPMCheck -- test MPM assumptions */
@ -407,3 +407,17 @@ Res WriteF(mps_lib_FILE *stream, ...)
return ResOK;
}
/* StringLength -- Substitute for strlen
*/
size_t StringLength(char *s) {
size_t i;
AVER(s != NULL);
for(i = 0; s[i] != '\0'; i++)
NOOP;
return(i);
}

View file

@ -1,6 +1,6 @@
/* impl.h.mpm: MEMORY POOL MANAGER DEFINITIONS
*
* $HopeName: MMsrc!mpm.h(trunk.35) $
* $HopeName: MMsrc!mpm.h(trunk.36) $
* Copyright (C) 1997 The Harlequin Group Limited. All rights reserved.
*/
@ -117,6 +117,11 @@ extern Shift SizeFloorLog2(Size size);
extern Res WriteF(mps_lib_FILE *stream, ...);
/* Miscellaneous support -- see impl.c.mpm */
extern size_t StringLength(char *s);
/* Ring Interface -- see design.mps.ring, impl.c.ring */
extern Bool RingCheck(Ring ring);
@ -201,7 +206,9 @@ extern Ring (RingNext)(Ring ring);
/* Bit Table Interface -- see design.mps.bt.if.* for the interface doc */
/* design.mps.bt.if.size */
extern Size BTSize(unsigned long length);
extern Size (BTSize)(unsigned long length);
#define BTSize(n) (((n)+MPS_WORD_WIDTH-1)/MPS_WORD_WIDTH*sizeof(Word))
/* design.mps.bt.if.get */
extern int (BTGet)(BT bt, Index index);

View file

@ -1,6 +1,6 @@
/* impl.h.mpmtypes: MEMORY POOL MANAGER TYPES
*
* $HopeName: MMsrc!mpmtypes.h(trunk.25) $
* $HopeName: MMsrc!mpmtypes.h(trunk.26) $
* Copyright (C) 1997 The Harlequin Group Limited. All rights reserved.
*
* .readership: MM developers.
@ -70,7 +70,6 @@ typedef struct ArenaStruct *Arena; /* impl.c.arena* */
typedef struct VMStruct *VM; /* impl.c.vm* */
typedef struct RootStruct *Root; /* impl.c.root */
typedef struct ThreadStruct *Thread; /* impl.c.th* */
typedef Word EventType; /* impl.c.event */
typedef struct ActionStruct *Action; /* design.mps.action */
@ -238,60 +237,4 @@ typedef unsigned long WriteFB;
typedef void *(*WriteFF)(void);
typedef int WriteFC; /* Promoted */
/* Event Codes -- see design.mps.telemetry
*
* These names are intended to be mnemonic. They are derived from
* selected letters as indicated, using the transliteration in
* guide.hex.trans.
*/
/* EVent ... */
#define EventEventTime ((EventType)0xEF213E99) /* TIME */
#define EventSpaceCreate ((EventType)0xEF5BCC6E) /* SPaCe CREate */
#define EventSpaceDestroy ((EventType)0xEF5BCDE5) /* SPaCe DEStroy */
#define EventPoolInit ((EventType)0xEFB07141) /* POoL INIt */
#define EventPoolFinish ((EventType)0xEFB07F14) /* POoL FINish */
#define EventPoolAlloc ((EventType)0xEFB07A77) /* POoL ALLoc */
#define EventPoolFree ((EventType)0xEFB07F6E) /* POoL FREe */
#define EventArenaCreate ((EventType)0xEFA64C6E) /* AReNa CREate */
#define EventArenaDestroy ((EventType)0xEFA64DE5) /* AReNa DEStroy */
#define EventSegAlloc ((EventType)0xEF5E9A77) /* SEG ALLoc */
#define EventSegFree ((EventType)0xEF5E9F6E) /* SEG FREe */
#define EventAMCGenCreate ((EventType)0xEFA3C94C) /* AMC GeN Create */
#define EventAMCGenDestroy ((EventType)0xEFA3C94D) /* AMC GeN Destroy */
#define EventAMCInit ((EventType)0xEFA3C141) /* AMC INIt */
#define EventAMCFinish ((EventType)0xEFA3CF14) /* AMC FINish */
#define EventAMCBufferInit ((EventType)0xEFA3CBF1) /* AMC BuFfer Init */
#define EventAMCBufferFill ((EventType)0xEFA3CBFF) /* AMC BuFfer Fill */
#define EventAMCBufferEmpty ((EventType)0xEFA3CBFE) /* AMC BuFfer Empty */
#define EventAMCTraceBegin ((EventType)0xEFA3C26B) /* AMC TRace Begin */
#define EventAMCCondemn ((EventType)0xEFA3CC04) /* AMC CONdemn */
#define EventAMCScanBegin ((EventType)0xEFA3C5CB) /* AMC SCan Begin */
#define EventAMCScanEnd ((EventType)0xEFA3C5CE) /* AMC SCan End */
#define EventAMCFix ((EventType)0xEFA3CF18) /* AMC FIX */
#define EventAMCFixAmbig ((EventType)0xEFA3CF8A) /* AMC FiX Ambig */
#define EventAMCFixForward ((EventType)0xEFA3CF8F) /* AMC FiX Forward */
#define EventAMCReclaim ((EventType)0xEFA3C6EC) /* AMC REClaim */
#define EventAMCTraceEnd ((EventType)0xEFA3C26E) /* AMC TRace End */
#define EventTraceStart ((EventType)0xEF26AC52) /* TRACe STart */
#define EventTraceCreate ((EventType)0xEF26ACC6) /* TRACe CReate */
#define EventTraceDestroy ((EventType)0xEF26ACDE) /* TRACe DEstroy */
#define EventTraceSegGreyen ((EventType)0xEF26A599) /* TRAce SeG Greyen */
#define EventTraceFlipBegin ((EventType)0xEF26AF7B) /* TRAce FLip Begin */
#define EventTraceFlipEnd ((EventType)0xEF26AF7E) /* TRAce FLip End */
#define EventTraceReclaim ((EventType)0xEF26A6EC) /* TRAce REClaim */
#define EventTraceScan ((EventType)0xEF26AC5C) /* TRACe SCan */
#define EventTraceAccess ((EventType)0xEF26AACC) /* TRAce ACCess */
#define EventTracePoll ((EventType)0xEF26AB01) /* TRAce POLl */
#define EventTraceFix ((EventType)0xEF26AF18) /* TRAce FIX */
#define EventTraceFixSeg ((EventType)0xEF26AF85) /* TRAce FiX Seg */
#define EventTraceFixWhite ((EventType)0xEF26AF83) /* TRAce FiX White */
#define EventTraceScanArea ((EventType)0xEF26A5CA) /* TRAce SCan Area */
#define EventTraceScanAreaTagged ((EventType)0xEF26A5C2) /* TRAce SCan area Tagged */
#define EventVMCreate ((EventType)0xEFF3C6EA) /* VM CREAte */
#define EventVMDestroy ((EventType)0xEFF3DE52) /* VM DESTroy */
#define EventVMMap ((EventType)0xEFF33AB9) /* VM MAP */
#define EventVMUnmap ((EventType)0xEFF3043B) /* VM UNMaP */
#endif /* mpmtypes_h */

View file

@ -1,6 +1,6 @@
/* ==== SUNOS ANSI COMPATABILITY HEADER ====
*
* $HopeName: MMsrc!ossu.h(trunk.5) $
* $HopeName: MMsrc!ossu.h(trunk.6) $
*
* Copyright (C) 1994,1995,1997 Harlequin Group, all rights reserved
*
@ -73,6 +73,8 @@ extern clock_t clock(void);
/* stdlib.h things */
extern int system(const char *string);
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
/* string.h things */

View file

@ -1,6 +1,6 @@
/* impl.c.pool: POOL IMPLEMENTATION
*
* $HopeName: MMsrc!pool.c(trunk.31) $
* $HopeName: MMsrc!pool.c(trunk.32) $
* Copyright (C) 1997 The Harlequin Group Limited. All rights reserved.
*
* This is the implementation of the generic pool interface. The
@ -12,7 +12,7 @@
#include "mpm.h"
SRCID(pool, "$HopeName: MMsrc!pool.c(trunk.31) $");
SRCID(pool, "$HopeName: MMsrc!pool.c(trunk.32) $");
Bool PoolClassCheck(PoolClass class)
@ -233,7 +233,7 @@ Res PoolAlloc(Addr *pReturn, Pool pool, Size size)
/* Make sure that the allocated address was in the pool's memory. */
AVER(PoolHasAddr(pool, *pReturn));
EVENT_PAU(PoolAlloc, pool, *pReturn, size);
EVENT_PAW(PoolAlloc, pool, *pReturn, size);
return ResOK;
}
@ -247,7 +247,7 @@ void PoolFree(Pool pool, Addr old, Size size)
AVER(size > 0);
(*pool->class->free)(pool, old, size);
EVENT_PAU(PoolFree, pool, old, size);
EVENT_PAW(PoolFree, pool, old, size);
}
Res PoolTraceBegin(Pool pool, Trace trace, Action action)