Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756394AbdGYAfI (ORCPT ); Mon, 24 Jul 2017 20:35:08 -0400 Received: from mga02.intel.com ([134.134.136.20]:28347 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752261AbdGYAez (ORCPT ); Mon, 24 Jul 2017 20:34:55 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,409,1496127600"; d="scan'208";a="130712113" From: "Huang\, Ying" To: Steven Rostedt Cc: "Huang\, Ying" , Mengyang Liu , "Brandt\, Todd E" , "linux-kernel\@vger.kernel.org" Subject: Re: Is it possible to use ftrace to measure secondary CPU bootup time References: <874lu2fkv4.fsf@yhuang-dev.intel.com> <20170724051702.5a0a4ec8@vmware.local.home> Date: Tue, 25 Jul 2017 08:34:51 +0800 In-Reply-To: <20170724051702.5a0a4ec8@vmware.local.home> (Steven Rostedt's message of "Mon, 24 Jul 2017 05:17:02 -0400") Message-ID: <87r2x5bbh0.fsf@yhuang-dev.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 30 Steven Rostedt writes: > On Mon, 24 Jul 2017 13:46:07 +0800 > "Huang\, Ying" wrote: > >> Hi, Steven, >> >> We are working on parallelizing secondary CPU bootup. So we need to >> measure the bootup time of secondary CPU, that is, measure time spent in >> smp_init() and its callees. But we found that ftrace now doesn't >> support measure time spent in smp_init() because it is called too early >> (before core_initcall()?). So, do you think it is possible to use >> ftrace to measure secondary CPU bootup time? > > One could trace with function tracing that early, but that wont give > you the timings you are looking for. The best it probably could do is > to look at the function timestamps of what is called after smp_init. > That is, trace smp_init() and sched_init_smp() and take the difference. > > Function graph tracing (which is what you are probably looking for) is > much more heavy weight than function tracing. It requires some setup > that isn't ready that early. Although, I'm sure I can work to get it > there, but it's not trivial. Got it! Thanks a lot! Best Regards, Huang, Ying > -- Steve