summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@daimi.au.dk>2010-11-09 01:42:02 -0500
committerSøren Sandmann Pedersen <sandmann@daimi.au.dk>2011-06-29 02:48:18 -0400
commit4ff3d534674bdced0d78f56738cfd21847b90d47 (patch)
tree7c64766e2f96b3fce5d0f4fe13f2ef5eec81e78f
parent791fff95c3acf11bddad67bcbcf641c22f39f5e2 (diff)
Put everything in one big tree
-rw-r--r--collector.c5
-rw-r--r--sysprof.c25
2 files changed, 20 insertions, 10 deletions
diff --git a/collector.c b/collector.c
index b28964f..80604ff 100644
--- a/collector.c
+++ b/collector.c
@@ -428,7 +428,8 @@ counter_new (Collector *collector,
attr.task = 1;
attr.exclude_idle = 1;
- if (!collector->use_hw_counters || (fd = sysprof_perf_counter_open (&attr, pid, cpu, -1, 0)) < 0)
+ if (!collector->use_hw_counters ||
+ (fd = sysprof_perf_counter_open (&attr, -1, cpu, -1, 0)) < 0)
{
attr.type = PERF_TYPE_SOFTWARE;
attr.config = PERF_COUNT_SW_CPU_CLOCK;
@@ -619,6 +620,8 @@ process_sample (Collector *collector,
{
uint64_t trace[3];
+ printf ("sample\n");
+
if (sample->header.misc & PERF_EVENT_MISC_KERNEL)
{
trace[0] = PERF_CONTEXT_KERNEL;
diff --git a/sysprof.c b/sysprof.c
index 20d3d2c..17efcce 100644
--- a/sysprof.c
+++ b/sysprof.c
@@ -522,13 +522,20 @@ fill_descendants_tree (Application *app)
if (app->profile)
{
- char *object = get_current_object (app);
- if (object)
+ GList *objects = profile_get_objects (app->profile);
+ GList *list;
+
+ for (list = objects; list != NULL; list = list->next)
{
- app->descendants =
- profile_create_descendants (app->profile, object);
- add_node (tree_store,
- profile_get_size (app->profile), NULL, app->descendants);
+ ProfileObject *object = list->data;
+
+ if (object->name)
+ {
+ ProfileDescendant *node =
+ profile_create_descendants (app->profile, object->name);
+ add_node (tree_store,
+ profile_get_size (app->profile), NULL, node);
+ }
}
}
@@ -1321,8 +1328,8 @@ set_sizes (GtkWindow *window,
gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
- width = monitor.width * 3 / 4;
- height = monitor.height * 3 / 4;
+ width = 5 * (monitor.width / 13);
+ height = 0.9 * monitor.height;
gtk_window_resize (window, width, height);
@@ -1589,7 +1596,7 @@ application_new (void)
{
Application *app = g_new0 (Application, 1);
- app->collector = collector_new (FALSE, on_new_sample, app);
+ app->collector = collector_new (TRUE, on_new_sample, app);
app->state = INITIAL;
return app;