Index: oprofile-0.9.3/daemon/opd_anon.c =================================================================== --- oprofile-0.9.3.orig/daemon/opd_anon.c 2008-12-22 00:36:12.000000000 +0100 +++ oprofile-0.9.3/daemon/opd_anon.c 2008-12-22 00:39:34.000000000 +0100 @@ -143,13 +143,16 @@ while (fgets(buf, PATH_MAX, fp) != NULL) { char tmp[MAX_IMAGE_NAME_SIZE + 1]; char name[MAX_IMAGE_NAME_SIZE + 1]; - /* Note that this actually includes all mappings, - * since we want stuff like [heap] - */ + /* + * Some anon maps have labels like + * [heap], [stack], [vdso], [vsyscall] ... + * Keep track of these labels. If a map has no name, call it "anon". + * Ignore all mappings starting with "/" (file or shared memory object) + */ strcpy(name, "anon"); ret = sscanf(buf, "%lx-%lx %20s %20s %20s %20s %20s", &start, &end, tmp, tmp, tmp, tmp, name); - if (ret < 6) + if (ret < 6 || name[0] == '/') continue; add_anon_mapping(trans, start, end, name);