Lines Matching refs:branch

151 	if (notes->branch && notes->branch->cycles_hist) {
152 memset(notes->branch->cycles_hist, 0,
262 if (notes->branch == NULL)
263 notes->branch = zalloc(sizeof(*notes->branch));
265 return notes->branch;
271 struct annotated_branch *branch;
273 branch = annotation__get_branch(notes);
274 if (branch == NULL)
277 if (branch->cycles_hist == NULL) {
280 branch->cycles_hist = calloc(size, sizeof(struct cyc_hist));
283 return branch->cycles_hist;
410 static void annotated_branch__delete(struct annotated_branch *branch)
412 if (branch) {
413 zfree(&branch->cycles_hist);
414 free(branch);
426 struct annotated_branch *branch;
448 branch = annotation__get_branch(notes);
449 if (cover_insn && branch) {
450 branch->hit_cycles += ch->cycles;
451 branch->hit_insn += n_insn * ch->num;
452 branch->cover_insn += cover_insn;
462 if (!notes->branch || !notes->branch->cycles_hist)
465 notes->branch->total_insn = annotation__count_insn(notes, 0, size - 1);
466 notes->branch->hit_cycles = 0;
467 notes->branch->hit_insn = 0;
468 notes->branch->cover_insn = 0;
474 ch = &notes->branch->cycles_hist[offset];
498 struct cyc_hist *ch = &notes->branch->cycles_hist[offset];
530 annotated_branch__delete(notes->branch);
639 struct block_range *branch = br;
643 * Find matching branch to our target.
645 while (!branch->is_branch)
646 branch = block_range__next(branch);
648 p = 100 *(double)br->entry / branch->coverage;
658 * to the next branch.
674 * The percentage of coverage leaving at this branch, and
1651 struct annotated_branch *branch = annotation__get_branch(notes);
1653 if (branch && branch->hit_cycles)
1654 ipc = branch->hit_insn / ((double)branch->hit_cycles);
1656 if (branch && branch->total_insn) {
1657 coverage = branch->cover_insn * 100.0 /
1658 ((double)branch->total_insn);
1683 if (notes->branch && al->cycles) {
1720 if (notes->branch) {