lkml.org 
[lkml]   [2019]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH v3 2/4] perf/x86: install platform specific sync_task_ctx adapter
From
Date

Bridge perf core and x86 sync_task_ctx() method calls.

Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
---
arch/x86/events/core.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 15b90b1a8fb1..2c293bbd093f 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -2243,6 +2243,12 @@ static void x86_pmu_sched_task(struct perf_event_context *ctx, bool sched_in)
x86_pmu.sched_task(ctx, sched_in);
}

+static void x86_pmu_sync_task_ctx(void *one, void *another)
+{
+ if (x86_pmu.sync_task_ctx)
+ x86_pmu.sync_task_ctx(one, another);
+}
+
void perf_check_microcode(void)
{
if (x86_pmu.check_microcode)
@@ -2297,6 +2303,7 @@ static struct pmu pmu = {
.event_idx = x86_pmu_event_idx,
.sched_task = x86_pmu_sched_task,
.task_ctx_size = sizeof(struct x86_perf_task_context),
+ .sync_task_ctx = x86_pmu_sync_task_ctx,
.check_period = x86_pmu_check_period,

.aux_output_match = x86_pmu_aux_output_match,
--
2.20.1
\
 
 \ /
  Last update: 2019-10-16 16:27    [W:0.062 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site