mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
more updates
Sun May 8 16:31:32 2005 Søren Sandmann <sandmann@redhat.com> * TODO: more updates * sysprof.c: Try loading the module before complaining
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
aaa38daad8
commit
11c0561976
@ -1,3 +1,9 @@
|
||||
Sun May 8 16:31:32 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* TODO: more updates
|
||||
|
||||
* sysprof.c: Try loading the module before complaining
|
||||
|
||||
Sun May 8 15:45:08 2005 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* sysprof-module.c (do_generate): Restore lost wake_up().
|
||||
|
||||
29
TODO
29
TODO
@ -6,26 +6,16 @@ Before 1.0:
|
||||
|
||||
* Interface
|
||||
- If the current profile has a name, display it in the title bar
|
||||
- Sould just install the kernel module if it running as root, pop up
|
||||
a dialog if not. Note we must be able to start without module now,
|
||||
since it is useful to just load profiles from disk.
|
||||
- Is there a portable way of asking for the root password?
|
||||
- Install a small suid program that only inserts the module?
|
||||
(instant security hole ..)
|
||||
- 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
|
||||
|
||||
* Build system
|
||||
- Need to make "make install" work (how do you know where to install
|
||||
kernel modules?)
|
||||
- in /lib/modules/`uname -r`/kernel/drivers/
|
||||
- need to run depmod as root after that
|
||||
- Then modprobe run as root should correctly find it.
|
||||
- Find out if that PREFIX business in Makefile was really such
|
||||
a great idea.
|
||||
- Find out what distributions it actually works on
|
||||
(ask for sucess/failure-stories in 0.9.x releases)
|
||||
- auto*?
|
||||
- .desktop file
|
||||
|
||||
Before 1.2:
|
||||
|
||||
@ -158,6 +148,9 @@ http://www.linuxbase.org/spec/booksets/LSB-Embedded/LSB-Embedded/ehframe.html
|
||||
|
||||
Later:
|
||||
|
||||
- .desktop file
|
||||
[Is this worth it? You will often want to start it as root,
|
||||
and you will need to insert the module from the command line]
|
||||
- Applications should be able to say "start profiling", "stop profiling"
|
||||
so that you can limit the profiling to specific areas.
|
||||
|
||||
@ -252,6 +245,18 @@ Later:
|
||||
|
||||
DONE:
|
||||
|
||||
- Sould just install the kernel module if it running as root, pop up
|
||||
a dialog if not. Note we must be able to start without module now,
|
||||
since it is useful to just load profiles from disk.
|
||||
- Is there a portable way of asking for the root password?
|
||||
- Install a small suid program that only inserts the module?
|
||||
(instant security hole ..)
|
||||
- Need to make "make install" work (how do you know where to install
|
||||
kernel modules?)
|
||||
- in /lib/modules/`uname -r`/kernel/drivers/
|
||||
- need to run depmod as root after that
|
||||
- Then modprobe run as root should correctly find it.
|
||||
|
||||
- grep FIXME
|
||||
|
||||
- give profiles on the command line
|
||||
|
||||
38
sysprof.c
38
sysprof.c
@ -430,6 +430,15 @@ sorry (GtkWidget *parent_window,
|
||||
gtk_widget_destroy (dialog);
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
load_module (void)
|
||||
{
|
||||
int retval = system ("/sbin/modprobe sysprof-module");
|
||||
|
||||
return (retval == 0);
|
||||
}
|
||||
|
||||
static void
|
||||
on_start_toggled (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
@ -441,19 +450,28 @@ on_start_toggled (GtkWidget *widget, gpointer data)
|
||||
|
||||
if (app->input_fd == -1)
|
||||
{
|
||||
int fd = open ("/proc/sysprof-trace", O_RDONLY);
|
||||
int fd;
|
||||
|
||||
fd = open ("/proc/sysprof-trace", O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
sorry (app->main_window,
|
||||
"Can't open /proc/sysprof-trace. You need to insert\n"
|
||||
"the sysprof kernel module. Type\n"
|
||||
"\n"
|
||||
" modprobe sysprof-module\n"
|
||||
"\n"
|
||||
"as root.");
|
||||
load_module();
|
||||
|
||||
update_sensitivity (app);
|
||||
return;
|
||||
fd = open ("/proc/sysprof-trace", O_RDONLY);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
sorry (app->main_window,
|
||||
"Can't open /proc/sysprof-trace. You need to insert\n"
|
||||
"the sysprof kernel module. Run\n"
|
||||
"\n"
|
||||
" modprobe sysprof-module\n"
|
||||
"\n"
|
||||
"as root.");
|
||||
|
||||
update_sensitivity (app);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
app->input_fd = fd;
|
||||
|
||||
Reference in New Issue
Block a user