From: Philippe E. <ph...@us...> - 2002-10-31 03:58:49
|
Update of /cvsroot/oprofile/oprofile/daemon In directory usw-pr-cvs1:/tmp/cvs-serv16443/daemon Modified Files: opd_image.c opd_sample_files.c Log Message: small merging from daemon dir to dae dir regards, Phil Index: opd_image.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/daemon/opd_image.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- opd_image.c 24 Oct 2002 04:14:27 -0000 1.11 +++ opd_image.c 31 Oct 2002 03:58:46 -0000 1.12 @@ -26,6 +26,8 @@ #include <stdio.h> #include <string.h> +#include <linux/cache.h> + extern uint op_nr_counters; extern int separate_samples; @@ -117,6 +119,8 @@ { char buf[PATH_MAX + 1]; + /* FIXME: if dcookie lookup fail we will re open multiple time the + * same db which doesn't work */ if (opd_get_dcookie(cookie, buf, PATH_MAX)) image->name = xstrdup(""); else @@ -236,7 +240,7 @@ /** return hash value for a cookie */ static unsigned long opd_hash_cookie(unsigned long cookie) { - return (cookie >> 2) & (IMAGE_HASH_SIZE - 1); + return (cookie >> L1_CACHE_SHIFT) & (IMAGE_HASH_SIZE - 1); } Index: opd_sample_files.c =================================================================== RCS file: /cvsroot/oprofile/oprofile/daemon/opd_sample_files.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- opd_sample_files.c 30 Sep 2002 21:50:36 -0000 1.4 +++ opd_sample_files.c 31 Oct 2002 03:58:46 -0000 1.5 @@ -20,7 +20,6 @@ #include "op_cpu_type.h" #include "op_mangle.h" -#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -124,7 +123,6 @@ * image->kernel and image->name must have meaningful * values. */ -// FIXME: take db_tree_t * instead void opd_open_sample_file(struct opd_image * image, int counter) { char * mangled; |