summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-script.c4
-rw-r--r--tools/perf/util/session.c6
-rw-r--r--tools/perf/util/session.h2
3 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index dbf208f0cdc2..60fde9f5025c 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -579,7 +579,7 @@ static void print_sample_bts(struct perf_sample *sample,
print_opts &= ~PRINT_IP_OPT_SRCLINE;
}
}
- perf_evsel__print_ip(evsel, sample, al, print_opts,
+ perf_evsel__print_ip(evsel, sample, al, 0, print_opts,
scripting_max_stack, stdout);
}
@@ -788,7 +788,7 @@ static void process_event(struct perf_script *script,
else
printf("\n");
- perf_evsel__print_ip(evsel, sample, al,
+ perf_evsel__print_ip(evsel, sample, al, 0,
output[attr->type].print_ip_opts,
scripting_max_stack, stdout);
}
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index bbac0efbc10c..62b6d4051b99 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1954,7 +1954,7 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
}
void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
- struct addr_location *al,
+ struct addr_location *al, int left_alignment,
unsigned int print_opts, unsigned int stack_depth,
FILE *fp)
{
@@ -1992,6 +1992,8 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
if (node->sym && node->sym->ignore)
goto next;
+ fprintf(fp, "%-*.*s", left_alignment, left_alignment, " ");
+
if (print_ip)
fprintf(fp, "%c%16" PRIx64, s, node->ip);
@@ -2032,6 +2034,8 @@ next:
if (al->sym && al->sym->ignore)
return;
+ fprintf(fp, "%-*.*s", left_alignment, left_alignment, " ");
+
if (print_ip)
fprintf(fp, "%16" PRIx64, sample->ip);
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 0ee3d9dbc099..a6bc4ddbae3e 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -105,7 +105,7 @@ struct perf_evsel *perf_session__find_first_evtype(struct perf_session *session,
unsigned int type);
void perf_evsel__print_ip(struct perf_evsel *evsel, struct perf_sample *sample,
- struct addr_location *al,
+ struct addr_location *al, int left_alignment,
unsigned int print_opts, unsigned int stack_depth,
FILE *fp);