diff --git a/mps/code/mpmst.h b/mps/code/mpmst.h index b1367b0f92d..ac2bf47b602 100644 --- a/mps/code/mpmst.h +++ b/mps/code/mpmst.h @@ -201,19 +201,13 @@ typedef struct MessageClassStruct { /* methods specific to MessageTypeGC */ MessageGCLiveSizeMethod gcLiveSize; - /* methods specific to MessageTypeGC and MessageTypeGCGen */ + /* methods specific to MessageTypeGC */ MessageGCCondemnedSizeMethod gcCondemnedSize; MessageGCNotCondemnedSizeMethod gcNotCondemnedSize; /* methods specific to MessageTypeGCStart */ MessageGCStartWhyMethod gcStartWhy; - /* methods specific to MessageTypeGCGen */ -#if 0 /* @@@@ */ - MessageGCGenNameMethod gcGenName; - MessageGCGenForwardMethod gcGenForward; -#endif - Sig endSig; /* */ } MessageClassStruct; diff --git a/mps/design/message-gc/index.html b/mps/design/message-gc/index.html index 718db6b6e3a..a56db67e0c0 100644 --- a/mps/design/message-gc/index.html +++ b/mps/design/message-gc/index.html @@ -56,13 +56,6 @@ collectively they are called GC Messages.

These messages are generated once per GC at the end of a GC.

-
mps_message_type_gc_generation()
- -

(new in gcgenmsg branch) These messages are generated once - per generation per GC. A single such message explains how a generation - intends to participate in the collection. They are useful to experts - and interesting to other parties.

-

The intended readership is project staff.

@@ -85,7 +78,8 @@ here.

-

We intend to meet that requirement by implementing a message -that is generated per generation per collection -(mps_message_type_gc_generation) and a message that is generated per +

We meet part of that requirement by implementing + a message that is generated per collection (mps_message_type_gc_start).

-

We have the +

We have the following requirements on per GC messages:

+ + + +

Unimplemented mps_message_type_gc_generation

+ +

This section for historical interest only.

+ +

A proposal to meet the full requirement by implementing a message +that is generated per generation per collection +(mps_message_type_gc_generation) +has not been implemented, +but the requirements have been retained here:

+ +

We would have the following requirements on per generation messages:

-

We have the following requirements on per GC messages:

- -

4. Implementation

-

4.1. A new per generation -message class (mps_message_type_gc_generation).

- -

Message in this class will support:

- - - -

Condemned size / not condemned size correspond to accessors for -MPS_MESSAGE_TYPE_GC as well. We could have some sort of collectable -class that has both the existing "gc" and the new "gc generation" type -as sublcasses, but I don't think I'll bother for now.

- -

4.1.1. Message instances.

- -

A message instance will be associated with a generation structure. -Specifically the PoolGenStruct; there is one of these per generation -in a pool that uses Chains for collection policy management. The -message struct will be a member of PoolGenStruct to simplify memory -management as per the general message design. -

- -

Choice: could put all the actual info in the PoolGenStruct and have -a generic message member (this is simplest if only PoolGenStruct wants -to implement the message) or could create a new gcgen message struct and -embed that in PoolGenStruct (which allows other parts of the MPS to -implement the message).

- -

For now we will put the info (condemned size, etc) in the -PoolGenStruct and embed a generic message structure. As per the trace -design, there will be a new intermediate struct, private to the PoolGen -module, that contains the info required for the message. -PoolGenMessageStruct.

- -

There will only be one message and set of info per generation. -Generally data will refer to the most recent trace; multiple concurrent -traces are not very well suported by this design.

-

4.2 A new per collection message class (mps_message_type_gc_start)

@@ -223,56 +179,6 @@ the arena queue (at the end of the trace).

-
int mps_message_type_gc_generation()
- -

Public interface. Returns the message type for gc gen - messages.

- -
const char *mps_message_gc_generation_name(mps_arena_t, - mps_message_t)
- -

Public interface. Returns a string pointer that identifies - this generation. The contents of the string shall not be modified by - the client. The string and the pointer are only valid as long as the - message has not been discarded (with - mps_message_discard).

- -

The string should be of the form: "[" pool-class ":" - pool-instance-number "," generation-number "]"

- -
size_t mps_message_gc_generation_condemned_size(mps_arena_t, - mps_message_t)
- -

Public interface. Reports the number of condemned bytes in - this generation for this collection. May be an estimate.

- -
- size_t mps_message_gc_generation_not_condemned_size(mps_arena_t, - mps_message_t)
- -

Public interface. Reports the number of bytes occupied by - objects in this generation that are not condemned for this collection. - May be an estimate.

- -
const char - *mps_mesage_gc_generation_forward(mps_arena_t, - mps_message_t)
- -

Public interface. Returns a string pointer that identifies - where survivors from this generation are being forwarded to. The - contents of the string shall not be modified by the client. The - string and the pointer are only valid as long as the message has not - been discarded (with mps_message_discard).

- -

Generally this string will identify a generation and should be in - a similar form to the id string (returned by - mps_message_gc_generation_id

- -
MPS_MESSAGE_TYPE_GC_GENERATION
- -

Private interface. An enum member that identifies the message - type.

-
int mps_message_type_gc_start()

Public interface. Returns the MPS message type.

@@ -287,26 +193,6 @@ the arena queue (at the end of the trace).

string and the pointer are only valid as long as the message has not been discarded (with mps_message_discard).

-
PoolGen and PoolClass interface
- -

There needs to be an interface between the implementation of the - gc generation messages (which is expected to be PoolGen in locus.c) - and the Pool Classes in order that the information contained in the - message can be gathered.

- -

Pool Classes condemn objects on a - segment-by-segment basis; it seems most natural for PoolGen to keep a - condemned bytes counter and for the Pool Class to update this counter - as it condemns objects. The number of not-condemned bytes can be - estimated by PoolGen as (totalSize - condemned).

- -

PoolGen knows the pool and the serial number so can id the - generation without involving anyone else.

- -

The forwarding generation will have to be filled in by the Pool - Class. Message can hold a fixed size char buffer that the pool class - can fill with textual description.

-

6. Testing

@@ -356,6 +242,16 @@ should be written.

+ + +2006-12-07 + +RHSK + +Remove mps_message_type_gc_generation (not implemented). + + +