Merge stackstash-reorg branch into HEAD

2005-10-30  Soren Sandmann <sandmann@redhat.com>

	* Merge stackstash-reorg branch into HEAD
This commit is contained in:
Soren Sandmann
2005-10-30 20:14:31 +00:00
committed by Søren Sandmann Pedersen
parent 3783be00a8
commit dff4affaab
15 changed files with 1098 additions and 934 deletions

140
TODO
View File

@ -11,9 +11,9 @@ Before 1.0.1:
See also http://www.fedoraproject.org/wiki/Extras/KernelModuleProposal
Before 1.2:
Someone already did create a package - should be googlable.
* Crash reported by Rudi Chiarito with n_addrs == 0.
Before 1.2:
* Find out why we get hangs with rawhide kernels. This only happens with the
'trace "current"' code. See this mail:
@ -25,6 +25,54 @@ Before 1.2:
(Reported by Kjartan Marass).
- Fix bugs/performance issues:
- total should probably be cached so that compute_total() doesn't
take 80% of the time to generate a profile.
- decorate_node should be done lazily
- Find out why we sometimes get completely ridicoulous stacktraces,
where main seems to be called from within Xlib etc. This happens
even after restarting everything.
- It looks like the stackstash-reorg code confuses "main" from
unrelated processes. - currently it looks like if multiple
"main"s are present, only one gets listed in the object list.
- Numbers in caller view are completely screwed up.
- It looks like it sometimes gets confused with similar but different
processess: Something like:
process a spends 80% in foo() called from bar()
process b spends 1% in foo() called from baz()
we get reports of baz() using > 80% of the time.
Or something.
- make the things we put in a stackstash real
objects so that
- we can save them
- they will know how to delete the presentation
names and themselves (through a virtual function)
- they can contain markup etc.
- a more pragmatic approach might be to just walk the tree and
save it.
- make stasckstash ref counted
- plug all the leaks
- don't leak the presentation strings/objects
- loading and saving probably leak right now
- think about loading and saving. Goals
- Can load 1.0 profiles
- Don't export too much of stackstashes to the rest of the
app
- Reorganise stackstash and profile
- Remaining TODO before merging into head:
- rename profiler->collector
* Consider renaming profiler.[ch] to collector.[ch]
* Make sure sysprof-text is not linked to gtk+
* Figure out how to make sfile.[ch] use less memory.
- In general clean sfile.[ch] up a little:
- split out dfa in its own generic class
@ -192,39 +240,6 @@ http://www.linuxbase.org/spec/booksets/LSB-Embedded/LSB-Embedded/ehframe.html
so (can we know the size in advance?))
- instead of what we do now: set the busy cursor unconditionally
- Reorganise stackstash and profile
- stackstash should just take traces of addresses without knowing
anything about what those addresses mean.
- stacktraces should then begin with a process
- stackstash should be extended so that the "create_descendant"
and "create_ancestor" code in profile.c can use it directly.
At that point, get rid of the profile tree, and rename
profile.c to analyze.c.
- the profile tree will then just be a stackstash where the
addresses are presentation strings instead.
- Doing a profile will then amount to converting the raw stash
to one where the addresses have been looked up and converted to
presentation strings.
-=-=
- profile should take traces of pointers to presentation
objects without knowing anything about these presentation
objects.
- For each stack node, compute a presentation object
(probably need to export opaque stacknode objects
with set/get_user_data)
- Send each stack trace to the profile module, along with
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)
@ -249,7 +264,8 @@ http://www.linuxbase.org/spec/booksets/LSB-Embedded/LSB-Embedded/ehframe.html
- Add support for line numbers within functions
- Possibly a special "view details" mode, assuming that
the details of a function are not that interesting
together with a tree.
together with a tree. (Could add radio buttons somewhere in
in the right pane).
- rethink caller list, not terribly useful at the moment. Federico suggested
listing all ancestors.
@ -452,12 +468,64 @@ Later:
DONE:
* Crash reported by Rudi Chiarito with n_addrs == 0.
* Find out what distributions it actually works on
(ask for sucess/failure-stories in 1.0 releases)
* Add note in README about Ubuntu and Debian -dbg packages and how to get
debug symbols for X there.
stackstash reorg:
- make loading and saving work again.
- make stashes loadable and savable.
- add a way to convert 1.0 files to stashes
- Get rid of remaining uses of stack_stash_foreach(), then
rename stack_stash_foreach_reversed() to
stack_stash_foreach()
- stackstash should just take traces of addresses without knowing
anything about what those addresses mean.
- stacktraces should then begin with a process
- stackstash should be extended so that the "create_descendant"
and "create_ancestor" code in profile.c can use it directly.
At that point, get rid of the profile tree, and rename
profile.c to analyze.c.
- the profile tree will then just be a stackstash where the
addresses are presentation strings instead.
- Doing a profile will then amount to converting the raw stash
to one where the addresses have been looked up and converted to
presentation strings.
-=-=
- profile should take traces of pointers to presentation
objects without knowing anything about these presentation
objects.
- For each stack node, compute a presentation object
(probably need to export opaque stacknode objects
with set/get_user_data)
- Send each stack trace to the profile module, along with
presentation objects. Maybe just a map from stack nodes
to presentation objects.
- Make the Profile class use the stash directly instead of
building its own copy.
- store a stash in the profile class
- make sure descendants and callers can be
built from it.
- get rid of other stuff in the profile
struct
* Before 1.0:
- Update version numbers in source