Busy cursors in many more places.

Mon Apr  4 00:57:11 2005  Soeren Sandmann  <sandmann@redhat.com>

        * sysprof.c: Busy cursors in many more places.

        * TODO: updates
This commit is contained in:
Soeren Sandmann
2005-04-04 06:19:16 +00:00
committed by Søren Sandmann Pedersen
parent 9bddb58d92
commit 4a4a5fc5ca
3 changed files with 78 additions and 35 deletions

View File

@ -1,3 +1,9 @@
Mon Apr 4 00:57:11 2005 Soeren Sandmann <sandmann@redhat.com>
* sysprof.c: Busy cursors in many more places.
* TODO: updates
Sun Apr 3 23:28:45 2005 Soeren Sandmann <sandmann@redhat.com> Sun Apr 3 23:28:45 2005 Soeren Sandmann <sandmann@redhat.com>
* sysprof-module.c (do_generate): Re-schedule the timeout here * sysprof-module.c (do_generate): Re-schedule the timeout here

62
TODO
View File

@ -1,27 +1,29 @@
Before 1.0: Before 1.0:
- grep FIXME * Correctness
- When the module is unloaded, kill all processes blocking in read - grep FIXME
- Need to make "make install" work (how do you know where to install - When the module is unloaded, kill all processes blocking in read
kernel modules?)
- Find out what distributions it actually works on * Interface
(ask for sucess stories in 0.9.x releases) - hook up about box
- hook up about box - Need an icon
- Need an icon - If the current profile has a name, display it in the title bar
- Add busy cursors, - Sould just install the kernel module if it running as root, pop up
- when you hit "Profile" a dialog if not. Note we must be able to start without module now,
- when you click something in the main list and we don't respond since it is useful to just load profiles from disk.
within 50ms (or perhaps when we expect to not be able to do - hook up menu items view/start etc (or possibly get rid of them or
so (can we know the size in advance?)) move them)
- Sould just install the kernel module if it running as root, pop up - Consider expanding a few more levels of a new descendants tree
a dialog if not. Note we must be able to start without module now, since - give profiles on the command line
it is useful to just load profiles from disk.
- hook up menu items view/start etc (or possibly get rid of them or move * Build system
them) - Need to make "make install" work (how do you know where to install
- give profiles on the command line kernel modules?)
- auto*? - Find out what distributions it actually works on
- .desktop file (ask for sucess/failure-stories in 0.9.x releases)
- Consider expanding a few more levels of a new descendants tree - auto*?
- .desktop file
- translations
Before 1.2: Before 1.2:
@ -48,6 +50,10 @@ Before 1.2:
- Charge 'self' properly to processes that don't get any stack trace at all - Charge 'self' properly to processes that don't get any stack trace at all
(probably we get that for free with stackstash reorganisation) (probably we get that for free with stackstash reorganisation)
- support more than one reader of the samples properly
- Don't generate them if noone cares
- When not profiling, sysprof shouldn't care
- Add ability to show more than one function at a time. Algorithm: - Add ability to show more than one function at a time. Algorithm:
Find all relevant nodes; Find all relevant nodes;
For each relevant node For each relevant node
@ -80,13 +86,13 @@ Before 1.2:
dump the data to a network socket. Should be able to react to eg. dump the data to a network socket. Should be able to react to eg.
SIGUSR1 by dumping the data. SIGUSR1 by dumping the data.
- Figure out how Google's pprof script works. Then add real call graph
drawing. (google's script is really simple; uses dot from graphviz).
- hide internal stuff in ProfileDescendant - hide internal stuff in ProfileDescendant
Later: Later:
- Figure out how Google's pprof script works. Then add real call graph
drawing.
- Find out how to hack around gtk+ bug causing multiple double clicks - Find out how to hack around gtk+ bug causing multiple double clicks
to get eaten. to get eaten.
@ -151,6 +157,12 @@ Later:
DONE: DONE:
- Add busy cursors,
- when you hit "Profile"
- when you click something in the main list and we don't respond
within 50ms (or perhaps when we expect to not be able to do
so (can we know the size in advance?))
- kernel module should put process to sleep before sampling. Should get us - kernel module should put process to sleep before sampling. Should get us
more accurate data more accurate data

View File

@ -190,7 +190,7 @@ update_sensitivity (Application *app)
} }
static void static void
set_busy (Application *app, gboolean busy) set_busy (GtkWidget *widget, gboolean busy)
{ {
GdkCursor *cursor; GdkCursor *cursor;
@ -199,7 +199,7 @@ set_busy (Application *app, gboolean busy)
else else
cursor = NULL; cursor = NULL;
gdk_window_set_cursor (app->main_window->window, cursor); gdk_window_set_cursor (widget->window, cursor);
if (cursor) if (cursor)
gdk_cursor_unref (cursor); gdk_cursor_unref (cursor);
@ -682,7 +682,7 @@ on_profile_toggled (GtkWidget *widget, gpointer data)
if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button))) if (gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (app->profile_button)))
{ {
set_busy (app, TRUE); set_busy (app->main_window, TRUE);
if (app->profile && !app->profile_from_file) if (app->profile && !app->profile_from_file)
{ {
profile_free (app->profile); profile_free (app->profile);
@ -690,7 +690,7 @@ on_profile_toggled (GtkWidget *widget, gpointer data)
} }
ensure_profile (app); ensure_profile (app);
set_busy (app, FALSE); set_busy (app->main_window, FALSE);
} }
} }
@ -723,6 +723,8 @@ static void
on_reset_clicked (gpointer widget, gpointer data) on_reset_clicked (gpointer widget, gpointer data)
{ {
Application *app = data; Application *app = data;
set_busy (app->main_window, TRUE);
delete_data (app); delete_data (app);
@ -730,6 +732,8 @@ on_reset_clicked (gpointer widget, gpointer data)
app->state = INITIAL; app->state = INITIAL;
update_sensitivity (app); update_sensitivity (app);
set_busy (app->main_window, FALSE);
} }
static gboolean static gboolean
@ -783,6 +787,8 @@ on_save_as_clicked (gpointer widget, gpointer data)
ensure_profile (app); ensure_profile (app);
set_busy (app->main_window, TRUE);
dialog = gtk_file_chooser_dialog_new ("Save As", dialog = gtk_file_chooser_dialog_new ("Save As",
GTK_WINDOW (app->main_window), GTK_WINDOW (app->main_window),
GTK_FILE_CHOOSER_ACTION_SAVE, GTK_FILE_CHOOSER_ACTION_SAVE,
@ -793,6 +799,8 @@ on_save_as_clicked (gpointer widget, gpointer data)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
set_busy (app->main_window, FALSE);
retry: retry:
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
{ {
@ -808,15 +816,17 @@ on_save_as_clicked (gpointer widget, gpointer data)
goto retry; goto retry;
} }
set_busy (dialog, TRUE);
if (!profile_save (app->profile, filename, &err)) if (!profile_save (app->profile, filename, &err))
{ {
sorry (app->main_window, "Could not save %s: %s", sorry (app->main_window, "Could not save %s: %s",
filename, err->message); filename, err->message);
set_busy (dialog, FALSE);
g_free (filename); g_free (filename);
goto retry; goto retry;
} }
set_busy (dialog, FALSE);
g_free (filename); g_free (filename);
} }
@ -829,6 +839,8 @@ on_open_clicked (gpointer widget, gpointer data)
Application *app = data; Application *app = data;
Profile *profile = NULL; Profile *profile = NULL;
GtkWidget *dialog; GtkWidget *dialog;
set_busy (app->main_window, TRUE);
dialog = gtk_file_chooser_dialog_new ("Open", dialog = gtk_file_chooser_dialog_new ("Open",
GTK_WINDOW (app->main_window), GTK_WINDOW (app->main_window),
@ -838,6 +850,8 @@ on_open_clicked (gpointer widget, gpointer data)
NULL); NULL);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
set_busy (app->main_window, FALSE);
retry: retry:
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
@ -846,10 +860,15 @@ on_open_clicked (gpointer widget, gpointer data)
gchar *filename; gchar *filename;
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
set_busy (dialog, TRUE);
profile = profile_load (filename, &err); profile = profile_load (filename, &err);
if (!profile) if (!profile)
{ {
set_busy (dialog, FALSE);
sorry (app->main_window, "Could not open %s: %s", sorry (app->main_window, "Could not open %s: %s",
filename, err->message); filename, err->message);
@ -857,10 +876,14 @@ on_open_clicked (gpointer widget, gpointer data)
goto retry; goto retry;
} }
set_busy (dialog, FALSE);
g_free (filename); g_free (filename);
} }
gtk_widget_destroy (dialog); gtk_widget_destroy (dialog);
set_busy (app->main_window, TRUE);
if (profile) if (profile)
{ {
@ -872,11 +895,13 @@ on_open_clicked (gpointer widget, gpointer data)
app->profile = profile; app->profile = profile;
app->profile_from_file = TRUE; app->profile_from_file = TRUE;
fill_lists (app); fill_lists (app);
update_sensitivity (app); update_sensitivity (app);
} }
set_busy (app->main_window, FALSE);
} }
static void static void
@ -891,7 +916,7 @@ on_object_selection_changed (GtkTreeSelection *selection, gpointer data)
Application *app = data; Application *app = data;
GtkTreePath *path; GtkTreePath *path;
set_busy (app, TRUE); set_busy (app->main_window, TRUE);
gdk_window_process_all_updates (); gdk_window_process_all_updates ();
@ -906,7 +931,7 @@ on_object_selection_changed (GtkTreeSelection *selection, gpointer data)
GTK_TREE_VIEW (app->descendants_view), path, FALSE); GTK_TREE_VIEW (app->descendants_view), path, FALSE);
gtk_tree_path_free (path); gtk_tree_path_free (path);
set_busy (app, FALSE); set_busy (app->main_window, FALSE);
} }
static void static void