Before 1.2:
-* Fix (potential) performance issues in symbol lookup.
-
* Elf bugs:
- - Also error handling for bin_parser is necessary.
+ - error handling for bin_parser is necessary.
- don't loop infinitely if there are cycles in the debuglink graph.
- userspace can look at _stext and _etext to determine
start and end of kernel text segment
- copying kernel stack to userspace
+ - it's always 4096 bytes these days
- heuristically determine functions based on address
- is eh_frame usually loaded into memory during normal
operation
- assume its the same across processes, just look at
sysprof's own copy.
- send copy of it to userspace once, or for every
- sample
+ sample.
- regular elf
- usually have eh_frame section which is mapped into memory
during normal operation
- - is usually mapped into memory
- do stackwalk in kernel based on eh_frame
+ - eh_frame section is usually mapped into memory, so
+ no file reading in kernel would be necessary.
- do stackwalk in userland based on eh_frame
- do ebp based stackwalk in kernel
- do ebp based stackwalk in userland
* See if we can make "In file <blah>" not be treated as a recursive function.
Maybe simply treat each individual address in the file as a function.
- Or try to parse the machine code. Places that are called are likely
+ Or try to parse the machine code. Positions that are called are likely
to be functions.
* Give more sensible 'error messages'. Ie., if you get permission denied for
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ALREADY DONE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+* Fix (potential) performance issues in symbol lookup.
- when an elf file is read, it should be checked that the various
sections are of the right type. For example the debug information
#include <glade/glade.h>
#include <errno.h>
#include <glib/gprintf.h>
+#include <string.h>
+#include <stdlib.h>
#include "treeviewutils.h"
#include "profile.h"
return FALSE;
}
+static const char *
+process_options (int argc,
+ char **argv)
+{
+ int i;
+ gboolean show_version = FALSE;
+ const char *filename = NULL;
+
+ for (i = 1; i < argc; ++i)
+ {
+ char *option = argv[i];
+
+ if (strcmp (option, "--version") == 0)
+ {
+ show_version = TRUE;
+ }
+ else if (!filename)
+ {
+ filename = argv[i];
+ }
+ }
+
+ if (show_version)
+ {
+ g_print ("%s %s\n", APPLICATION_NAME, PACKAGE_VERSION);
+
+ exit (1);
+ }
+
+ return filename;
+}
+
int
main (int argc,
char **argv)
{
Application *app;
+ const char *filename;
+
+ filename = process_options (argc, argv);
gtk_init (&argc, &argv);
*/
g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
#endif
-
+
app = application_new ();
-
+
if (!build_gui (app))
return -1;
update_sensitivity (app);
- if (argc > 1)
+ if (filename)
{
FileOpenData *file_open_data = g_new0 (FileOpenData, 1);
- file_open_data->filename = argv[1];
+ file_open_data->filename = filename;
file_open_data->app = app;
-
+
/* This has to run at G_PRIORITY_LOW because of bug 350517
*/
g_idle_add_full (G_PRIORITY_LOW, load_file, file_open_data, NULL);