[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241121123633.5805-1-liujing@cmss.chinamobile.com>
Date: Thu, 21 Nov 2024 20:36:33 +0800
From: liujing <liujing@...s.chinamobile.com>
To: peterz@...radead.org,
mingo@...hat.com,
acme@...nel.org,
namhyung@...nel.org,
mark.rutland@....com,
alexander.shishkin@...ux.intel.com,
jolsa@...nel.org,
irogers@...gle.com,
adrian.hunter@...el.com,
kan.liang@...ux.intel.com
Cc: linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org,
liujing <liujing@...s.chinamobile.com>
Subject: [PATCH] perf intel-pt: Fix variable duplicate check
Identical condition 'data->from_mtc', second condition is always false,
so duplicate checks are eliminated.
Signed-off-by: liujing <liujing@...s.chinamobile.com>
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 e733f6b1f7ac..9fde2c49f8b5 100644
--- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
+++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
@@ -883,7 +883,7 @@ static int intel_pt_calc_cyc_cb(struct intel_pt_pkt_info *pkt_info)
return 1;
timestamp = pkt_info->packet.payload |
(data->timestamp & (0xffULL << 56));
- if (data->from_mtc && timestamp < data->timestamp &&
+ if (timestamp < data->timestamp &&
data->timestamp - timestamp < decoder->tsc_slip)
return 1;
if (timestamp < data->timestamp)
--
2.27.0
Powered by blists - more mailing lists