Lines Matching refs:p

130 	struct gmonparam *p = &_gmonparam;  in __utee_gprof_init()  local
145 p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER)); in __utee_gprof_init()
146 p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER)); in __utee_gprof_init()
147 p->textsize = p->highpc - p->lowpc; in __utee_gprof_init()
148 p->kcountsize = ROUNDUP(p->textsize / HISTFRACTION, sizeof(*p->froms)); in __utee_gprof_init()
149 p->hashfraction = HASHFRACTION; in __utee_gprof_init()
150 p->log_hashfraction = -1; in __utee_gprof_init()
160 p->log_hashfraction = __builtin_ffs(p->hashfraction * in __utee_gprof_init()
161 sizeof(*p->froms)) - 1; in __utee_gprof_init()
163 p->fromssize = p->textsize / HASHFRACTION; in __utee_gprof_init()
164 p->tolimit = p->textsize * ARCDENSITY / 100; in __utee_gprof_init()
165 if (p->tolimit < MINARCS) in __utee_gprof_init()
166 p->tolimit = MINARCS; in __utee_gprof_init()
167 else if (p->tolimit > MAXARCS) in __utee_gprof_init()
168 p->tolimit = MAXARCS; in __utee_gprof_init()
169 p->tossize = p->tolimit * sizeof(struct tostruct); in __utee_gprof_init()
171 bufsize = p->kcountsize + p->fromssize + p->tossize; in __utee_gprof_init()
180 p->tos = NULL; in __utee_gprof_init()
181 p->state = GMON_PROF_ERROR; in __utee_gprof_init()
185 p->tos = (struct tostruct *)cp; in __utee_gprof_init()
186 cp += p->tossize; in __utee_gprof_init()
187 p->kcount = (HISTCOUNTER *)cp; in __utee_gprof_init()
188 cp += p->kcountsize; in __utee_gprof_init()
189 p->froms = (ARCINDEX *)cp; in __utee_gprof_init()
191 p->tos[0].link = 0; in __utee_gprof_init()
193 if (p->kcountsize < p->textsize) in __utee_gprof_init()
194 _gprof_s_scale = ((float)p->kcountsize / p->textsize) * in __utee_gprof_init()
199 res = __pta_gprof_pc_sampling_start(p->kcount, p->kcountsize, in __utee_gprof_init()
200 p->lowpc + in __utee_gprof_init()
207 p->state = GMON_PROF_ON; in __utee_gprof_init()
335 struct gmonparam *p; in __mcount_internal() local
339 p = &_gmonparam; in __mcount_internal()
344 if (p->state != GMON_PROF_ON) in __mcount_internal()
346 p->state = GMON_PROF_BUSY; in __mcount_internal()
352 frompc -= p->lowpc; in __mcount_internal()
353 if (frompc > p->textsize) in __mcount_internal()
359 i = frompc >> p->log_hashfraction; in __mcount_internal()
361 i = frompc / (p->hashfraction * sizeof(*p->froms)); in __mcount_internal()
363 frompcindex = &p->froms[i]; in __mcount_internal()
367 toindex = ++p->tos[0].link; in __mcount_internal()
368 if (toindex >= p->tolimit) { in __mcount_internal()
374 top = &p->tos[toindex]; in __mcount_internal()
380 top = &p->tos[toindex]; in __mcount_internal()
400 toindex = ++p->tos[0].link; in __mcount_internal()
401 if (toindex >= p->tolimit) in __mcount_internal()
404 top = &p->tos[toindex]; in __mcount_internal()
415 top = &p->tos[top->link]; in __mcount_internal()
430 p->state = GMON_PROF_ON; in __mcount_internal()
433 p->state = GMON_PROF_ERROR; in __mcount_internal()