Lines Matching defs:pf

35 #define PFHASH(pf)	((pf)->data.data.hash)
36 #define PFVM(pf) ((pf)->data.data.vm)
37 #define PFFILE(pf) ((pf)->data.data.fm.file)
38 #define PFLINE(pf) ((pf)->line)
39 #define PFNAME(pf) ((pf)->data.f)
40 #define PFNALLOC(pf) ((pf)->data.data.nalloc)
41 #define PFALLOC(pf) ((pf)->data.data.alloc)
42 #define PFNFREE(pf) ((pf)->data.data.nfree)
43 #define PFFREE(pf) ((pf)->data.data.free)
44 #define PFREGION(pf) ((pf)->data.data.region)
45 #define PFMAX(pf) ((pf)->data.data.fm.max)
84 reg Pfobj_t *pf, *last;
105 for(last = NIL(Pfobj_t*), pf = Pftable[n]; pf; last = pf, pf = pf->next)
106 if(PFLINE(pf) == line && PFVM(pf) == vm && strcmp(PFFILE(pf),file) == 0)
110 if(!pf)
157 if(!(pf = (Pfobj_t*)vmalloc(Vmpf,sizeof(Pfobj_t))) )
160 pf->next = Pftable[n];
161 Pftable[n] = pf;
162 PFLINE(pf) = line;
163 PFFILE(pf) = PFNAME(fn);
164 PFREGION(pf) = pfvm;
165 PFVM(pf) = vm;
166 PFNALLOC(pf) = 0;
167 PFALLOC(pf) = 0;
168 PFNFREE(pf) = 0;
169 PFFREE(pf) = 0;
170 PFHASH(pf) = h;
173 { last->next = pf->next;
174 pf->next = Pftable[n];
175 Pftable[n] = pf;
178 return pf;
189 reg Pfobj_t *pf, *next, *last;
193 { for(last = NIL(Pfobj_t*), pf = Pftable[n]; pf; )
194 { next = pf->next;
196 if(PFLINE(pf) >= 0 && PFVM(pf) == vm)
200 vmfree(Vmpf,pf);
202 else last = pf;
204 pf = next;
220 reg Pfobj_t* pf;
231 if((pf = pfsearch(vm,file,line)) )
232 { PFALLOC(pf) += size;
233 PFNALLOC(pf) += 1;
235 PFOBJ(data) = pf;
238 if(pf)
240 pf = PFREGION(pf);
241 PFALLOC(pf) += size;
242 PFNALLOC(pf) += 1;
243 if((s = PFALLOC(pf) - PFFREE(pf)) > PFMAX(pf) )
244 PFMAX(pf) = s;
250 static Pfobj_t* pfsort(Pfobj_t* pf)
252 static Pfobj_t* pfsort(pf)
253 Pfobj_t* pf;
259 if(!pf->next)
260 return pf;
264 while(pf)
265 { next = pf->next;
266 pf->next = one;
267 one = pf;
269 if((pf = next) )
270 { next = pf->next;
271 pf->next = two;
272 two = pf;
273 pf = next;
280 for(pf = next = NIL(Pfobj_t*);; )
295 { if(!pf)
296 pf = one;
302 return pf;
306 { if(!pf)
307 pf = two;
313 return pf;
361 reg Pfobj_t *pf, *list, *next, *last;
380 { for(pf = Pftable[n], last = NIL(Pfobj_t*); pf; )
381 { next = pf->next;
383 if(PFLINE(pf) < 0 || (vm && vm != PFVM(pf)) )
384 { last = pf;
394 pf->next = list;
395 list = pf;
396 nalloc += PFNALLOC(pf);
397 alloc += PFALLOC(pf);
398 nfree += PFNFREE(pf);
399 free += PFFREE(pf);
402 pf = next;
411 for(pf = Pftable[PFTABLE]; pf; pf = pf->next)
412 { if(vm && PFVM(pf) != vm)
415 for(seg = PFVM(pf)->data->seg; seg; seg = seg->next)
418 bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(PFVM(pf)),0), ':');
419 bufp = pfsummary(bufp,PFNALLOC(pf),PFALLOC(pf),
420 PFNFREE(pf),PFFREE(pf),PFMAX(pf),alloc);
425 for(pf = list; pf; )
428 for(last = pf; last; last = last->next)
429 { if(strcmp(PFFILE(last),PFFILE(pf)) != 0)
431 nalloc += PFNALLOC(pf);
438 bufp = (*_Vmstrcpy)(bufp,PFFILE(pf)[0] ? PFFILE(pf) : "<>" ,':');
441 while(pf != last) /* detailed data */
444 bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(PFLINE(pf),-1), ':');
446 bufp = (*_Vmstrcpy)(bufp, (*_Vmitoa)(VLONG(PFVM(pf)),0), ':');
447 bufp = pfsummary(bufp,PFNALLOC(pf),PFALLOC(pf),
448 PFNFREE(pf),PFFREE(pf),0,0);
451 next = pf->next;
452 n = (int)(PFHASH(pf)%PFTABLE);
453 pf->next = Pftable[n];
454 Pftable[n] = pf;
455 pf = next;
514 reg Pfobj_t* pf;
544 pf = PFOBJ(data);
546 if(pf)
547 { PFNFREE(pf) += 1;
548 PFFREE(pf) += s;
549 pf = PFREGION(pf);
550 PFNFREE(pf) += 1;
551 PFFREE(pf) += s;
576 reg Pfobj_t* pf;
616 pf = PFOBJ(data);
621 { if(pf)
622 { PFFREE(pf) += s;
623 PFNFREE(pf) += 1;
624 pf = PFREGION(pf);
625 PFFREE(pf) += s;
626 PFNFREE(pf) += 1;
635 else if(pf) /* reset old info */
636 { PFALLOC(pf) -= s;
637 PFNALLOC(pf) -= 1;
638 pf = PFREGION(pf);
639 PFALLOC(pf) -= s;
640 PFNALLOC(pf) -= 1;
641 file = PFFILE(pf);
642 line = PFLINE(pf);