Lines Matching refs:cpr
28 struct call_path_root *cpr;
30 cpr = zalloc(sizeof(struct call_path_root));
31 if (!cpr)
33 call_path__init(&cpr->call_path, NULL, NULL, 0, false);
34 INIT_LIST_HEAD(&cpr->blocks);
35 return cpr;
38 void call_path_root__free(struct call_path_root *cpr)
42 list_for_each_entry_safe(pos, n, &cpr->blocks, node) {
46 free(cpr);
49 static struct call_path *call_path__new(struct call_path_root *cpr,
58 if (cpr->next < cpr->sz) {
59 cpb = list_last_entry(&cpr->blocks, struct call_path_block,
65 list_add_tail(&cpb->node, &cpr->blocks);
66 cpr->sz += CALL_PATH_BLOCK_SIZE;
69 n = cpr->next++ & CALL_PATH_BLOCK_MASK;
77 struct call_path *call_path__findnew(struct call_path_root *cpr,
90 return call_path__new(cpr, parent, sym, ip, in_kernel);
106 cp = call_path__new(cpr, parent, sym, ip, in_kernel);