lkml.org 
[lkml]   [2019]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 perf,bpf 12/15] perf, bpf: enable annotation of bpf program
On Thu, Mar 07, 2019 at 09:58:07AM -0800, Song Liu wrote:

SNIP

> + if (linfo && btf) {
> + srcline = btf__name_by_offset(btf, linfo->line_off);
> + nr_skip++;
> + } else
> + srcline = NULL;
> +
> + fprintf(s, "\n");
> + prev_buf_size = buf_size;
> + fflush(s);
> +
> + if (!opts->hide_src_code && srcline) {
> + args->offset = -1;
> + args->line = strdup(srcline);
> + args->line_nr = 0;
> + args->ms.sym = sym;
> + dl = disasm_line__new(args);
> + if (dl) {
> + annotation_line__add(&dl->al,
> + &notes->src->source);
> + }
> + }

I still miss answer for why is the line added twice for
!opts->hide_src_code && srcline ? code up and down

jirka

> +
> + args->offset = pc;
> + args->line = buf + prev_buf_size;
> + args->line_nr = 0;
> + args->ms.sym = sym;
> + dl = disasm_line__new(args);
> + if (dl)
> + annotation_line__add(&dl->al, &notes->src->source);
> +
> + pc += count;
> + } while (count > 0 && pc < len);

SNIP

\
 
 \ /
  Last update: 2019-03-11 18:57    [W:0.456 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site