From: John L. <mov...@us...> - 2003-06-09 01:12:40
|
Update of /cvsroot/oprofile/oprofile/libpp In directory sc8-pr-cvs1:/tmp/cvs-serv8275/libpp Modified Files: Makefile.am format_output.cpp format_output.h profile_container.cpp profile_container.h sample_container.cpp sample_container.h symbol_functors.h symbol_sort.cpp Added Files: symbol.h Removed Files: opp_symbol.h Log Message: opp_symbol.h -> symbol.h and some header cleanups --- NEW FILE: symbol.h --- /** * @file symbol.h * Symbol containers * * @remark Copyright 2002 OProfile authors * @remark Read the file COPYING * * @author Philippe Elie * @author John Levon */ #ifndef SYMBOL_H #define SYMBOL_H #include "config.h" #include "name_storage.h" #include <string> #include <iostream> #include <bfd.h> /// A simple container for a fileno:linenr location. struct file_location { file_location() : linenr(0) {} /// empty if not valid. debug_name_id filename; /// 0 means invalid or code is generated internally by the compiler unsigned int linenr; bool operator<(file_location const & rhs) const { // Note we sort on filename id not on string return filename < rhs.filename || (filename == rhs.filename && linenr < rhs.linenr); } }; /// associate vma address with a file location and a samples count struct sample_entry { sample_entry() : vma(0), count(0) {} /// From where file location comes the samples file_location file_loc; /// From where virtual memory address comes the samples bfd_vma vma; /// the samples count unsigned int count; }; /// associate a symbol with a file location, samples count and vma address struct symbol_entry { symbol_entry() : size(0) {} /// which image this symbol belongs to image_name_id image_name; /// owning application name: identical to image name if profiling /// session did not separate samples for shared libs or if image_name // is not a shared lib image_name_id app_name; /// file location, vma and cumulated samples count for this symbol sample_entry sample; /// name of symbol symbol_name_id name; /// symbol size as calculated by op_bfd, start of symbol is sample.vma size_t size; }; #endif /* !SYMBOL_H */ Index: Makefile.am =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- Makefile.am 29 May 2003 00:52:03 -0000 1.2 +++ Makefile.am 9 Jun 2003 01:12:36 -0000 1.3 @@ -22,7 +22,7 @@ libpp_a_SOURCES = \ name_storage.h \ op_header.cpp \ op_header.h \ - opp_symbol.h \ + symbol.h \ partition_files.h \ partition_files.cpp \ profile.cpp \ Index: format_output.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- format_output.cpp 29 May 2003 00:52:03 -0000 1.2 +++ format_output.cpp 9 Jun 2003 01:12:36 -0000 1.3 @@ -15,10 +15,9 @@ #include "file_manip.h" #include "string_manip.h" -#include "opp_symbol.h" #include "format_output.h" -#include "profile_container.h" #include "sample_container.h" +#include "symbol.h" using namespace std; Index: format_output.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/format_output.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- format_output.h 31 May 2003 18:21:40 -0000 1.3 +++ format_output.h 9 Jun 2003 01:12:36 -0000 1.4 @@ -16,14 +16,14 @@ #include <string> #include <map> -#include <vector> #include <iosfwd> #include "format_flags.h" -#include "opp_symbol.h" +#include "symbol.h" #include "profile_container.h" class symbol_entry; +class sample_entry; namespace format_output { Index: profile_container.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/profile_container.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -p -d -r1.10 -r1.11 --- profile_container.cpp 8 Jun 2003 19:42:06 -0000 1.10 +++ profile_container.cpp 9 Jun 2003 01:12:36 -0000 1.11 @@ -18,6 +18,7 @@ #include "string_filter.h" +#include "symbol.h" #include "op_header.h" #include "profile.h" #include "symbol_functors.h" Index: profile_container.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/profile_container.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -p -d -r1.5 -r1.6 --- profile_container.h 8 Jun 2003 19:42:06 -0000 1.5 +++ profile_container.h 9 Jun 2003 01:12:36 -0000 1.6 @@ -15,18 +15,20 @@ #include <string> #include <vector> -#include "opp_symbol.h" #include "profile.h" #include "utility.h" #include "op_bfd.h" #include "sample_container.h" #include "format_flags.h" +class symbol_container; +class string_filter; +class symbol_entry; +class sample_entry; + /// a collection of sorted symbols typedef std::vector<symbol_entry const *> symbol_collection; -class symbol_container; -class string_filter; /** store multiple samples files belonging to the same profiling session. * So on can hold samples files for arbitrary counter and binary image */ Index: sample_container.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/sample_container.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- sample_container.cpp 7 Jun 2003 16:12:28 -0000 1.3 +++ sample_container.cpp 9 Jun 2003 01:12:37 -0000 1.4 @@ -14,8 +14,6 @@ #include <algorithm> #include <vector> -#include "opp_symbol.h" -#include "symbol_functors.h" #include "sample_container.h" using namespace std; Index: sample_container.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/sample_container.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -p -d -r1.3 -r1.4 --- sample_container.h 7 Jun 2003 16:12:28 -0000 1.3 +++ sample_container.h 9 Jun 2003 01:12:37 -0000 1.4 @@ -16,7 +16,7 @@ #include <set> #include <string> -#include "opp_symbol.h" +#include "symbol.h" #include "symbol_functors.h" /** Index: symbol_functors.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/symbol_functors.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- symbol_functors.h 29 May 2003 00:52:03 -0000 1.2 +++ symbol_functors.h 9 Jun 2003 01:12:37 -0000 1.3 @@ -12,7 +12,7 @@ #ifndef SYMBOL_FUNCTORS_H #define SYMBOL_FUNCTORS_H -#include "opp_symbol.h" +#include "symbol.h" /// compare based on file location struct less_by_file_loc { Index: symbol_sort.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/symbol_sort.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -p -d -r1.2 -r1.3 --- symbol_sort.cpp 29 May 2003 00:52:03 -0000 1.2 +++ symbol_sort.cpp 9 Jun 2003 01:12:37 -0000 1.3 @@ -10,7 +10,7 @@ */ #include "symbol_sort.h" -#include "opp_symbol.h" +#include "symbol.h" #include "symbol_functors.h" #include "file_manip.h" #include "name_storage.h" --- opp_symbol.h DELETED --- |