perf annotate: Rename struct annotation_line::samples* to data*
The name 'samples*' is little confusing because we have nested 'struct sym_hist_entry' under annotation_line struct, which holds 'nr_samples' as well. Also the holding struct name is 'annotation_data' so the 'data' name fits better. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/20180804130521.11408-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
0683d13c1a
commit
c2f938ba5a
@@ -227,10 +227,10 @@ static int disasm__cmp(struct annotation_line *a, struct annotation_line *b)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < a->samples_nr; i++) {
|
||||
if (a->samples[i].percent == b->samples[i].percent)
|
||||
for (i = 0; i < a->data_nr; i++) {
|
||||
if (a->data[i].percent == b->data[i].percent)
|
||||
continue;
|
||||
return a->samples[i].percent < b->samples[i].percent;
|
||||
return a->data[i].percent < b->data[i].percent;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -314,8 +314,8 @@ static void annotate_browser__calc_percent(struct annotate_browser *browser,
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = 0; i < pos->al.samples_nr; i++) {
|
||||
struct annotation_data *sample = &pos->al.samples[i];
|
||||
for (i = 0; i < pos->al.data_nr; i++) {
|
||||
struct annotation_data *sample = &pos->al.data[i];
|
||||
|
||||
if (max_percent < sample->percent)
|
||||
max_percent = sample->percent;
|
||||
|
Reference in New Issue
Block a user