diff --git a/oprofile-0.9.4.diff b/oprofile-0.9.4.diff index e868b4c..f931808 100644 --- a/oprofile-0.9.4.diff +++ b/oprofile-0.9.4.diff @@ -93,6 +93,55 @@ if (fd < 0) return false; close(fd); +--- libutil++/op_bfd.cpp ++++ libutil++/op_bfd.cpp +@@ -91,6 +91,11 @@ bool op_bfd_symbol::operator<(op_bfd_sym + return filepos() < rhs.filepos(); + } + ++unsigned long op_bfd_symbol::symbol_endpos(void) const ++{ ++ return bfd_symbol->section->filepos + bfd_symbol->section->size; ++} ++ + + op_bfd::op_bfd(string const & fname, string_filter const & symbol_filter, + extra_images const & extra_images, bool & ok) +@@ -245,7 +250,8 @@ void op_bfd::get_symbols(op_bfd::symbols + while (it != symbols.end()) { + symbols_found_t::iterator temp = it; + ++temp; +- if (temp != symbols.end() && (it->vma() == temp->vma())) { ++ if (temp != symbols.end() && (it->vma() == temp->vma()) && ++ (it->filepos() == temp->filepos())) { + if (boring_symbol(*it, *temp)) { + it = symbols.erase(it); + } else { +@@ -382,7 +388,12 @@ size_t op_bfd::symbol_size(op_bfd_symbol + op_bfd_symbol const * next) const + { + unsigned long long start = sym.filepos(); +- unsigned long long end = next ? next->filepos() : file_size; ++ unsigned long long end; ++ ++ if (next && (sym.section() != next->section())) ++ end = sym.symbol_endpos(); ++ else ++ end = next ? next->filepos() : file_size; + + return end - start; + } +--- libutil++/op_bfd.h ++++ libutil++/op_bfd.h +@@ -50,6 +50,8 @@ public: + bfd_vma vma() const { return symb_value + section_vma; } + unsigned long value() const { return symb_value; } + unsigned long filepos() const { return symb_value + section_filepos; } ++ unsigned long symbol_endpos(void) const; ++ asection const * section(void) const { return bfd_symbol->section; } + std::string const & name() const { return symb_name; } + asymbol const * symbol() const { return bfd_symbol; } + size_t size() const { return symb_size; } --- libutil++/op_spu_bfd.cpp +++ libutil++/op_spu_bfd.cpp @@ -45,7 +45,8 @@ op_bfd::op_bfd(uint64_t spu_offset, stri diff --git a/oprofile.changes b/oprofile.changes index 87d6f46..18f2ed6 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 20 17:50:40 CET 2008 - schwab@suse.de + +- Properly handle SPE overlays. + ------------------------------------------------------------------- Wed Nov 19 15:18:30 CET 2008 - schwab@suse.de diff --git a/oprofile.spec b/oprofile.spec index fc90435..0884fdb 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -25,7 +25,7 @@ Group: Development/Tools/Other AutoReqProv: on PreReq: /usr/sbin/groupadd /usr/sbin/useradd Version: 0.9.4 -Release: 49 +Release: 50 Summary: System-Wide Profiler for Linux Systems BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{version}.tar.gz @@ -150,6 +150,8 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libopagent.so %changelog +* Thu Nov 20 2008 schwab@suse.de +- Properly handle SPE overlays. * Wed Nov 19 2008 schwab@suse.de - Work around broken java support. * Wed Oct 29 2008 schwab@suse.de