mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-20 23:35:02 +00:00
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:
parent
d6617c93fd
commit
c81d4a0396
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129501
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue