Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3759926ybg; Mon, 28 Oct 2019 18:57:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXS1dsPeW92LATc1vuvqi4UQ1UZKPlFONuZAoIc0A9I0lf9P7DV5uPCylq4bU75vsHjkt7 X-Received: by 2002:a17:906:9618:: with SMTP id s24mr873365ejx.185.1572314226864; Mon, 28 Oct 2019 18:57:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572314226; cv=none; d=google.com; s=arc-20160816; b=SgxxNJw4CpjHkh+la994HPmaEZUbi0uzQYF+99DtN0CViJmLcdfsHbuL9gcAHF+ecl 268Yqg+oZDSYYyNoMNxVxMq1+M9eTlb7JkGPtAawQHP55m2ntG/X9w7MOMzZsTmk7brq 0G3UitNDk7GAG8QDCt2u0qO7Feo7yujtsZcLh+bWSzbD+QH4wCkvvLjTY0Gdu8jLNjDy 3OHdDAFb8Jn/w/geDNb+Z8kN9wcPzbLcjr04DkB8/oKKU3T6mrJOrbnJ8A3pkmnXDuGG uw9M68QOjPfYVUnI56gYASLeg+HzsUzPwUgZpfNLSrvlpTRzI1COdxui7XFU6BekVU1d 76uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=hl3eENzZxH8iUYEMDmLROzmdD29TcXunTN1oclkRbfI=; b=pO/MQuG2bdIweqLnpsPZGP3UApAk/eX7QXTd/K6ivI/BadHwkOP6ZJJgZWwwakHckQ g6t0yfYTCs3OytVYyxiC3p9ACNbb9UWcXlTYlH/CFwHV/8LdG2TiNGQYi0Dl38iRaOng 9UmEaiMLu1MU57cjwNufwye683gHMoupAET2CBM3ylOzZvk/dR1BSitsRk0Q73A6GeaF v2iyvCHbZRpswLW704iDK51f7/5gD/f/OE+UlhkzP89RrAnNdRb6dA6eUqdHk0hSUhDo LKxgYh6Y4X4LUgLSsZo7lTRP2SLSK7jvZhMh7pPDNyqcCfydzI2Qs3LOt4cmJ/CKAQn/ RrUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si7586730ejz.77.2019.10.28.18.56.43; Mon, 28 Oct 2019 18:57:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389472AbfJ1Mnv (ORCPT + 99 others); Mon, 28 Oct 2019 08:43:51 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:44682 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389461AbfJ1Mnf (ORCPT ); Mon, 28 Oct 2019 08:43:35 -0400 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iP4Mi-0002Lw-D2; Mon, 28 Oct 2019 13:43:20 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 014941C047C; Mon, 28 Oct 2019 13:43:20 +0100 (CET) Date: Mon, 28 Oct 2019 12:43:19 -0000 From: "tip-bot2 for Alexey Budankov" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/x86: Install platform specific ->swap_task_ctx() adapter Cc: Alexey Budankov , "Peter Zijlstra (Intel)" , Alexander Shishkin , Arnaldo Carvalho de Melo , Arnaldo Carvalho de Melo , Ian Rogers , Jiri Olsa , Kan Liang , Linus Torvalds , Mark Rutland , Namhyung Kim , Song Liu , Stephane Eranian , Thomas Gleixner , Vince Weaver , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <157226659972.29376.10831332876629272543.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the perf/core branch of tip: Commit-ID: a44399703b4893de4eadb970867fd5efd4461514 Gitweb: https://git.kernel.org/tip/a44399703b4893de4eadb970867fd5efd4461514 Author: Alexey Budankov AuthorDate: Wed, 23 Oct 2019 10:11:54 +03:00 Committer: Ingo Molnar CommitterDate: Mon, 28 Oct 2019 12:51:00 +01:00 perf/x86: Install platform specific ->swap_task_ctx() adapter Bridge perf core and x86 swap_task_ctx() method calls. Signed-off-by: Alexey Budankov Signed-off-by: Peter Zijlstra (Intel) Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Link: https://lkml.kernel.org/r/b157e97d-32c3-aeaf-13ba-47350c677906@linux.intel.com Signed-off-by: Ingo Molnar --- arch/x86/events/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 7b21455..6e3f0c1 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2243,6 +2243,13 @@ 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_swap_task_ctx(struct perf_event_context *prev, + struct perf_event_context *next) +{ + if (x86_pmu.swap_task_ctx) + x86_pmu.swap_task_ctx(prev, next); +} + void perf_check_microcode(void) { if (x86_pmu.check_microcode) @@ -2297,6 +2304,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), + .swap_task_ctx = x86_pmu_swap_task_ctx, .check_period = x86_pmu_check_period, .aux_output_match = x86_pmu_aux_output_match,