Lines Matching refs:src
758 struct annotated_source *src = zalloc(sizeof(*src));
760 if (src != NULL)
761 INIT_LIST_HEAD(&src->source);
763 return src;
766 static __maybe_unused void annotated_source__delete(struct annotated_source *src)
768 if (src == NULL)
770 zfree(&src->histograms);
771 zfree(&src->cycles_hist);
772 free(src);
775 static int annotated_source__alloc_histograms(struct annotated_source *src,
800 src->sizeof_sym_hist = sizeof_sym_hist;
801 src->nr_histograms = nr_hists;
802 src->histograms = calloc(nr_hists, sizeof_sym_hist) ;
803 return src->histograms ? 0 : -1;
812 notes->src->cycles_hist = calloc(size, sizeof(struct cyc_hist));
813 if (notes->src->cycles_hist == NULL)
823 if (notes->src != NULL) {
824 memset(notes->src->histograms, 0,
825 notes->src->nr_histograms * notes->src->sizeof_sym_hist);
826 if (notes->src->cycles_hist)
827 memset(notes->src->cycles_hist, 0,
884 struct annotated_source *src, int evidx, u64 addr,
901 h = annotated_source__histogram(src, evidx);
923 if (notes->src == NULL) {
924 notes->src = annotated_source__new();
925 if (notes->src == NULL)
930 if (!notes->src->cycles_hist) {
935 return notes->src->cycles_hist;
942 if (notes->src == NULL) {
943 notes->src = annotated_source__new();
944 if (notes->src == NULL)
949 if (notes->src->histograms == NULL) {
951 annotated_source__alloc_histograms(notes->src, symbol__size(sym),
955 return notes->src;
963 struct annotated_source *src;
967 src = symbol__hists(sym, evsel->evlist->core.nr_entries);
968 return src ? __symbol__inc_addr_samples(ms, src, evsel->idx, addr, sample) : 0;
1079 if (!notes->src || !notes->src->cycles_hist)
1091 ch = ¬es->src->cycles_hist[offset];
1401 list_for_each_entry_from(queue, ¬es->src->source, node) {
1546 annotation_line__add(&dl->al, ¬es->src->source);
1559 struct list_head *list = ¬es->src->source;
1818 ¬es->src->source);
1828 annotation_line__add(&dl->al, ¬es->src->source);
1861 annotation_line__add(&dl->al, ¬es->src->source);
1874 size_t i, src, dst, len, new_storage_len, num_tabs;
1898 * Copy regions starting at src and expand tabs. If there are two
1899 * adjacent tabs then 'src == i', the memcpy is of size 0 and the spaces
1902 for (i = 0, src = 0, dst = 0; i < line_len && num_tabs; i++) {
1904 len = i - src;
1905 memcpy(&new_line[dst], &line[src], len);
1910 src = i + 1;
1916 len = line_len - src;
1917 memcpy(&new_line[dst], &line[src], len);
2143 list_for_each_entry(al, ¬es->src->source, node) {
2150 next = annotation_line__next(al, ¬es->src->source);
2417 addr_fmt_width = annotated_source__addr_fmt_width(¬es->src->source, start);
2419 list_for_each_entry(pos, ¬es->src->source, node) {
2521 list_for_each_entry(al, ¬es->src->source, node) {
2569 memset(h, 0, notes->src->sizeof_sym_hist);
2672 list_for_each_entry(al, ¬es->src->source, node) {
2708 list_for_each_entry(al, ¬es->src->source, node) {
2749 list_for_each_entry(al, ¬es->src->source, node) {
2805 annotated_source__purge(symbol__annotation(sym)->src);
2830 annotated_source__purge(symbol__annotation(sym)->src);