aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 8dc98c598b1a..93ac724fb635 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2256,11 +2256,10 @@ static void print_location(FILE *f, struct perf_sample *sample,
2256 2256
2257static int trace__pgfault(struct trace *trace, 2257static int trace__pgfault(struct trace *trace,
2258 struct perf_evsel *evsel, 2258 struct perf_evsel *evsel,
2259 union perf_event *event, 2259 union perf_event *event __maybe_unused,
2260 struct perf_sample *sample) 2260 struct perf_sample *sample)
2261{ 2261{
2262 struct thread *thread; 2262 struct thread *thread;
2263 u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
2264 struct addr_location al; 2263 struct addr_location al;
2265 char map_type = 'd'; 2264 char map_type = 'd';
2266 struct thread_trace *ttrace; 2265 struct thread_trace *ttrace;
@@ -2279,7 +2278,7 @@ static int trace__pgfault(struct trace *trace,
2279 if (trace->summary_only) 2278 if (trace->summary_only)
2280 goto out; 2279 goto out;
2281 2280
2282 thread__find_addr_location(thread, cpumode, MAP__FUNCTION, 2281 thread__find_addr_location(thread, sample->cpumode, MAP__FUNCTION,
2283 sample->ip, &al); 2282 sample->ip, &al);
2284 2283
2285 trace__fprintf_entry_head(trace, thread, 0, sample->time, trace->output); 2284 trace__fprintf_entry_head(trace, thread, 0, sample->time, trace->output);
@@ -2292,11 +2291,11 @@ static int trace__pgfault(struct trace *trace,
2292 2291
2293 fprintf(trace->output, "] => "); 2292 fprintf(trace->output, "] => ");
2294 2293
2295 thread__find_addr_location(thread, cpumode, MAP__VARIABLE, 2294 thread__find_addr_location(thread, sample->cpumode, MAP__VARIABLE,
2296 sample->addr, &al); 2295 sample->addr, &al);
2297 2296
2298 if (!al.map) { 2297 if (!al.map) {
2299 thread__find_addr_location(thread, cpumode, 2298 thread__find_addr_location(thread, sample->cpumode,
2300 MAP__FUNCTION, sample->addr, &al); 2299 MAP__FUNCTION, sample->addr, &al);
2301 2300
2302 if (al.map) 2301 if (al.map)