From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbdKHTHm (ORCPT ); Wed, 8 Nov 2017 14:07:42 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:34352 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbdKHTHl (ORCPT ); Wed, 8 Nov 2017 14:07:41 -0500 Date: Wed, 8 Nov 2017 20:07:27 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Abderrahmane Benbachir , linux-kernel@vger.kernel.org, mingo@redhat.com, mathieu.desnoyers@efficios.com, Thomas Gleixner Subject: Re: [RFC PATCH v2] ftrace: support very early function tracing Message-ID: <20171108190727.GL3326@worktop> References: <1510098245.14960.3.camel@polymtl.ca> <20171107211706.328d7dd0@gandalf.local.home> <20171108081058.GT3165@worktop.lehotels.local> <20171108110757.5ef58e53@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171108110757.5ef58e53@gandalf.local.home> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 08, 2017 at 11:07:57AM -0500, Steven Rostedt wrote: > On Wed, 8 Nov 2017 09:10:58 +0100 > Peter Zijlstra wrote: > > > On Tue, Nov 07, 2017 at 09:17:06PM -0500, Steven Rostedt wrote: > > > > +#ifdef CONFIG_X86_TSC > > > > + entry->clock = rdtsc(); > > > > +#else > > > > + entry->clock = trace_clock_local(); > > > > +#endif > > > > > > +#ifdef CONFIG_X86_TSC > > > > + cpu_khz = native_calibrate_cpu(); > > > > +#endif > > > > > > +#ifdef CONFIG_X86_TSC > > > > + ns = cycles_to_ns(entry->clock, cpu_khz); > > > > +#else > > > > + ns = entry->clock; > > > > +#endif > > > > Yeah, no, not going to happen... > > Agreed. Depends on how early you need things; ideally you'd be able to use the stuff from here: https://lkml.kernel.org/r/1504116205-355281-1-git-send-email-pasha.tatashin@oracle.com That is, fix the normal time sources to work earlier instead of building parallel infrastructure.