]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf arm-spe: Don't wait for PERF_RECORD_EXIT event
authorLeo Yan <leo.yan@linaro.org>
Wed, 19 May 2021 07:19:39 +0000 (15:19 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 1 Jul 2021 19:14:36 +0000 (16:14 -0300)
When decode Arm SPE trace, it waits for PERF_RECORD_EXIT event (the last
perf event) for processing trace data, which is needless and even might
cause logic error, e.g. it might fail to correlate perf events with Arm
SPE events correctly.

So this patch removes the condition checking for PERF_RECORD_EXIT event.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: James Clark <james.clark@arm.com>
Tested-by: James Clark <james.clark@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Al Grant <Al.Grant@arm.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210519071939.1598923-6-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/arm-spe.c

index 5c5b438584c40cb6b8955b4f6e65b958d615d3d3..58b7069c5a5f831ebf1e96d42c6a99319eccd813 100644 (file)
@@ -717,11 +717,7 @@ static int arm_spe_process_event(struct perf_session *session,
                                        sample->time);
                }
        } else if (timestamp) {
-               if (event->header.type == PERF_RECORD_EXIT) {
-                       err = arm_spe_process_queues(spe, timestamp);
-                       if (err)
-                               return err;
-               }
+               err = arm_spe_process_queues(spe, timestamp);
        }
 
        return err;