mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Demangle instead of strdup.
2006-08-22 Soren Sandmann <sandmann@daimi.au.dk> * collector.c (unique_dup): Demangle instead of strdup.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
4a145a21bc
commit
62c86a1951
@ -1,3 +1,7 @@
|
||||
2006-08-22 Soren Sandmann <sandmann@daimi.au.dk>
|
||||
|
||||
* collector.c (unique_dup): Demangle instead of strdup.
|
||||
|
||||
2006-08-21 Soren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* elfparser.[ch]
|
||||
|
||||
18
TODO
18
TODO
@ -35,8 +35,6 @@ Before 1.2:
|
||||
* "Expand all" is horrendously slow because update screenshot gets called
|
||||
for every "expanded" signal.
|
||||
|
||||
* Delete elf_parser_new() and rename elf_parser_new_from_file()
|
||||
|
||||
* 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
|
||||
@ -47,8 +45,6 @@ Before 1.2:
|
||||
|
||||
* crc32 checking probably doesn't belong in elfparser.c
|
||||
|
||||
* Add demangling again
|
||||
|
||||
* Rethink binparser. Maybe the default mode should be:
|
||||
- there is a current offset
|
||||
- you can move the cursor
|
||||
@ -147,16 +143,11 @@ Before 1.2:
|
||||
- they will know how to delete the presentation
|
||||
names and themselves (through a virtual function)
|
||||
- they can contain markup etc.
|
||||
- The unique_dup() scheme is somewhat confusing.
|
||||
- a more pragmatic approach might be to just walk the tree and
|
||||
save it.
|
||||
|
||||
- plug all the leaks
|
||||
- don't leak the presentation strings/objects
|
||||
- maybe add stack_stash_set_free_func() or something
|
||||
- perhaps think a little bit more about the presentation
|
||||
object idea. Having pango markup available might be nice
|
||||
as well ... Plus the unique_dup() scheme is somewhat
|
||||
confusing.
|
||||
- loading and saving probably leak right now
|
||||
|
||||
- rethink loading and saving. Goals
|
||||
@ -614,6 +605,13 @@ Later:
|
||||
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ALREADY DONE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
* plug all the leaks
|
||||
- don't leak the presentation strings/objects
|
||||
- maybe add stack_stash_set_free_func() or something
|
||||
* Delete elf_parser_new() and rename elf_parser_new_from_file()
|
||||
|
||||
* Add demangling again
|
||||
|
||||
* Restore filename => binfile cache.
|
||||
|
||||
* It is apparently possible to get another timer interrupt in the middle
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
#include "module/sysprof-module.h"
|
||||
#include "watch.h"
|
||||
#include "process.h"
|
||||
#include "elfparser.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/wait.h>
|
||||
@ -272,7 +273,7 @@ unique_dup (GHashTable *unique_symbols, const char *sym)
|
||||
result = g_hash_table_lookup (unique_symbols, sym);
|
||||
if (!result)
|
||||
{
|
||||
result = g_strdup (sym);
|
||||
result = elf_demangle (sym);
|
||||
g_hash_table_insert (unique_symbols, (char *)sym, result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user