Initialize the history counter type field in struct gmonparam as

threatened in rev.1.10 of usr.sbin/kgmon/kgmon.c more than 2 years ago.
kgmon has been recovering from the missing initialization for too
long, but the fixup there is ifdefed for i386's and shouldn't be
needed for other arches.
This commit is contained in:
Bruce Evans 2004-05-20 16:42:39 +00:00
parent d6617c93fd
commit c81d4a0396
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129501

View file

@ -178,8 +178,12 @@ kmstartup(dummy)
p->kcount = (HISTCOUNTER *)cp;
cp += p->kcountsize;
p->froms = (u_short *)cp;
p->histcounter_type = FUNCTION_ALIGNMENT / HISTFRACTION * NBBY;
#ifdef GUPROF
/* Signed counters. */
p->histcounter_type = -p->histcounter_type;
/* Initialize pointers to overhead counters. */
p->cputime_count = &KCOUNT(p, PC_TO_I(p, cputime));
p->mcount_count = &KCOUNT(p, PC_TO_I(p, mcount));