if (src == NULL)
                return;
        zfree(&src->histograms);
-       zfree(&src->cycles_hist);
        free(src);
 }
 
        return src->histograms ? 0 : -1;
 }
 
-/* The cycles histogram is lazily allocated. */
-static int symbol__alloc_hist_cycles(struct symbol *sym)
-{
-       struct annotation *notes = symbol__annotation(sym);
-       const size_t size = symbol__size(sym);
-
-       notes->src->cycles_hist = calloc(size, sizeof(struct cyc_hist));
-       if (notes->src->cycles_hist == NULL)
-               return -1;
-       return 0;
-}
-
 void symbol__annotate_zero_histograms(struct symbol *sym)
 {
        struct annotation *notes = symbol__annotation(sym);
        if (notes->src != NULL) {
                memset(notes->src->histograms, 0,
                       notes->src->nr_histograms * notes->src->sizeof_sym_hist);
-               if (notes->src->cycles_hist)
-                       memset(notes->src->cycles_hist, 0,
-                               symbol__size(sym) * sizeof(struct cyc_hist));
+       }
+       if (notes->branch && notes->branch->cycles_hist) {
+               memset(notes->branch->cycles_hist, 0,
+                      symbol__size(sym) * sizeof(struct cyc_hist));
        }
        annotation__unlock(notes);
 }
        return 0;
 }
 
+static struct annotated_branch *annotation__get_branch(struct annotation *notes)
+{
+       if (notes == NULL)
+               return NULL;
+
+       if (notes->branch == NULL)
+               notes->branch = zalloc(sizeof(*notes->branch));
+
+       return notes->branch;
+}
+
 static struct cyc_hist *symbol__cycles_hist(struct symbol *sym)
 {
        struct annotation *notes = symbol__annotation(sym);
+       struct annotated_branch *branch;
 
-       if (notes->src == NULL) {
-               notes->src = annotated_source__new();
-               if (notes->src == NULL)
-                       return NULL;
-               goto alloc_cycles_hist;
-       }
+       branch = annotation__get_branch(notes);
+       if (branch == NULL)
+               return NULL;
+
+       if (branch->cycles_hist == NULL) {
+               const size_t size = symbol__size(sym);
 
-       if (!notes->src->cycles_hist) {
-alloc_cycles_hist:
-               symbol__alloc_hist_cycles(sym);
+               branch->cycles_hist = calloc(size, sizeof(struct cyc_hist));
        }
 
-       return notes->src->cycles_hist;
+       return branch->cycles_hist;
 }
 
 struct annotated_source *symbol__hists(struct symbol *sym, int nr_hists)
        return n_insn;
 }
 
+static void annotated_branch__delete(struct annotated_branch *branch)
+{
+       if (branch) {
+               zfree(&branch->cycles_hist);
+               free(branch);
+       }
+}
+
 static void annotation__count_and_fill(struct annotation *notes, u64 start, u64 end, struct cyc_hist *ch)
 {
        unsigned n_insn;
 
        n_insn = annotation__count_insn(notes, start, end);
        if (n_insn && ch->num && ch->cycles) {
+               struct annotated_branch *branch;
                float ipc = n_insn / ((double)ch->cycles / (double)ch->num);
 
                /* Hide data when there are too many overlaps. */
                        }
                }
 
-               if (cover_insn) {
-                       notes->hit_cycles += ch->cycles;
-                       notes->hit_insn += n_insn * ch->num;
-                       notes->cover_insn += cover_insn;
+               branch = annotation__get_branch(notes);
+               if (cover_insn && branch) {
+                       branch->hit_cycles += ch->cycles;
+                       branch->hit_insn += n_insn * ch->num;
+                       branch->cover_insn += cover_insn;
                }
        }
 }
        int err = 0;
        s64 offset;
 
-       if (!notes->src || !notes->src->cycles_hist)
+       if (!notes->branch || !notes->branch->cycles_hist)
                return 0;
 
-       notes->total_insn = annotation__count_insn(notes, 0, size - 1);
-       notes->hit_cycles = 0;
-       notes->hit_insn = 0;
-       notes->cover_insn = 0;
+       notes->branch->total_insn = annotation__count_insn(notes, 0, size - 1);
+       notes->branch->hit_cycles = 0;
+       notes->branch->hit_insn = 0;
+       notes->branch->cover_insn = 0;
 
        annotation__lock(notes);
        for (offset = size - 1; offset >= 0; --offset) {
                struct cyc_hist *ch;
 
-               ch = ¬es->src->cycles_hist[offset];
+               ch = ¬es->branch->cycles_hist[offset];
                if (ch && ch->cycles) {
                        struct annotation_line *al;
 
                                al->cycles->max = ch->cycles_max;
                                al->cycles->min = ch->cycles_min;
                        }
-                       notes->have_cycles = true;
                }
        }
 
        if (err) {
                while (++offset < (s64)size) {
-                       struct cyc_hist *ch = ¬es->src->cycles_hist[offset];
+                       struct cyc_hist *ch = ¬es->branch->cycles_hist[offset];
 
                        if (ch && ch->cycles) {
                                struct annotation_line *al = notes->offsets[offset];
 void annotation__exit(struct annotation *notes)
 {
        annotated_source__delete(notes->src);
+       annotated_branch__delete(notes->branch);
 }
 
 static struct sharded_mutex *sharded_mutex;
 static void ipc_coverage_string(char *bf, int size, struct annotation *notes)
 {
        double ipc = 0.0, coverage = 0.0;
+       struct annotated_branch *branch = annotation__get_branch(notes);
 
-       if (notes->hit_cycles)
-               ipc = notes->hit_insn / ((double)notes->hit_cycles);
+       if (branch && branch->hit_cycles)
+               ipc = branch->hit_insn / ((double)branch->hit_cycles);
 
-       if (notes->total_insn) {
-               coverage = notes->cover_insn * 100.0 /
-                       ((double)notes->total_insn);
+       if (branch && branch->total_insn) {
+               coverage = branch->cover_insn * 100.0 /
+                       ((double)branch->total_insn);
        }
 
        scnprintf(bf, size, "(Average IPC: %.2f, IPC Coverage: %.1f%%)",
        int printed;
 
        if (first_line && (al->offset == -1 || percent_max == 0.0)) {
-               if (notes->have_cycles && al->cycles) {
+               if (notes->branch && al->cycles) {
                        if (al->cycles->ipc == 0.0 && al->cycles->avg == 0)
                                show_title = true;
                } else
                }
        }
 
-       if (notes->have_cycles) {
+       if (notes->branch) {
                if (al->cycles && al->cycles->ipc)
                        obj__printf(obj, "%*.2f ", ANNOTATION__IPC_WIDTH - 1, al->cycles->ipc);
                else if (!show_title)