From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754329AbcDTFGW (ORCPT ); Wed, 20 Apr 2016 01:06:22 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:38724 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753556AbcDTFGV (ORCPT ); Wed, 20 Apr 2016 01:06:21 -0400 Date: Wed, 20 Apr 2016 07:06:16 +0200 From: Daniel Lezcano To: torvalds@linux-foundation.org, tglx@linutronix.de, bp@alien8.de, peterz@infradead.org, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, mingo@kernel.org, acme@infradead.org, hpa@zytor.com, a.p.zijlstra@chello.nl Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:sched/core] perf/core, sched: Don't use clock function pointer to determine clock Message-ID: <20160420050616.GF5862@linaro.org> References: <1460635189-2320-1-git-send-email-alexander.shishkin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 19, 2016 at 02:34:50AM -0700, tip-bot for Alexander Shishkin wrote: > Commit-ID: f454bfddf6ba557381d8bf5df50eff778602ff23 > Gitweb: http://git.kernel.org/tip/f454bfddf6ba557381d8bf5df50eff778602ff23 > Author: Alexander Shishkin > AuthorDate: Thu, 14 Apr 2016 14:59:49 +0300 > Committer: Ingo Molnar > CommitDate: Tue, 19 Apr 2016 10:55:29 +0200 > > perf/core, sched: Don't use clock function pointer to determine clock > > Now that local_clock() is explicitly inlined in sched.h, taking its > pointer would uninline it in the compilation unit where it's done, > making (among other things) comparing pointers to this function > produce different results in different compilation units. > > Case in point, x86 perf core's user page updating function compares > event's clock against &local_clock to see if it needs to set zero > time offset related bits in the page. > > This patch fixes the latter by looking at the "use_clockid" event > attribute instead, to determine whether local clock is used. Fixing > the uninlined local_clock() in perf core is left as an exercise for > the author of the prior work. Ouch! Good exercise :)