[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230213190754.1836051-6-kan.liang@linux.intel.com>
Date: Mon, 13 Feb 2023 11:07:50 -0800
From: kan.liang@...ux.intel.com
To: tglx@...utronix.de, jstultz@...gle.com, peterz@...radead.org,
mingo@...hat.com, linux-kernel@...r.kernel.org
Cc: sboyd@...nel.org, eranian@...gle.com, namhyung@...nel.org,
ak@...ux.intel.com, adrian.hunter@...el.com,
Kan Liang <kan.liang@...ux.intel.com>
Subject: [RFC PATCH V2 5/9] perf/x86/intel: Enable large PEBS for monotonic raw
From: Kan Liang <kan.liang@...ux.intel.com>
The monotonic raw clock is not affected by NTP/PTP correction. The
monotonic raw clock can be calculated from the TSC of each PEBS record
by the same conversion information.
Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
---
arch/x86/events/intel/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index d9be5701e60a..eac389e1f44c 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3776,7 +3776,8 @@ static unsigned long intel_pmu_large_pebs_flags(struct perf_event *event)
{
unsigned long flags = x86_pmu.large_pebs_flags;
- if (event->attr.use_clockid)
+ if (event->attr.use_clockid &&
+ !((x86_pmu.intel_cap.pebs_format >= 3) && perf_event_hw_time(event)))
flags &= ~PERF_SAMPLE_TIME;
if (!event->attr.exclude_kernel)
flags &= ~PERF_SAMPLE_REGS_USER;
--
2.35.1
Powered by blists - more mailing lists