This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]