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.
This commit is contained in:
Soeren Sandmann
2005-05-22 01:01:20 +00:00
committed by Søren Sandmann Pedersen
parent 98fe6b572e
commit 402ffc9e4a
4 changed files with 89 additions and 51 deletions

View File

@ -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> Sat May 21 00:59:38 2005 Søren Sandmann <sandmann@redhat.com>
* TODO: update * TODO: update

39
TODO
View File

@ -2,11 +2,6 @@ Before 0.9
* Get account on people.redhat.com * 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 * Web page containing
- Screen shots - Screen shots
@ -16,6 +11,9 @@ Before 0.9
- Contact info - Contact info
- Ask for sucess/failure reports - Ask for sucess/failure reports
* Interface
- Consider expanding a few more levels of a new descendants tree
Before 1.0: Before 1.0:
* Build system * Build system
@ -45,9 +43,6 @@ Before 1.2:
- Ability to generate "screenshots" suitable for mail/blog/etc - Ability to generate "screenshots" suitable for mail/blog/etc
- Fixing the oops in kernels < 2.6.11 - 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 - Make the process waiting in poll() responsible for extracting
the backtrace. Give a copy of the entire stack rather than doing 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 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 This way, we will have a real userspace process
that can take the page faults. 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 how gdb does backtraces; they may have a better way. Also
find out what dwarf2 is and how to use it. Look into libunwind. 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 It seems gdb is capable of doing backtraces of code that neither has
@ -286,6 +307,8 @@ Later:
DONE: 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 - Should do as suggested in the automake manual in the
chapter "when automake is not enough" chapter "when automake is not enough"
- add an "insert-module" target - add an "insert-module" target

View File

@ -425,5 +425,3 @@ cleanup_module(void)
remove_proc_entry("sysprof-trace", &proc_root); remove_proc_entry("sysprof-trace", &proc_root);
} }
module_init (init_module);
module_exit (cleanup_module);

View File

@ -494,6 +494,15 @@ load_module (void)
return (exit_status == 0); return (exit_status == 0);
} }
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 static void
on_start_toggled (GtkWidget *widget, gpointer data) on_start_toggled (GtkWidget *widget, gpointer data)
{ {
@ -1249,41 +1258,10 @@ build_gui (Application *app)
g_signal_connect (G_OBJECT (app->main_window), "delete_event", g_signal_connect (G_OBJECT (app->main_window), "delete_event",
G_CALLBACK (on_delete), NULL); G_CALLBACK (on_delete), NULL);
/* Menu items */ gtk_widget_realize (GTK_WIDGET (app->main_window));
app->start_item = glade_xml_get_widget (xml, "start_item"); set_sizes (GTK_WINDOW (app->main_window),
app->profile_item = glade_xml_get_widget (xml, "profile_item"); glade_xml_get_widget (xml, "hpaned"),
app->reset_item = glade_xml_get_widget (xml, "reset_item"); glade_xml_get_widget (xml, "vpaned"));
app->open_item = glade_xml_get_widget (xml, "open_item");
app->save_as_item = glade_xml_get_widget (xml, "save_as_item");
g_assert (app->start_item);
g_assert (app->profile_item);
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_signal_connect (G_OBJECT (app->profile_item), "activate",
G_CALLBACK (on_profile_toggled), app);
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);
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 */ /* Tool items */
@ -1308,13 +1286,41 @@ build_gui (Application *app)
g_signal_connect (G_OBJECT (app->save_as_button), "clicked", g_signal_connect (G_OBJECT (app->save_as_button), "clicked",
G_CALLBACK (on_save_as_clicked), app); G_CALLBACK (on_save_as_clicked), app);
app->samples_label = glade_xml_get_widget (xml, "samples_label"); app->samples_label = glade_xml_get_widget (xml, "samples_label");
gtk_widget_realize (GTK_WIDGET (app->main_window)); /* Menu items */
set_sizes (GTK_WINDOW (app->main_window), app->start_item = glade_xml_get_widget (xml, "start_item");
glade_xml_get_widget (xml, "hpaned"), app->profile_item = glade_xml_get_widget (xml, "profile_item");
glade_xml_get_widget (xml, "vpaned")); app->reset_item = glade_xml_get_widget (xml, "reset_item");
app->open_item = glade_xml_get_widget (xml, "open_item");
app->save_as_item = glade_xml_get_widget (xml, "save_as_item");
g_assert (app->start_item);
g_assert (app->profile_item);
g_assert (app->save_as_item);
g_assert (app->open_item);
g_signal_connect (G_OBJECT (app->start_item), "activate",
G_CALLBACK (on_menu_item_activated), app->start_button);
g_signal_connect (G_OBJECT (app->profile_item), "activate",
G_CALLBACK (on_menu_item_activated), app->profile_button);
g_signal_connect (G_OBJECT (app->reset_item), "activate",
G_CALLBACK (on_reset_clicked), app);
g_signal_connect (G_OBJECT (app->open_item), "activate",
G_CALLBACK (on_open_clicked), app);
g_signal_connect (G_OBJECT (app->save_as_item), "activate",
G_CALLBACK (on_save_as_clicked), app);
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);
/* TreeViews */ /* TreeViews */