diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-15 10:34:19 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-15 10:34:19 +0200 |
| commit | db6da59cf27b5661ced03754ae0550f8914eda9e (patch) | |
| tree | ccb1851c8a71e776dbccf1ccae132dc9b5f093c6 /tools/perf/util/data-convert-json.c | |
| parent | cf03e2956af307dc25e8c41fd4cffe44482a6ec1 (diff) | |
| parent | 901bdf5ea1a836400ee69aa32b04e9c209271ec7 (diff) | |
Merge drm/drm-next into drm-misc-next-fixes
Backmerging to sync drm-misc-next-fixes with drm-misc-next.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'tools/perf/util/data-convert-json.c')
| -rw-r--r-- | tools/perf/util/data-convert-json.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/util/data-convert-json.c b/tools/perf/util/data-convert-json.c index ba9d93ce9463..653709ab867a 100644 --- a/tools/perf/util/data-convert-json.c +++ b/tools/perf/util/data-convert-json.c @@ -128,15 +128,17 @@ static void output_sample_callchain_entry(struct perf_tool *tool, output_json_key_format(out, false, 5, "ip", "\"0x%" PRIx64 "\"", ip); if (al && al->sym && al->sym->namelen) { + struct dso *dso = al->map ? map__dso(al->map) : NULL; + fputc(',', out); output_json_key_string(out, false, 5, "symbol", al->sym->name); - if (al->map && al->map->dso) { - const char *dso = al->map->dso->short_name; + if (dso) { + const char *dso_name = dso->short_name; - if (dso && strlen(dso) > 0) { + if (dso_name && strlen(dso_name) > 0) { fputc(',', out); - output_json_key_string(out, false, 5, "dso", dso); + output_json_key_string(out, false, 5, "dso", dso_name); } } } |
