From: John L. <mov...@us...> - 2002-12-01 06:17:40
|
Update of /cvsroot/oprofile/oprofile/pp In directory sc8-pr-cvs1:/tmp/cvs-serv8246/pp Modified Files: op_merge.cpp samples_file.cpp samples_file.h Log Message: s/db_tree_t/samples_db_t/ and related changes Index: op_merge.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/pp/op_merge.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- op_merge.cpp 14 Nov 2002 04:29:12 -0000 1.31 +++ op_merge.cpp 1 Dec 2002 06:17:36 -0000 1.32 @@ -151,11 +151,11 @@ * * @param key * @param value - * @param data is a pointer to the destination db_tree_t object + * @param data is a pointer to the destination samples_db_t object */ static void copy_callback(db_key_t key, db_value_t value, void * data) { - db_tree_t * dest = (db_tree_t *)data; + samples_db_t * dest = (samples_db_t *)data; db_insert(dest, key, value); } @@ -184,12 +184,12 @@ out << in.rdbuf(); } - db_tree_t dest; + samples_db_t dest; db_open(&dest, filename.c_str(), DB_RDWR, sizeof(struct opd_header)); for (++it ; it != filenames.end() ; ++it) { - db_tree_t src; + samples_db_t src; db_open(&src, it->c_str(), DB_RDONLY, sizeof(struct opd_header)); Index: samples_file.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/pp/samples_file.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- samples_file.cpp 16 Nov 2002 04:53:52 -0000 1.23 +++ samples_file.cpp 1 Dec 2002 06:17:36 -0000 1.24 @@ -31,7 +31,7 @@ samples_file_t::samples_file_t(string const & filename) : start_offset(0) { - db_open(&db_tree, filename.c_str(), DB_RDONLY, sizeof(struct opd_header)); + db_open(&samples_db, filename.c_str(), DB_RDONLY, sizeof(struct opd_header)); opd_header const & head = header(); if (head.version != OPD_VERSION) { @@ -44,7 +44,7 @@ samples_file_t::~samples_file_t() { - db_close(&db_tree); + db_close(&samples_db); } void samples_file_t::check_headers(samples_file_t const & rhs) const @@ -76,7 +76,7 @@ } } -static void db_tree_callback(db_key_t, db_value_t value, void * data) +static void samples_db_callback(db_key_t, db_value_t value, void * data) { u32 * count = (u32 *)data; @@ -87,8 +87,8 @@ { u32 count = 0; - db_travel(&db_tree, start - start_offset, end - start_offset, - db_tree_callback, &count); + db_travel(&samples_db, start - start_offset, end - start_offset, + samples_db_callback, &count); return count; } Index: samples_file.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/pp/samples_file.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- samples_file.h 12 Oct 2002 16:10:09 -0000 1.19 +++ samples_file.h 1 Dec 2002 06:17:36 -0000 1.20 @@ -73,7 +73,7 @@ /// return the header of this sample file opd_header const & header() const { - return *static_cast<opd_header *>(db_tree.base_memory); + return *static_cast<opd_header *>(samples_db.base_memory); } /// see member variable start_offset @@ -82,7 +82,7 @@ } private: /// the underlying db object - db_tree_t db_tree; + samples_db_t samples_db; /** * For the kernel and kernel modules, this value is non-zero and |