Skip to content

Commit c7282f2

Browse files
committed
perf symbols: Rename [sl]name_alloc to match the members they refer to
So we now have: dso->short_name dso->short_name_len dso->short_name_allocated Ditto for the 'long variants. To more quickly grasp what they refer to. Suggested-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-nu228f8vlp9w0lr7c0q77dqi@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent e90debd commit c7282f2

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎tools/perf/util/dso.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,9 +465,9 @@ void dso__delete(struct dso *dso)
465465
int i;
466466
for (i = 0; i < MAP__NR_TYPES; ++i)
467467
symbols__delete(&dso->symbols[i]);
468-
if (dso->sname_alloc)
468+
if (dso->short_name_allocated)
469469
free((char *)dso->short_name);
470-
if (dso->lname_alloc)
470+
if (dso->long_name_allocated)
471471
free(dso->long_name);
472472
dso_cache__free(&dso->cache);
473473
dso__free_a2l(dso);

‎tools/perf/util/dso.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ struct dso {
8989
u8 has_srcline:1;
9090
u8 hit:1;
9191
u8 annotate_warned:1;
92-
u8 sname_alloc:1;
93-
u8 lname_alloc:1;
92+
u8 short_name_allocated:1;
93+
u8 long_name_allocated:1;
9494
u8 sorted_by_name;
9595
u8 loaded;
9696
u8 rel;

‎tools/perf/util/machine.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg,
764764
goto out;
765765
}
766766
dso__set_long_name(map->dso, long_name);
767-
map->dso->lname_alloc = 1;
767+
map->dso->long_name_allocated = 1;
768768
dso__kernel_module_get_build_id(map->dso, "");
769769
}
770770
}
@@ -936,7 +936,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
936936
goto out_problem;
937937

938938
map->dso->short_name = name;
939-
map->dso->sname_alloc = 1;
939+
map->dso->short_name_allocated = 1;
940940
map->end = map->start + event->mmap.len;
941941
} else if (is_kernel_mmap) {
942942
const char *symbol_name = (event->mmap.filename +

‎tools/perf/util/symbol.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
14581458
if (filename != NULL) {
14591459
err = dso__load_vmlinux(dso, map, filename, filter);
14601460
if (err > 0) {
1461-
dso->lname_alloc = 1;
1461+
dso->long_name_allocated = 1;
14621462
goto out;
14631463
}
14641464
free(filename);
@@ -1468,7 +1468,7 @@ int dso__load_vmlinux_path(struct dso *dso, struct map *map,
14681468
err = dso__load_vmlinux(dso, map, vmlinux_path[i], filter);
14691469
if (err > 0) {
14701470
dso__set_long_name(dso, strdup(vmlinux_path[i]));
1471-
dso->lname_alloc = 1;
1471+
dso->long_name_allocated = 1;
14721472
break;
14731473
}
14741474
}
@@ -1612,7 +1612,7 @@ static int dso__load_kernel_sym(struct dso *dso, struct map *map,
16121612
if (err > 0) {
16131613
dso__set_long_name(dso,
16141614
strdup(symbol_conf.vmlinux_name));
1615-
dso->lname_alloc = 1;
1615+
dso->long_name_allocated = 1;
16161616
return err;
16171617
}
16181618
return err;

0 commit comments

Comments
 (0)