Skip to content

Commit

Permalink
perf cs-etm: Get rid of unused cpu in struct cs_etm_queue
Browse files Browse the repository at this point in the history
Nowadays the synthesize code is using the packet's cpu information,
making cs_etm_queue::cpu useless.  As such simply remove it.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Tested-by: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190524173508.29044-11-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Mathieu Poirier authored and Arnaldo Carvalho de Melo committed Jun 10, 2019
1 parent c7bfa2f commit 6672559
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tools/perf/util/cs-etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ struct cs_etm_queue {
struct auxtrace_buffer *buffer;
unsigned int queue_nr;
pid_t pid, tid;
int cpu;
u64 offset;
const unsigned char *buf;
size_t buf_len, buf_used;
Expand Down Expand Up @@ -599,7 +598,6 @@ static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm,
queue->priv = etmq;
etmq->etm = etm;
etmq->queue_nr = queue_nr;
etmq->cpu = queue->cpu;
etmq->tid = queue->tid;
etmq->pid = -1;
etmq->offset = 0;
Expand Down Expand Up @@ -831,11 +829,8 @@ static void cs_etm__set_pid_tid_cpu(struct cs_etm_auxtrace *etm,
etmq->thread = machine__find_thread(etm->machine, -1,
etmq->tid);

if (etmq->thread) {
if (etmq->thread)
etmq->pid = etmq->thread->pid_;
if (queue->cpu == -1)
etmq->cpu = etmq->thread->cpu;
}
}

static int cs_etm__synth_instruction_sample(struct cs_etm_queue *etmq,
Expand Down

0 comments on commit 6672559

Please sign in to comment.