diff options
author | Soeren Sandmann <sandmann@redhat.com> | 2005-05-22 01:01:20 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-05-22 01:01:20 +0000 |
commit | 402ffc9e4a792e018badbe4bb2ba0c47f28ac6c9 (patch) | |
tree | 880967c8dfc13b8ed85d7042eb2282d26dfe3975 | |
parent | 98fe6b572e40410ace3c125ba7d00a75b7dff213 (diff) |
update
Sat May 21 20:58:59 2005 Soeren Sandmann <sandmann@redhat.com>
* TODO: update
* sysprof.c (on_menu_item_activated): New function.
* sysprof.c (build_gui): Hook up menu items.
* module/sysprof-module.c (init_module): Remove module_init/exit
as they cause build failure on kernels < 2.6.11.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | TODO | 39 | ||||
-rw-r--r-- | module/sysprof-module.c | 2 | ||||
-rw-r--r-- | sysprof.c | 82 |
4 files changed, 86 insertions, 48 deletions
@@ -1,3 +1,14 @@ +Sat May 21 20:58:59 2005 Soeren Sandmann <sandmann@redhat.com> + + * TODO: update + + * sysprof.c (on_menu_item_activated): New function. + + * sysprof.c (build_gui): Hook up menu items. + + * module/sysprof-module.c (init_module): Remove module_init/exit + as they cause build failure on kernels < 2.6.11. + Sat May 21 00:59:38 2005 Søren Sandmann <sandmann@redhat.com> * TODO: update @@ -2,11 +2,6 @@ Before 0.9 * Get account on people.redhat.com -* Interface - - hook up menu items view/start etc (or possibly get rid of them or - move them) - - Consider expanding a few more levels of a new descendants tree - * Web page containing - Screen shots @@ -16,6 +11,9 @@ Before 0.9 - Contact info - Ask for sucess/failure reports +* Interface + - Consider expanding a few more levels of a new descendants tree + Before 1.0: * Build system @@ -45,9 +43,6 @@ Before 1.2: - Ability to generate "screenshots" suitable for mail/blog/etc - Fixing the oops in kernels < 2.6.11 - - Oops should be fixed in 1.0, but the stuff below may still - be worth thinking about. - - Make the process waiting in poll() responsible for extracting the backtrace. Give a copy of the entire stack rather than doing the walk inside the kernel. That would allow us to do more complex @@ -89,6 +84,32 @@ Before 1.2: This way, we will have a real userspace process that can take the page faults. + + - Different approach: + + pollable file where a regular userspace process + can read a pid. Any pid returned is guaranteed to be + UNINTERRUPTIBLE. Userspace process is required to + start it again when it is done with it. + + Also provide interface to read arbitrary memory of + that process. + + ptrace() could in principle do all this, but + unfortunately it sucks to continuously + ptrace() processes. + + - Yet another + + Userspace process can register itself as "profiler" + and pass in a filedescriptor where all sorts of + information is sent. + + - could tie lifetime of module to profiler + - could send "module going away" information + - Can we map filedescriptors to files in + a module? + - Find out how gdb does backtraces; they may have a better way. Also find out what dwarf2 is and how to use it. Look into libunwind. It seems gdb is capable of doing backtraces of code that neither has @@ -286,6 +307,8 @@ Later: DONE: +- hook up menu items view/start etc (or possibly get rid of them or + move them) - Should do as suggested in the automake manual in the chapter "when automake is not enough" - add an "insert-module" target diff --git a/module/sysprof-module.c b/module/sysprof-module.c index c811098..f785731 100644 --- a/module/sysprof-module.c +++ b/module/sysprof-module.c @@ -425,5 +425,3 @@ cleanup_module(void) remove_proc_entry("sysprof-trace", &proc_root); } -module_init (init_module); -module_exit (cleanup_module); @@ -495,10 +495,19 @@ load_module (void) } static void +on_menu_item_activated (GtkWidget *menu_item, GtkWidget *tool_button) +{ + GtkToggleToolButton *button = GTK_TOGGLE_TOOL_BUTTON (tool_button); + + if (!gtk_toggle_tool_button_get_active (button)) + gtk_toggle_tool_button_set_active (button, TRUE); +} + +static void on_start_toggled (GtkWidget *widget, gpointer data) { Application *app = data; - + if (!gtk_toggle_tool_button_get_active ( GTK_TOGGLE_TOOL_BUTTON (app->start_button))) return; @@ -842,7 +851,7 @@ static void on_profile_toggled (GtkWidget *widget, gpointer data) { Application *app = data; - + if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button))) { set_busy (app->main_window, TRUE); @@ -1249,6 +1258,37 @@ build_gui (Application *app) g_signal_connect (G_OBJECT (app->main_window), "delete_event", G_CALLBACK (on_delete), NULL); + gtk_widget_realize (GTK_WIDGET (app->main_window)); + set_sizes (GTK_WINDOW (app->main_window), + glade_xml_get_widget (xml, "hpaned"), + glade_xml_get_widget (xml, "vpaned")); + + /* Tool items */ + + app->start_button = glade_xml_get_widget (xml, "start_button"); + app->profile_button = glade_xml_get_widget (xml, "profile_button"); + app->reset_button = glade_xml_get_widget (xml, "reset_button"); + app->save_as_button = glade_xml_get_widget (xml, "save_as_button"); + app->dummy_button = glade_xml_get_widget (xml, "dummy_button"); + + gtk_toggle_tool_button_set_active ( + GTK_TOGGLE_TOOL_BUTTON (app->profile_button), FALSE); + + g_signal_connect (G_OBJECT (app->start_button), "toggled", + G_CALLBACK (on_start_toggled), app); + + g_signal_connect (G_OBJECT (app->profile_button), "toggled", + G_CALLBACK (on_profile_toggled), app); + + g_signal_connect (G_OBJECT (app->reset_button), "clicked", + G_CALLBACK (on_reset_clicked), app); + + g_signal_connect (G_OBJECT (app->save_as_button), "clicked", + G_CALLBACK (on_save_as_clicked), app); + + + app->samples_label = glade_xml_get_widget (xml, "samples_label"); + /* Menu items */ app->start_item = glade_xml_get_widget (xml, "start_item"); app->profile_item = glade_xml_get_widget (xml, "profile_item"); @@ -1261,16 +1301,14 @@ build_gui (Application *app) g_assert (app->save_as_item); g_assert (app->open_item); -#if 0 g_signal_connect (G_OBJECT (app->start_item), "activate", - G_CALLBACK (toggle_start_button), app); + G_CALLBACK (on_menu_item_activated), app->start_button); g_signal_connect (G_OBJECT (app->profile_item), "activate", - G_CALLBACK (on_profile_toggled), app); + G_CALLBACK (on_menu_item_activated), app->profile_button); g_signal_connect (G_OBJECT (app->reset_item), "activate", G_CALLBACK (on_reset_clicked), app); -#endif g_signal_connect (G_OBJECT (app->open_item), "activate", G_CALLBACK (on_open_clicked), app); @@ -1278,44 +1316,12 @@ build_gui (Application *app) g_signal_connect (G_OBJECT (app->save_as_item), "activate", G_CALLBACK (on_save_as_clicked), app); - /* quit */ g_signal_connect (G_OBJECT (glade_xml_get_widget (xml, "quit")), "activate", G_CALLBACK (on_delete), NULL); g_signal_connect (G_OBJECT (glade_xml_get_widget (xml, "about")), "activate", G_CALLBACK (on_about_activated), app); - /* Tool items */ - - app->start_button = glade_xml_get_widget (xml, "start_button"); - app->profile_button = glade_xml_get_widget (xml, "profile_button"); - app->reset_button = glade_xml_get_widget (xml, "reset_button"); - app->save_as_button = glade_xml_get_widget (xml, "save_as_button"); - app->dummy_button = glade_xml_get_widget (xml, "dummy_button"); - - gtk_toggle_tool_button_set_active ( - GTK_TOGGLE_TOOL_BUTTON (app->profile_button), FALSE); - - g_signal_connect (G_OBJECT (app->start_button), "toggled", - G_CALLBACK (on_start_toggled), app); - - g_signal_connect (G_OBJECT (app->profile_button), "toggled", - G_CALLBACK (on_profile_toggled), app); - - g_signal_connect (G_OBJECT (app->reset_button), "clicked", - G_CALLBACK (on_reset_clicked), app); - - g_signal_connect (G_OBJECT (app->save_as_button), "clicked", - G_CALLBACK (on_save_as_clicked), app); - - app->samples_label = glade_xml_get_widget (xml, "samples_label"); - - gtk_widget_realize (GTK_WIDGET (app->main_window)); - set_sizes (GTK_WINDOW (app->main_window), - glade_xml_get_widget (xml, "hpaned"), - glade_xml_get_widget (xml, "vpaned")); - - /* TreeViews */ /* object view */ |