Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbdGXJRS (ORCPT ); Mon, 24 Jul 2017 05:17:18 -0400 Received: from smtprelay0031.hostedemail.com ([216.40.44.31]:42158 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752355AbdGXJRG (ORCPT ); Mon, 24 Jul 2017 05:17:06 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2198:2199:2200:2393:2553:2559:2562:2912:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:5007:6261:7875:9108:10004:10400:10450:10455:10848:10967:11026:11232:11658:11914:12296:12663:12740:12760:12895:13069:13073:13161:13229:13311:13357:13439:14096:14097:14180:14181:14659:14721:19904:19999:21060:21080:21092:21324:21627:30054:30064:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wing00_7806dec22eb3d X-Filterd-Recvd-Size: 1971 Date: Mon, 24 Jul 2017 05:17:02 -0400 From: Steven Rostedt To: "Huang\, Ying" Cc: Mengyang Liu , "Brandt\, Todd E" , "linux-kernel\@vger.kernel.org" Subject: Re: Is it possible to use ftrace to measure secondary CPU bootup time Message-ID: <20170724051702.5a0a4ec8@vmware.local.home> In-Reply-To: <874lu2fkv4.fsf@yhuang-dev.intel.com> References: <874lu2fkv4.fsf@yhuang-dev.intel.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 23 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. -- Steve