• Home
  • Raw
  • Download

Lines Matching full:al

1005 			struct annotation_line *al = notes->offsets[offset];  in annotation__count_and_fill()  local
1007 if (al) in annotation__count_and_fill()
1008 al->ipc = ipc; in annotation__count_and_fill()
1026 struct annotation_line *al; in annotation__compute_ipc() local
1030 al = notes->offsets[offset]; in annotation__compute_ipc()
1031 if (al && ch->num_aggr) { in annotation__compute_ipc()
1032 al->cycles = ch->cycles_aggr / ch->num_aggr; in annotation__compute_ipc()
1033 al->cycles_max = ch->cycles_max; in annotation__compute_ipc()
1034 al->cycles_min = ch->cycles_min; in annotation__compute_ipc()
1104 static void annotation_line__delete(struct annotation_line *al) in annotation_line__delete() argument
1106 void *ptr = (void *) al - al->privsize; in annotation_line__delete()
1108 free_srcline(al->path); in annotation_line__delete()
1109 zfree(&al->line); in annotation_line__delete()
1127 struct annotation_line *al; in annotation_line__new() local
1129 size_t size = privsize + sizeof(*al); in annotation_line__new()
1135 size += sizeof(al->data[0]) * nr; in annotation_line__new()
1137 al = zalloc(size); in annotation_line__new()
1138 if (al) { in annotation_line__new()
1139 al = (void *) al + privsize; in annotation_line__new()
1140 al->privsize = privsize; in annotation_line__new()
1141 al->offset = args->offset; in annotation_line__new()
1142 al->line = strdup(args->line); in annotation_line__new()
1143 al->line_nr = args->line_nr; in annotation_line__new()
1144 al->data_nr = nr; in annotation_line__new()
1147 return al; in annotation_line__new()
1165 struct annotation_line *al; in disasm_line__new() local
1166 size_t privsize = args->privsize + offsetof(struct disasm_line, al); in disasm_line__new()
1168 al = annotation_line__new(args, privsize); in disasm_line__new()
1169 if (al != NULL) { in disasm_line__new()
1170 dl = disasm_line(al); in disasm_line__new()
1172 if (dl->al.line == NULL) in disasm_line__new()
1176 if (disasm_line__parse(dl->al.line, &dl->ins.name, &dl->ops.raw) < 0) in disasm_line__new()
1186 zfree(&dl->al.line); in disasm_line__new()
1200 annotation_line__delete(&dl->al); in disasm_line__free()
1211 static void annotation_line__add(struct annotation_line *al, struct list_head *head) in annotation_line__add() argument
1213 list_add_tail(&al->node, head); in annotation_line__add()
1310 s64 offset = dl->al.offset; in disasm_line__print()
1316 color_fprintf(stdout, annotate__asm_color(br), "%s", dl->al.line); in disasm_line__print()
1322 annotation_line__print(struct annotation_line *al, struct symbol *sym, u64 start, in annotation_line__print() argument
1327 struct disasm_line *dl = container_of(al, struct disasm_line, al); in annotation_line__print()
1331 if (al->offset != -1) { in annotation_line__print()
1337 for (i = 0; i < al->data_nr; i++) { in annotation_line__print()
1340 percent = annotation_data__percent(&al->data[i], in annotation_line__print()
1347 if (al->data_nr > nr_percent) in annotation_line__print()
1348 nr_percent = al->data_nr; in annotation_line__print()
1358 if (queue == al) in annotation_line__print()
1373 if (al->path) { in annotation_line__print()
1374 if (!prev_line || strcmp(prev_line, al->path) in annotation_line__print()
1376 color_fprintf(stdout, color, " %s", al->path); in annotation_line__print()
1377 prev_line = al->path; in annotation_line__print()
1383 struct annotation_data *data = &al->data[i]; in annotation_line__print()
1414 if (!*al->line) in annotation_line__print()
1417 printf(" %*s: %*s %s\n", width, " ", addr_fmt_width, " ", al->line); in annotation_line__print()
1521 annotation_line__add(&dl->al, &notes->src->source); in symbol__parse_objdump_line()
1538 dl = list_entry(list->prev, struct disasm_line, al.node); in delete_last_nop()
1544 if (!strstr(dl->al.line, " nop ") && in delete_last_nop()
1545 !strstr(dl->al.line, " nopl ") && in delete_last_nop()
1546 !strstr(dl->al.line, " nopw ")) in delete_last_nop()
1550 list_del(&dl->al.node); in delete_last_nop()
1822 struct annotation_line *al, *next; in annotation__calc_percent() local
1825 list_for_each_entry(al, &notes->src->source, node) { in annotation__calc_percent()
1829 if (al->offset == -1) in annotation__calc_percent()
1832 next = annotation_line__next(al, &notes->src->source); in annotation__calc_percent()
1840 BUG_ON(i >= al->data_nr); in annotation__calc_percent()
1843 data = &al->data[i++]; in annotation__calc_percent()
1845 calc_percent(sym_hist, hists, data, al->offset, end); in annotation__calc_percent()
1898 static void insert_source_line(struct rb_root *root, struct annotation_line *al, in insert_source_line() argument
1910 ret = strcmp(iter->path, al->path); in insert_source_line()
1912 for (i = 0; i < al->data_nr; i++) { in insert_source_line()
1913 iter->data[i].percent_sum += annotation_data__percent(&al->data[i], in insert_source_line()
1925 for (i = 0; i < al->data_nr; i++) { in insert_source_line()
1926 al->data[i].percent_sum = annotation_data__percent(&al->data[i], in insert_source_line()
1930 rb_link_node(&al->rb_node, parent, p); in insert_source_line()
1931 rb_insert_color(&al->rb_node, root); in insert_source_line()
1947 static void __resort_source_line(struct rb_root *root, struct annotation_line *al) in __resort_source_line() argument
1957 if (cmp_source_line(al, iter)) in __resort_source_line()
1963 rb_link_node(&al->rb_node, parent, p); in __resort_source_line()
1964 rb_insert_color(&al->rb_node, root); in __resort_source_line()
1969 struct annotation_line *al; in resort_source_line() local
1976 al = rb_entry(node, struct annotation_line, rb_node); in resort_source_line()
1980 __resort_source_line(dest_root, al); in resort_source_line()
1987 struct annotation_line *al; in print_summary() local
2005 al = rb_entry(node, struct annotation_line, rb_node); in print_summary()
2006 for (i = 0; i < al->data_nr; i++) { in print_summary()
2007 percent = al->data[i].percent_sum; in print_summary()
2015 path = al->path; in print_summary()
2201 struct annotation_line *al; in symbol__annotate_fprintf2() local
2203 list_for_each_entry(al, &notes->src->source, node) { in symbol__annotate_fprintf2()
2204 if (annotation_line__filter(al, notes)) in symbol__annotate_fprintf2()
2206 annotation_line__write(al, notes, &wops, opts); in symbol__annotate_fprintf2()
2269 struct annotation_line *al, *n; in annotated_source__purge() local
2271 list_for_each_entry_safe(al, n, &as->source, node) { in annotated_source__purge()
2272 list_del(&al->node); in annotated_source__purge()
2273 disasm_line__free(disasm_line(al)); in annotated_source__purge()
2281 if (dl->al.offset == -1) in disasm_line__fprintf()
2282 return fprintf(fp, "%s\n", dl->al.line); in disasm_line__fprintf()
2284 printed = fprintf(fp, "%#" PRIx64 " %s", dl->al.offset, dl->ins.name); in disasm_line__fprintf()
2299 list_for_each_entry(pos, head, al.node) in disasm__fprintf()
2324 struct annotation_line *al = notes->offsets[offset]; in annotation__mark_jump_targets() local
2327 dl = disasm_line(al); in annotation__mark_jump_targets()
2332 al = notes->offsets[dl->ops.target.offset]; in annotation__mark_jump_targets()
2338 if (al == NULL) in annotation__mark_jump_targets()
2341 if (++al->jump_sources > notes->max_jump_sources) in annotation__mark_jump_targets()
2342 notes->max_jump_sources = al->jump_sources; in annotation__mark_jump_targets()
2350 struct annotation_line *al; in annotation__set_offsets() local
2354 list_for_each_entry(al, &notes->src->source, node) { in annotation__set_offsets()
2355 size_t line_len = strlen(al->line); in annotation__set_offsets()
2359 al->idx = notes->nr_entries++; in annotation__set_offsets()
2360 if (al->offset != -1) { in annotation__set_offsets()
2361 al->idx_asm = notes->nr_asm_entries++; in annotation__set_offsets()
2369 if (al->offset < size) in annotation__set_offsets()
2370 notes->offsets[al->offset] = al; in annotation__set_offsets()
2372 al->idx_asm = -1; in annotation__set_offsets()
2410 struct annotation_line *al; in annotation__calc_lines() local
2413 list_for_each_entry(al, &notes->src->source, node) { in annotation__calc_lines()
2417 for (i = 0; i < al->data_nr; i++) { in annotation__calc_lines()
2420 percent = annotation_data__percent(&al->data[i], in annotation__calc_lines()
2430 al->path = get_srcline(map->dso, notes->start + al->offset, NULL, in annotation__calc_lines()
2431 false, true, notes->start + al->offset); in annotation__calc_lines()
2432 insert_source_line(&tmp_root, al, opts); in annotation__calc_lines()
2506 static double annotation_line__max_percent(struct annotation_line *al, in annotation_line__max_percent() argument
2516 percent = annotation_data__percent(&al->data[i], in annotation_line__max_percent()
2537 fwd = dl->ops.target.offset > dl->al.offset; in disasm_line__write()
2557 static void __annotation_line__write(struct annotation_line *al, struct annotation *notes, in __annotation_line__write() argument
2567 double percent_max = annotation_line__max_percent(al, notes, percent_type); in __annotation_line__write()
2574 if (first_line && (al->offset == -1 || percent_max == 0.0)) { in __annotation_line__write()
2576 if (al->ipc == 0.0 && al->cycles == 0) in __annotation_line__write()
2582 if (al->offset != -1 && percent_max != 0.0) { in __annotation_line__write()
2588 percent = annotation_data__percent(&al->data[i], percent_type); in __annotation_line__write()
2592 obj__printf(obj, "%11" PRIu64 " ", al->data[i].he.period); in __annotation_line__write()
2595 al->data[i].he.nr_samples); in __annotation_line__write()
2613 if (al->ipc) in __annotation_line__write()
2614 obj__printf(obj, "%*.2f ", ANNOTATION__IPC_WIDTH - 1, al->ipc); in __annotation_line__write()
2621 if (al->cycles) in __annotation_line__write()
2623 ANNOTATION__CYCLES_WIDTH - 1, al->cycles); in __annotation_line__write()
2632 if (al->cycles) { in __annotation_line__write()
2637 al->cycles, al->cycles_min, in __annotation_line__write()
2638 al->cycles_max); in __annotation_line__write()
2656 if (!*al->line) in __annotation_line__write()
2658 else if (al->offset == -1) { in __annotation_line__write()
2659 if (al->line_nr && notes->options->show_linenr) in __annotation_line__write()
2660 printed = scnprintf(bf, sizeof(bf), "%-*d ", notes->widths.addr + 1, al->line_nr); in __annotation_line__write()
2664 obj__printf(obj, "%-*s", width - printed - pcnt_width - cycles_width + 1, al->line); in __annotation_line__write()
2666 u64 addr = al->offset; in __annotation_line__write()
2675 if (al->jump_sources && in __annotation_line__write()
2681 al->jump_sources); in __annotation_line__write()
2682 prev = obj__set_jumps_percent_color(obj, al->jump_sources, in __annotation_line__write()
2690 } else if (ins__is_call(&disasm_line(al)->ins) && in __annotation_line__write()
2707 disasm_line__write(disasm_line(al), notes, obj, bf, sizeof(bf), obj__printf, obj__write_graph); in __annotation_line__write()
2714 void annotation_line__write(struct annotation_line *al, struct annotation *notes, in annotation_line__write() argument
2718 __annotation_line__write(al, notes, wops->first_line, wops->current_entry, in annotation_line__write()