diff options
author | Soren Sandmann <sandmann@daimi.au.dk> | 2006-10-30 03:21:45 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2006-10-30 03:21:45 +0000 |
commit | cc674929eca58dd6492a244e8873f8458bf37334 (patch) | |
tree | 8a1913dccf20756603e9d03599c5214b15722627 | |
parent | 327583358a612a5d3d1addb0f9aa4a96409fe1c9 (diff) |
-=-=-=- Release sysprof 1.0.5 -=-=-=-sysprof-1.0.5
2006-10-29 Soren Sandmann <sandmann@daimi.au.dk>
* -=-=-=- Release sysprof 1.0.5 -=-=-=-
* binfile.c (read_symbols): Store symbols in offsets into original
file, not debug file. Fixes symbols when the debug binaries have
different text offsets than the real binaries.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | announce-1.0.5 | 62 | ||||
-rw-r--r-- | binfile.c | 42 | ||||
-rw-r--r-- | configure.ac | 2 |
4 files changed, 96 insertions, 18 deletions
@@ -1,3 +1,11 @@ +2006-10-29 Soren Sandmann <sandmann@daimi.au.dk> + + * -=-=-=- Release sysprof 1.0.5 -=-=-=- + + * binfile.c (read_symbols): Store symbols in offsets into original + file, not debug file. Fixes symbols when the debug binaries have + different text offsets than the real binaries. + 2006-10-29 Soren Sandmann <sandmann@daimi.au.dk> * =-=-=-= Release sysprof 1.0.4 =-=-=-= diff --git a/announce-1.0.5 b/announce-1.0.5 new file mode 100644 index 0000000..82b9a16 --- /dev/null +++ b/announce-1.0.5 @@ -0,0 +1,62 @@ +Sysprof Linux Profiler v. 1.0.5 + + +* What is it? +-------------------------- + +Sysprof is a sampling system-wide CPU profiler for Linux. + +Sysprof uses a Linux kernel module to profile the entire system, not +just an individual application. Sysprof handles threads and shared +libraries, and applications do not have to be recompiled or +instrumented. In fact they don't even have to be restarted. + + +* Features: +---------------------- + + - Profiles all running processes, not just a single application + + - Call graph support showing time spent in each branch of the call tree + + - Has a simple graphical interface + + - Profiles can be loaded and saved + + - Easy to use: Just insert the kernel module and start sysprof + + - Supports Fedora debuginfo packages + + +* Sysprof 1.0.5 +-------------------------- + + - Handle debug binaries with a text offset that differ from the text + offset in the real binary. + + +Please report bugs as well as success or failure stories to + + sandmann@daimi au dk + + + +* Where can I get it? +-------------------------------------------- + +Home page: + + http://www.daimi.au.dk/~sandmann/sysprof/ + +Source code: + + http://www.daimi.au.dk/~sandmann/sysprof/sysprof-1.0.5.tar.gz + +Sysprof requires + + - Linux 2.6.11 or later, compiled with profiling support + - GTK+ 2.6 + - libglade 2.5 + + +Søren @@ -305,8 +305,7 @@ read_symbols (BinFile *bf) int i; bfd *bfd; GArray *symbols; - guint load_address; - struct bfd_section *sec; + file_ptr real_text_offset; bf->symbols = NULL; bf->n_symbols = 0; @@ -315,6 +314,16 @@ read_symbols (BinFile *bf) if (!bfd) return; + text_section = bfd_get_section_by_name (bfd, ".text"); + if (!text_section) + { + bfd_close (bfd); + return; + } + + /* Offset of the text segment in the real binary (not the debug one) */ + real_text_offset = text_section->filepos; + separate_debug_file = find_separate_debug_file (bfd); if (separate_debug_file) { @@ -331,17 +340,7 @@ read_symbols (BinFile *bf) if (!bfd_symbols) return; - - load_address = 0xffffffff; - for (sec = bfd->sections; sec != NULL; sec = sec->next) - { - if (sec->flags & SEC_ALLOC) - { - if ((gulong)sec->vma < load_address) - load_address = sec->vma & ~4095; - } - } - + text_section = bfd_get_section_by_name (bfd, ".text"); if (!text_section) return; @@ -357,12 +356,21 @@ read_symbols (BinFile *bf) if ((bfd_symbols[i]->flags & BSF_FUNCTION) && (bfd_symbols[i]->section == text_section)) { - /* Store the address in file coordinates: - * - all addresses are already offset by section->vma - * - the section is positioned at section->filepos + /* Store the address in + * + * "offset into text_segment + filepos of text segment in original binary" + * + * Ie., "file position of original binary" */ - symbol.address = bfd_asymbol_value (bfd_symbols[i]) - load_address; + + /* offset into text section */ + symbol.address = + bfd_asymbol_value (bfd_symbols[i]) - text_section->vma + real_text_offset; + symbol.name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i])); +#if 0 + g_print ("computed address for %s: %lx\n", symbol.name, symbol.address); +#endif g_array_append_vals (symbols, &symbol, 1); } } diff --git a/configure.ac b/configure.ac index 2c5cb63..261e130 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.54) -AC_INIT([sysprof], [1.0.4]) +AC_INIT([sysprof], [1.0.5]) AC_CONFIG_SRCDIR(sysprof.glade) AM_INIT_AUTOMAKE(no-define) |