org.jikesrvm.mm.mmtk.gcspy
Class ServerSpace

java.lang.Object
  extended by org.mmtk.vm.gcspy.ServerSpace
      extended by org.jikesrvm.mm.mmtk.gcspy.ServerSpace

public class ServerSpace
extends ServerSpace

This class implements the GCspy Space abstraction. Here, it largely to forward calls to the gcspy C library.


Field Summary
 
Fields inherited from class org.mmtk.vm.gcspy.ServerSpace
DEBUG, DEFAULT_UNUSED_STRING, driver, spaceId
 
Constructor Summary
ServerSpace(ServerInterpreter serverInterpreter, String serverName, String driverName, String title, String blockInfo, int tileNum, String unused, boolean mainSpace)
          Create a new GCspy Space
 
Method Summary
 Address addStream(int streamId)
          Add a stream to the native driver
 void resize(int size)
          Tell the C driver to resize
 void sendControls(AbstractDriver space, int tileNum)
          Send all the control info for the space
 void setTilename(int i, Address start, Address end)
          Tell the native driver the tile name.
 void setTilename(int i, Address format, long value)
          Tell the native driver the tile name.
 void setTilename(int i, String format, long value)
          Tell the native driver the tile names.
 void spaceInfo(Address info)
          Send info for this space
 void startCommunication()
          Start a transmission
 void stream(int streamId, int len)
          Start transmitting a stream.
 void streamByteValue(byte value)
          Send a byte
 void streamEnd()
          End of this stream
 void streamIntValue(int value)
          Send an int
 void streamShortValue(short value)
          Send a short
 void summary(int streamId, int len)
          Start to send a summary
 void summaryEnd()
          End the summary
 void summaryValue(int val)
          Send a summary value
 
Methods inherited from class org.mmtk.vm.gcspy.ServerSpace
endCommunication
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSpace

public ServerSpace(ServerInterpreter serverInterpreter,
                   String serverName,
                   String driverName,
                   String title,
                   String blockInfo,
                   int tileNum,
                   String unused,
                   boolean mainSpace)
Create a new GCspy Space

Parameters:
serverInterpreter - The server that owns this space
serverName - The server's name
driverName - The space driver's name
title - Title for the space
blockInfo - A label for each block
tileNum - Max number of tiles in this space
unused - A label for unused blocks
mainSpace - Whether this space is the main space
Method Detail

setTilename

public void setTilename(int i,
                        Address start,
                        Address end)
Tell the native driver the tile name.

Specified by:
setTilename in class ServerSpace
Parameters:
i - the number of the tile
start - the starting address of the tile
end - the end address

setTilename

public void setTilename(int i,
                        Address format,
                        long value)
Description copied from class: ServerSpace
Tell the native driver the tile name.

Specified by:
setTilename in class ServerSpace
Parameters:
i - the number of the tile
format - the name of the tile, a format string
value - The value for the format string

setTilename

public void setTilename(int i,
                        String format,
                        long value)
Description copied from class: ServerSpace
Tell the native driver the tile names.

Specified by:
setTilename in class ServerSpace
Parameters:
i - the number of the tile
format - The name, including format tags
value - The value for the format string

resize

public void resize(int size)
Description copied from class: ServerSpace
Tell the C driver to resize

Specified by:
resize in class ServerSpace
Parameters:
size - the new driver size

startCommunication

public void startCommunication()
Description copied from class: ServerSpace
Start a transmission

Specified by:
startCommunication in class ServerSpace

addStream

public Address addStream(int streamId)
Description copied from class: ServerSpace
Add a stream to the native driver

Specified by:
addStream in class ServerSpace
Parameters:
streamId - the stream's ID
Returns:
the address of the C gcspy_gc_stream_t

stream

public void stream(int streamId,
                   int len)
Description copied from class: ServerSpace
Start transmitting a stream.

Specified by:
stream in class ServerSpace
Parameters:
streamId - The stream's ID
len - The number of items in the stream

streamByteValue

public void streamByteValue(byte value)
Description copied from class: ServerSpace
Send a byte

Specified by:
streamByteValue in class ServerSpace
Parameters:
value - The byte

streamShortValue

public void streamShortValue(short value)
Description copied from class: ServerSpace
Send a short

Specified by:
streamShortValue in class ServerSpace
Parameters:
value - The short

streamIntValue

public void streamIntValue(int value)
Description copied from class: ServerSpace
Send an int

Specified by:
streamIntValue in class ServerSpace
Parameters:
value - The int

streamEnd

public void streamEnd()
Description copied from class: ServerSpace
End of this stream

Specified by:
streamEnd in class ServerSpace

summary

public void summary(int streamId,
                    int len)
Description copied from class: ServerSpace
Start to send a summary

Specified by:
summary in class ServerSpace
Parameters:
streamId - The stream's ID
len - The number of items to be sent

summaryValue

public void summaryValue(int val)
Description copied from class: ServerSpace
Send a summary value

Specified by:
summaryValue in class ServerSpace
Parameters:
val - The value

summaryEnd

public void summaryEnd()
Description copied from class: ServerSpace
End the summary

Specified by:
summaryEnd in class ServerSpace

sendControls

public void sendControls(AbstractDriver space,
                         int tileNum)
Description copied from class: ServerSpace
Send all the control info for the space

Specified by:
sendControls in class ServerSpace
Parameters:
space - The GCspy driver for this space
tileNum - The number of tiles

spaceInfo

public void spaceInfo(Address info)
Description copied from class: ServerSpace
Send info for this space

Specified by:
spaceInfo in class ServerSpace
Parameters:
info - A pointer to the information (held as C string)