• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/processor-trace/libipt/src/

Lines Matching defs:lru

207 static int pt_iscache_lru_free(struct pt_iscache_lru_entry *lru)
209 while (lru) {
213 trash = lru;
214 lru = lru->next;
229 struct pt_iscache_lru_entry *lru, **pnext;
238 pnext = &iscache->lru;
239 for (lru = *pnext; lru; pnext = &lru->next, lru = *pnext) {
241 used += lru->size;
245 /* The cache got too big; prune it starting from @lru. */
246 iscache->used = used - lru->size;
248 *tail = lru;
257 /* Add @section to the front of @iscache->lru.
266 struct pt_iscache_lru_entry *lru;
288 lru = malloc(sizeof(*lru));
289 if (!lru) {
294 lru->section = section;
295 lru->size = memsize;
297 lru->next = iscache->lru;
298 iscache->lru = lru;
310 /* Add or move @section to the front of @iscache->lru.
319 struct pt_iscache_lru_entry *lru, **pnext;
324 pnext = &iscache->lru;
325 for (lru = *pnext; lru; pnext = &lru->next, lru = *pnext) {
327 if (lru->section != section)
331 *pnext = lru->next;
332 lru->next = iscache->lru;
333 iscache->lru = lru;
343 /* Remove @section from @iscache->lru.
350 struct pt_iscache_lru_entry *lru, **pnext;
355 pnext = &iscache->lru;
356 for (lru = *pnext; lru; pnext = &lru->next, lru = *pnext) {
358 if (lru->section != section)
362 *pnext = lru->next;
363 lru->next = NULL;
367 return pt_iscache_lru_free(lru);
371 /* Add or move @section to the front of @iscache->lru and update its size.
380 struct pt_iscache_lru_entry *lru;
391 lru = iscache->lru;
392 if (!lru) {
402 if (lru->section != section) {
409 oldsize = lru->size;
410 lru->size = memsize;
425 /* Clear @iscache->lru.
433 struct pt_iscache_lru_entry *lru;
440 lru = iscache->lru;
441 iscache->lru = NULL;
448 return pt_iscache_lru_free(lru);
641 * We further need to remove @section from @iscache->lru.
674 * may have added @section to @iscache->lru.
814 struct pt_iscache_lru_entry *lru;
828 lru = iscache->lru;
833 iscache->lru = NULL;
840 errcode = pt_iscache_lru_free(lru);