![]() |
![]() |
![]() |
massifg Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
MassifgHeapTreeNode; MassifgSnapshot; MassifgOutputData; MassifgOutputData * massifg_parse_file (gchar *filename
,GError **error
); MassifgOutputData * massifg_parse_iochannel (GIOChannel *io_channel
,GError **error
); void massifg_output_data_free (MassifgOutputData *data
);
typedef struct { gint num_children; glong total_mem_B; GString *label; /* Only used while parsing */ gint parsing_remaining_children; gint parsing_depth; } MassifgHeapTreeNode;
Represents one node in the heap tree.
gint |
The number of children this node has. |
glong |
Memory usage under this node. |
GString * |
String label identifying which function this is. |
gint |
Used internally by the parser. Should be 0 after correct parsing. |
gint |
Used internally by the parser. Should be equal to the depth of the tree. |
typedef struct { gint snapshot_no; gint64 time; gint64 mem_heap_B; gint64 mem_heap_extra_B; gint64 mem_stacks_B; GString *heap_tree_desc; GNode *heap_tree; } MassifgSnapshot;
Represents a single massif snapshot.
gint |
The number of this snapshot. |
gint64 |
Time this snapshot was taken. This can have different units, see MassifgOutputData |
gint64 |
Heap memory usage in bytes. |
gint64 |
Heap overhead in bytes. |
gint64 |
Stack memory usage in bytes. |
GString * |
String describing what kind of heap tree we have. |
GNode * |
The heap tree as a tree of MassifgHeapTreeNode objects. |
typedef struct { GList *snapshots; GString *desc; GString *cmd; GString *time_unit; gint64 max_time; gint64 max_mem_allocation; } MassifgOutputData;
Represents all the data massif outputs.
Note: max_time
and max_mem_allocation
is not provided by the massif output
format directly but is provided by the parser. These attributes might go
away in a future version.
GList * |
List of MassifgSnapshot objects representing the snapshots. |
GString * |
Description string. Can be set by the user when running massif. |
GString * |
The command massif executed. |
GString * |
The time unit massif used. Possible values are "i"|"ms"|"b". |
gint64 |
The maximum value of the time. |
gint64 |
The maximum value of total memory allocation. |
MassifgOutputData * massifg_parse_file (gchar *filename
,GError **error
);
Parse massif output data from file.
See also massifg_parse_iochannel()
|
Path to file to parse. NULL is invalid
|
|
Location to store a GError or NULL
|
Returns : |
a MassifgOutputData that represents this data, or NULL on failure.
|
MassifgOutputData * massifg_parse_iochannel (GIOChannel *io_channel
,GError **error
);
Parse massif output data from a GIOChannel
|
GIOChannel to parse the data from |
|
Location to store a GError or NULL
|
Returns : |
a MassifgOutputData that represents this data, or NULL on failure.
Use massifg_output_data_free() to free
|
void massifg_output_data_free (MassifgOutputData *data
);
Free a MassifgOutputData
|
the MassifgOutputData to free |