This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] Fix profiling on hppa (1/2)
- From: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 19 Feb 2004 23:14:00 -0500
- Subject: [PATCH] Fix profiling on hppa (1/2)
libc-alpha,
Fixes gprof for hppa. This requires some changes to generic code in
order to get alignment correct.
Tested on i386, hppa.
Thanks,
c.
2003-11-15 Randolph Chung <tausq@debian.org>
* gmon/gmon.c (__monstartup): Round kcountsize to multiples of
the froms[] array so the array is properly aligned.
--- libc-orig/gmon/gmon.c 2003-09-04 10:20:46.000000000 -0400
+++ libc/gmon/gmon.c 2003-12-15 00:38:40.000000000 -0500
@@ -114,7 +114,7 @@
p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->textsize = p->highpc - p->lowpc;
- p->kcountsize = p->textsize / HISTFRACTION;
+ p->kcountsize = ROUNDUP(p->textsize / HISTFRACTION, sizeof(*p->froms));
p->hashfraction = HASHFRACTION;
p->log_hashfraction = -1;
/* The following test must be kept in sync with the corresponding