|
@@ -1296,7 +1296,6 @@ void perf_event__print_ip(union perf_event *event, struct perf_sample *sample,
|
|
|
int print_sym, int print_dso)
|
|
|
{
|
|
|
struct addr_location al;
|
|
|
- const char *symname, *dsoname;
|
|
|
struct callchain_cursor *cursor = &evsel->hists.callchain_cursor;
|
|
|
struct callchain_cursor_node *node;
|
|
|
|
|
@@ -1324,20 +1323,13 @@ void perf_event__print_ip(union perf_event *event, struct perf_sample *sample,
|
|
|
|
|
|
printf("\t%16" PRIx64, node->ip);
|
|
|
if (print_sym) {
|
|
|
- if (node->sym && node->sym->name)
|
|
|
- symname = node->sym->name;
|
|
|
- else
|
|
|
- symname = "";
|
|
|
-
|
|
|
- printf(" %s", symname);
|
|
|
+ printf(" ");
|
|
|
+ symbol__fprintf_symname(node->sym, stdout);
|
|
|
}
|
|
|
if (print_dso) {
|
|
|
- if (node->map && node->map->dso && node->map->dso->name)
|
|
|
- dsoname = node->map->dso->name;
|
|
|
- else
|
|
|
- dsoname = "";
|
|
|
-
|
|
|
- printf(" (%s)", dsoname);
|
|
|
+ printf(" (");
|
|
|
+ map__fprintf_dsoname(al.map, stdout);
|
|
|
+ printf(")");
|
|
|
}
|
|
|
printf("\n");
|
|
|
|
|
@@ -1347,21 +1339,14 @@ void perf_event__print_ip(union perf_event *event, struct perf_sample *sample,
|
|
|
} else {
|
|
|
printf("%16" PRIx64, sample->ip);
|
|
|
if (print_sym) {
|
|
|
- if (al.sym && al.sym->name)
|
|
|
- symname = al.sym->name;
|
|
|
- else
|
|
|
- symname = "";
|
|
|
-
|
|
|
- printf(" %s", symname);
|
|
|
+ printf(" ");
|
|
|
+ symbol__fprintf_symname(al.sym, stdout);
|
|
|
}
|
|
|
|
|
|
if (print_dso) {
|
|
|
- if (al.map && al.map->dso && al.map->dso->name)
|
|
|
- dsoname = al.map->dso->name;
|
|
|
- else
|
|
|
- dsoname = "";
|
|
|
-
|
|
|
- printf(" (%s)", dsoname);
|
|
|
+ printf(" (");
|
|
|
+ map__fprintf_dsoname(al.map, stdout);
|
|
|
+ printf(")");
|
|
|
}
|
|
|
}
|
|
|
}
|