lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/37] perf intel-pt: Move decoder error setting into one condition
Date
Move decoder error setting into one condition.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
index 0b6c6f442870..8062655bc112 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -2314,14 +2314,17 @@ const struct intel_pt_state *intel_pt_decode(struct intel_pt_decoder *decoder)
}
} while (err == -ENOLINK);

- decoder->state.err = err ? intel_pt_ext_err(err) : 0;
decoder->state.timestamp = decoder->timestamp;
decoder->state.est_timestamp = intel_pt_est_timestamp(decoder);
decoder->state.cr3 = decoder->cr3;
decoder->state.tot_insn_cnt = decoder->tot_insn_cnt;

- if (err)
+ if (err) {
+ decoder->state.err = intel_pt_ext_err(err);
decoder->state.from_ip = decoder->ip;
+ } else {
+ decoder->state.err = 0;
+ }

return &decoder->state;
}
--
1.9.1
\
 
 \ /
  Last update: 2017-05-19 11:06    [W:0.161 / U:1.672 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site