diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-05-20 11:35:25 -0600 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-06-20 11:16:08 -0600 |
commit | fb91616a5e3c41d308cea8efc110d38de9055d9c (patch) | |
tree | 858f103b41dcf957c651714b751f171e144d3ce0 /tools | |
parent | 7b4fe2ff5a850c70174381adbcf4fd32e41a969c (diff) |
cs-etm: removing unecessary structure field
Function cs_etm__sample() is called only from cs_etm__run_decoder() where
cs_etm_queue::have_sample is set to 'true'. As such checking the value of
the variable again in cs_etm__sample() is not needed.
Since the variable isn't used anywhere else, also removing it from the
structure definition.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/cs-etm.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index a28170eac18a..a772a6f9a407 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -83,7 +83,6 @@ struct cs_etm_queue { u64 time; u64 timestamp; bool stop; - bool have_sample; struct cs_etm_decoder *decoder; u64 offset; bool eot; @@ -797,11 +796,6 @@ static int cs_etm__sample(struct cs_etm_queue *etmq) //struct cs_etm_auxtrace *etm = etmq->etm; int err; - if (!etmq->have_sample) - return 0; - - etmq->have_sample = false; - err = cs_etm_decoder__get_packet(etmq->decoder,&packet); // if there is no sample, it returns err = -1, no real error @@ -837,10 +831,8 @@ more: err = etmq->state->err; etmq->offset += processed; buffer_used += processed; - if (!err) { - etmq->have_sample = true; + if (!err) cs_etm__sample(etmq); - } } while (!etmq->eot && (buffer.len > buffer_used)); goto more; |