3.4.9 Profile structure values

function_space_profile

Type

Summary

Records space-profiling information gathered for a particular function.

Signature

MLWORKS.Profile

Structure

MLWorks.Profile

Type

datatype function_space_profile = 
  Function_Space_Profile of
   {allocated : large_size,
   copied : large_size,
   copies : large_size list,
   allocation : (object_kind * object_count) list list}

Description

Records space-profiling information gathered for a particular function. The record contains the following data:

allocated
Total amount of data allocated by the function during its execution. This will be -1 if space profiling was not requested in the profiling manner used.

copied
Total amount of data copied by the garbage collector that was allocated by the profiled function.

copies
A breakdown of copied by generation number: copies is a list [s1, s2, s3, ...] where s1 is the amount of data copied out of generation zero, and so on.

allocation
A list of breakdowns of data allocated and copied: allocation is a list [b0, b1, b2, ...] where each b is a breakdown, that is, a list [(k1, c1), (k2, c2), ...]. The k's are the object_kind values in the breakdown list given to make_manner. Each c is the object count corresponding to that runtime object kind, a value of type object_count. The count gives the number of objects, the size of the data in the objects, and the space overhead (padding, headers, and so on) of the objects.

Each b corresponds to a generation: b0 is a breakdown of the objects allocated by that function, b1 is a breakdown of the runtime objects allocated by that function which the garbage collector copies out of generation zero, b2 the breakdown for copies out of generation one, and so on.

Note: If the profiled function allocates only long-lived objects, they will be copied several times. In that case, copied will be greater than allocated. Conversely, if the function allocates only transient data, it will not be copied, and so allocated will be greater than copied.


MLWorks Reference Manual (version 1.0) - 3 DEC 1996

Generated with Harlequin WebMaker