diff --git a/ChangeLog b/ChangeLog index 94bb4fe1..d9da76b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Sep 4 19:38:51 2005 Soeren Sandmann + + * TODO: Updates + Tue Aug 30 16:57:33 2005 Søren Sandmann * configure.ac: Complain if we can't find /lib/modules/`uname diff --git a/TODO b/TODO index 9cf2699f..d6f0c274 100644 --- a/TODO +++ b/TODO @@ -36,6 +36,13 @@ Before 1.2: stack must probably be taken in the interrupt itself? - Why this difference? The page tables should still be loaded. Is it because pages_present() doesn't work? No, turning it off doesn't help. + - It looks like this works. Get: + + struct pt_regs *user_regs = + (void *)current->thread.esp0 - sizeof (struct pt_regs); + + then use pages_present as usual to trace with user_regs; There could be + rare lockups though. * Correctness - When the module is unloaded, kill all processes blocking in read @@ -47,7 +54,7 @@ Before 1.2: - When the module is unloaded, can we somehow *guarantee* that no kernel thread is active? Doesn't look like it; however we can - get very close by decreasing a ref count just before returning + get close by decreasing a ref count just before returning from the module. (There may still be return instructions etc. that will get run). This may not be an issue with the timer based scanning we are using currently. @@ -60,6 +67,13 @@ Before 1.2: - Consider adding "at least 5% inclusive cost" filter +- consider having the ability to group a function together with its nearest + neighbours. That way we can eliminate some of the effect of + "one function taking 10% of the time" + vs. + "the same function broken into ten functions each taking 1%" + Not clear what the UI looks like though. + - Ability to generate "screenshots" suitable for mail/blog/etc UI: "generate screenshot" menu item pops up a window with a text area + a radio buttons "text/html". When you flick @@ -170,7 +184,8 @@ http://www.linuxbase.org/spec/booksets/LSB-Embedded/LSB-Embedded/ehframe.html with set/get_user_data) - Send each stack trace to the profile module, along with - presentation objects + presentation objects. Maybe just a map from stack nodes + to presentation objects. - Charge 'self' properly to processes that don't get any stack trace at all (probably we get that for free with stackstash reorganisation) @@ -254,6 +269,11 @@ Later: This function would behave essentially like a signal handler: couldn't call malloc(), couldn't call printf(), etc. + Note thought that scripting languages will generally have a stack with + both script-binary-stack, script stack, and library stacks. We wouldn't + want scripts to need to parse dwarf. Also if we do that thing with + sending the entire stack to userspace, things will be further complicated. + - Consider this usecase: Someone is considering replacing malloc()/free() with a freelist for a certain data structure. All use of this data structure is diff --git a/binfile.c b/binfile.c index ff66f90c..4c7c2fb9 100644 --- a/binfile.c +++ b/binfile.c @@ -348,7 +348,7 @@ read_symbols (BinFile *bf) symbols = g_array_new (FALSE, FALSE, sizeof (Symbol)); -/* g_print ("%s: text vma: %x\n", bf->filename, text_section->vma); */ + /* g_print ("%s: text vma: %x\n", bf->filename, text_section->vma); */ for (i = 0; i < n_symbols; i++) { diff --git a/module/sysprof-module.c b/module/sysprof-module.c index 5faa741d..143f58e9 100644 --- a/module/sysprof-module.c +++ b/module/sysprof-module.c @@ -475,10 +475,10 @@ timer_notify (struct pt_regs *regs) trace->pid = current->pid; trace->truncated = 0; + + i = 0; - trace->addresses[0] = (void *)regs->REG_INS_PTR; - - i = 1; + trace->addresses[i++] = (void *)regs->REG_INS_PTR; frame = (StackFrame *)regs->REG_FRAME_PTR;