![]() |
![]() |
![]() |
massifg Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
MassifgGraph; void massifg_graph_init (void
); MassifgGraph * massifg_graph_new (void
); void massifg_graph_free (MassifgGraph *graph
); void massifg_graph_set_data (MassifgGraph *graph
,MassifgOutputData *data
); MassifgOutputData * massifg_graph_get_data (MassifgGraph *graph
); void massifg_graph_set_show_details (MassifgGraph *graph
,gboolean show_details
); void massifg_graph_set_show_legend (MassifgGraph *graph
,gboolean show_legend
); GtkWidget * massifg_graph_get_widget (MassifgGraph *graph
); gboolean massifg_graph_render_to_cairo (MassifgGraph *graph
,cairo_t *cr
,gint width
,gint height
); gboolean massifg_graph_render_to_png (MassifgGraph *graph
,gchar *filename
,int w
,int h
);
Implements the graphing functionality of MassifG
Currently two modes are supported by the graph, one "simple" and one "detailed". The "simple" mode shows an area plot over stack, heap and heap allocation overhead memory usage for each snapshot. The "detailed" mode shows an area plot, which is broken down to show how different functions contribute to the heap memory usage for each snapshot. Currently only the first children of the heap tree is displayed in detailed mode
typedef struct { MassifgOutputData *data; GtkWidget *widget; GError *error; gboolean detailed; gboolean has_legend; GogPlot *plot; } MassifgGraph;
void massifg_graph_init (void
);
Initialize what is neccesary to use the graph.
Note: Must be called before the first call to massifg_graph_new()
MassifgGraph * massifg_graph_new (void
);
Create a new MassifgGraph.
Returns : |
A new MassifgGraph. Free with massifg_graph_free()
|
void massifg_graph_free (MassifgGraph *graph
);
Free a MassifgGraph
|
A MassifgGraph |
void massifg_graph_set_data (MassifgGraph *graph
,MassifgOutputData *data
);
Set the data to visualize
|
A MassifgGraph |
|
MassifgOutputData to visualize in graph |
MassifgOutputData * massifg_graph_get_data (MassifgGraph *graph
);
Get the data the graph visualizes
|
A MassifgGraph |
Returns : |
the MassifgOutputData the graph is visualizing |
void massifg_graph_set_show_details (MassifgGraph *graph
,gboolean show_details
);
Enable/disable detailed graph view
|
A MassifgGraph |
|
TRUE for detailed view, FALSE for simple view
|
void massifg_graph_set_show_legend (MassifgGraph *graph
,gboolean show_legend
);
Enable/disable display of legend
|
A MassifgGraph |
|
TRUE to enable, FALSE to disable
|
GtkWidget * massifg_graph_get_widget (MassifgGraph *graph
);
Get the widget that displays the graph
|
A MassifgGraph |
Returns : |
The GtkWidget that displays the graph |
gboolean massifg_graph_render_to_cairo (MassifgGraph *graph
,cairo_t *cr
,gint width
,gint height
);
Render graph to a cairo context
|
A MassifgGraph to render |
|
cairo_t context to render to |
|
width of the rendered output |
|
height of the rendered output |
Returns : |
TRUE on success, FALSE on failure
|
gboolean massifg_graph_render_to_png (MassifgGraph *graph
,gchar *filename
,int w
,int h
);
Render the graph to a PNG file
|
A MassifgGraph to render |
|
Path to file to render to. Will be created if not existing, or overwritten if existing |
|
width of the rendered output |
|
height of the rendered output |
Returns : |
TRUE on success, FALSE on failure
|