From: John L. <mov...@us...> - 2003-11-13 03:27:27
|
Update of /cvsroot/oprofile/oprofile/libdb In directory sc8-pr-cvs1:/tmp/cvs-serv12950/libdb Modified Files: Tag: BRANCH_CALLGRAPH db_debug.c odb_hash.h Log Message: kill cgdb, making odb take 64-bit key instead. Needs work ;) Index: db_debug.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/libdb/db_debug.c,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -u -p -d -r1.4.4.1 -r1.4.4.2 --- db_debug.c 25 Oct 2003 20:54:20 -0000 1.4.4.1 +++ db_debug.c 13 Nov 2003 03:27:24 -0000 1.4.4.2 @@ -75,7 +75,7 @@ static int check_redundant_key(samples_o for (pos = 1 ; pos < hash->descr->current_size ; ++pos) { if (bitmap[hash->node_base[pos].key]) { - printf("redudant key found %d\n", + printf("redundant key found %lld\n", hash->node_base[pos].key); return 1; } Index: odb_hash.h =================================================================== RCS file: /cvsroot/oprofile/oprofile/libdb/odb_hash.h,v retrieving revision 1.3.2.3 retrieving revision 1.3.2.4 diff -u -p -d -r1.3.2.3 -r1.3.2.4 --- odb_hash.h 25 Oct 2003 20:54:20 -0000 1.3.2.3 +++ odb_hash.h 13 Nov 2003 03:27:24 -0000 1.3.2.4 @@ -13,9 +13,10 @@ #define ODB_HASH_H #include <stddef.h> +#include <stdint.h> -/** the type of key */ -typedef unsigned int odb_key_t; +/** the type of key. 64-bit because CG needs 32-bit pair {from,to} */ +typedef uint64_t odb_key_t; /** the type of an information in the database */ typedef unsigned int odb_value_t; /** the type of index (node number), list are implemented through index */ @@ -166,6 +167,7 @@ odb_node_t * odb_get_iterator(samples_od static __inline unsigned int odb_do_hash(samples_odb_t const * hash, odb_key_t value) { + /* FIXME FIXME: fix hash for 64 bit keys */ /* FIXME: better hash for eip value, needs to instrument code * and do a lot of tests ... */ /* trying to combine high order bits his a no-op: inside a binary image |