Lines Matching full:entry

23 		struct block_range *entry = rb_entry(rb, struct block_range, node);  in block_range__debug()  local
25 assert(old < entry->start); in block_range__debug()
26 assert(entry->start <= entry->end); /* single instruction block; jump to a jump */ in block_range__debug()
28 old = entry->end; in block_range__debug()
37 struct block_range *entry; in block_range__find() local
41 entry = rb_entry(parent, struct block_range, node); in block_range__find()
43 if (addr < entry->start) in block_range__find()
45 else if (addr > entry->end) in block_range__find()
48 return entry; in block_range__find()
85 struct block_range *next, *entry = NULL; in block_range__create() local
90 entry = rb_entry(parent, struct block_range, node); in block_range__create()
92 if (start < entry->start) in block_range__create()
94 else if (start > entry->end) in block_range__create()
105 if (!entry) /* tree empty */ in block_range__create()
112 if (entry->end < start) { in block_range__create()
143 entry = malloc(sizeof(struct block_range)); in block_range__create()
144 if (!entry) in block_range__create()
147 *entry = (struct block_range){ in block_range__create()
154 rb_link_node(&entry->node, parent, p); in block_range__create()
155 rb_insert_color(&entry->node, &block_ranges.root); in block_range__create()
158 iter.start = entry; in block_range__create()
159 iter.end = entry; in block_range__create()
166 if (entry->start < start) { /* split: [e->start...][start...] */ in block_range__create()
172 .start = entry->start, in block_range__create()
174 .is_target = entry->is_target, in block_range__create()
177 .coverage = entry->coverage, in block_range__create()
178 .entry = entry->entry, in block_range__create()
181 entry->start = start; in block_range__create()
182 entry->is_target = 1; in block_range__create()
183 entry->entry = 0; in block_range__create()
185 rb_link_left_of_node(&head->node, &entry->node); in block_range__create()
189 } else if (entry->start == start) in block_range__create()
190 entry->is_target = 1; in block_range__create()
192 iter.start = entry; in block_range__create()
199 entry = iter.start; in block_range__create()
202 * If @end is inside @entry, split. in block_range__create()
204 if (end < entry->end) { /* split: [...end][...e->end] */ in block_range__create()
211 .end = entry->end, in block_range__create()
213 .is_branch = entry->is_branch, in block_range__create()
215 .coverage = entry->coverage, in block_range__create()
216 .taken = entry->taken, in block_range__create()
217 .pred = entry->pred, in block_range__create()
220 entry->end = end; in block_range__create()
221 entry->is_branch = 1; in block_range__create()
222 entry->taken = 0; in block_range__create()
223 entry->pred = 0; in block_range__create()
225 rb_link_right_of_node(&tail->node, &entry->node); in block_range__create()
229 iter.end = entry; in block_range__create()
234 * If @end matches @entry, done in block_range__create()
236 if (end == entry->end) { in block_range__create()
237 entry->is_branch = 1; in block_range__create()
238 iter.end = entry; in block_range__create()
242 next = block_range__next(entry); in block_range__create()
247 * If @end is in beyond @entry but not inside @next, add tail. in block_range__create()
257 .start = entry->end + 1, in block_range__create()
263 rb_link_right_of_node(&tail->node, &entry->node); in block_range__create()
272 * If there is a hole between @entry and @next, fill it. in block_range__create()
274 if (entry->end + 1 != next->start) { in block_range__create()
280 .start = entry->end + 1, in block_range__create()
291 entry = next; in block_range__create()