summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-python.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index 8aa301948de5..c2caa5720299 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -393,10 +393,10 @@ static const char *get_dsoname(struct map *map)
struct dso *dso = map ? map__dso(map) : NULL;
if (dso) {
- if (symbol_conf.show_kernel_path && dso->long_name)
- dsoname = dso->long_name;
+ if (symbol_conf.show_kernel_path && dso__long_name(dso))
+ dsoname = dso__long_name(dso);
else
- dsoname = dso->name;
+ dsoname = dso__name(dso);
}
return dsoname;
@@ -799,8 +799,9 @@ static void set_sym_in_dict(PyObject *dict, struct addr_location *al,
if (al->map) {
struct dso *dso = map__dso(al->map);
- pydict_set_item_string_decref(dict, dso_field, _PyUnicode_FromString(dso->name));
- build_id__sprintf(&dso->bid, sbuild_id);
+ pydict_set_item_string_decref(dict, dso_field,
+ _PyUnicode_FromString(dso__name(dso)));
+ build_id__sprintf(dso__bid(dso), sbuild_id);
pydict_set_item_string_decref(dict, dso_bid_field,
_PyUnicode_FromString(sbuild_id));
pydict_set_item_string_decref(dict, dso_map_start,
@@ -1246,14 +1247,14 @@ static int python_export_dso(struct db_export *dbe, struct dso *dso,
char sbuild_id[SBUILD_ID_SIZE];
PyObject *t;
- build_id__sprintf(&dso->bid, sbuild_id);
+ build_id__sprintf(dso__bid(dso), sbuild_id);
t = tuple_new(5);
- tuple_set_d64(t, 0, dso->db_id);
+ tuple_set_d64(t, 0, dso__db_id(dso));
tuple_set_d64(t, 1, machine->db_id);
- tuple_set_string(t, 2, dso->short_name);
- tuple_set_string(t, 3, dso->long_name);
+ tuple_set_string(t, 2, dso__short_name(dso));
+ tuple_set_string(t, 3, dso__long_name(dso));
tuple_set_string(t, 4, sbuild_id);
call_object(tables->dso_handler, t, "dso_table");
@@ -1273,7 +1274,7 @@ static int python_export_symbol(struct db_export *dbe, struct symbol *sym,
t = tuple_new(6);
tuple_set_d64(t, 0, *sym_db_id);
- tuple_set_d64(t, 1, dso->db_id);
+ tuple_set_d64(t, 1, dso__db_id(dso));
tuple_set_d64(t, 2, sym->start);
tuple_set_d64(t, 3, sym->end);
tuple_set_s32(t, 4, sym->binding);