From: Philippe E. <ph...@us...> - 2003-11-14 23:35:25
|
Update of /cvsroot/oprofile/oprofile/libpp In directory sc8-pr-cvs1:/tmp/cvs-serv11686/libpp Modified Files: Tag: BRANCH_CALLGRAPH profile_spec.cpp profile_spec.h Log Message: filter call graph samples files Index: profile_spec.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/profile_spec.cpp,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -p -d -r1.2.2.6 -r1.2.2.7 --- profile_spec.cpp 13 Nov 2003 01:17:31 -0000 1.2.2.6 +++ profile_spec.cpp 14 Nov 2003 23:35:22 -0000 1.2.2.7 @@ -395,12 +395,14 @@ vector<string> filter_session(vector<str bool valid_candidate(string const & filename, profile_spec const & spec, - bool exclude_dependent) + bool exclude_dependent, bool exclude_cg) { if (spec.match(filename)) { if (exclude_dependent && filename.find("{dep}") != string::npos) return false; + if (exclude_cg && filename.find("{cg}") != string::npos) + return false; return true; } @@ -410,7 +412,8 @@ bool valid_candidate(string const & file } // anonymous namespace -list<string> profile_spec::generate_file_list(bool exclude_dependent) const +list<string> profile_spec::generate_file_list(bool exclude_dependent, + bool exclude_cg) const { // FIXME: isn't remove_duplicates faster than doing this, then copy() ? set<string> unique_files; @@ -454,7 +457,8 @@ list<string> profile_spec::generate_file list<string>::const_iterator it = files.begin(); list<string>::const_iterator fend = files.end(); for (; it != fend; ++it) { - if (valid_candidate(*it, *this, exclude_dependent)) { + if (valid_candidate(*it, *this, exclude_dependent, + exclude_cg)) { unique_files.insert(*it); } } Index: profile_spec.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libpp/profile_spec.h,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -p -d -r1.2.2.2 -r1.2.2.3 --- profile_spec.h 8 Nov 2003 16:17:41 -0000 1.2.2.2 +++ profile_spec.h 14 Nov 2003 23:35:22 -0000 1.2.2.3 @@ -44,11 +44,12 @@ public: /** * @param exclude_dependent whether to exclude dependent sub-images + * @param exclude_cg whether to exclude call graph file * * Use the spec to generate the list of candidate sample files. */ std::list<std::string> - generate_file_list(bool exclude_dependent) const; + generate_file_list(bool exclude_dependent, bool exclude_cg) const; /** * @param filename the filename to check |