From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEA03C072B5 for ; Fri, 24 May 2019 13:36:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A365E217F9 for ; Fri, 24 May 2019 13:36:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OUWxuEE0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A365E217F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ejjb8rpTHImZ66cyEpJEGrGkMvh2533t99gzJN8nnUI=; b=OUWxuEE0uziaPS YNVFyxuLfK6+7h5W+ZVlcWB2mrEEiDY6sXGjHv2/BpP0VdnRKqkJ1WMg6+Cw2VKrQrgpKl1Xdyyqi VT0mkB0lXdBZvGPYYIm582CcfECvw7/X3mKixcFzGhN88tKqZzqJjy8f6e3mFe1b3B4yVhjGcNTpH ailO+lkhwyCyYvgIuw8E1qmiz7VgHdSnSI9Mo2fJFKct0RzZwXV5Xxw5S12Rkc0pTfxEROEWFlK5F wDWH183PA+yCR5gt4ZOsrtTwvj2LAwuUG4cChlIUfAET8ZVc77+eFWz5/O5P/zDUxXzD62k1Gq+4O +zhF9xOeStVNyiT6OQKw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUAMh-0004TI-6k; Fri, 24 May 2019 13:36:07 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hUAMc-0004Sp-Tv for linux-arm-kernel@lists.infradead.org; Fri, 24 May 2019 13:36:05 +0000 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 874F1217F9; Fri, 24 May 2019 13:36:01 +0000 (UTC) Date: Fri, 24 May 2019 09:36:00 -0400 From: Steven Rostedt To: Julien Thierry Subject: Re: [PATCH] clocksource/arm_arch_timer: Don't trace count reader functions Message-ID: <20190524093600.11ca3cb2@gandalf.local.home> In-Reply-To: <1558689025-50679-1-git-send-email-julien.thierry@arm.com> References: <1558689025-50679-1-git-send-email-julien.thierry@arm.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190524_063602_984999_E92DF7F8 X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Marc Zyngier , Daniel Lezcano , linux-kernel@vger.kernel.org, Thomas Gleixner , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 24 May 2019 10:10:25 +0100 Julien Thierry wrote: > With v5.2-rc1, The ftrace functions_graph tracer locks up whenever it is > enabled on arm64. > > Since commit 0ea415390cd3 ("clocksource/arm_arch_timer: Use > arch_timer_read_counter to access stable counters") a function pointer > is consistently used to read the counter instead of potentially > referencing an inlinable function. > > The graph tacers relies on accessing the timer counters to compute the > time spent in functions which causes the lockup when attempting to trace > these code paths. > > Annontate the arm arch timer counter accessors as notrace. > > Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use > arch_timer_read_counter to access stable counters") > Signed-off-by: Julien Thierry > Cc: Marc Zyngier > Cc: Mark Rutland > Cc: Daniel Lezcano > Cc: Thomas Gleixner > Cc: Steven Rostedt > --- > drivers/clocksource/arm_arch_timer.c | 8 ++++---- Is there any reason to function trace any of the functions in this file? If not, then I would suggest removing all the "notrace" annotations from this file, and add in the Makefile for this directory: CFLAGS_REMOVE_arm_arch_timer.o = $(CC_FLAGS_FTRACE) Hmm, I need to go through all the Makefiles in the kernel and remove the "-pg" and replace it with "$(CC_FLAGS_FTRACE)" as that's the safer way of doing it now. -- Steve > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index b2a951a..5c69c9a 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg, > return val; > } > > -static u64 arch_counter_get_cntpct_stable(void) > +static notrace u64 arch_counter_get_cntpct_stable(void) > { > return __arch_counter_get_cntpct_stable(); > } > > -static u64 arch_counter_get_cntpct(void) > +static notrace u64 arch_counter_get_cntpct(void) > { > return __arch_counter_get_cntpct(); > } > > -static u64 arch_counter_get_cntvct_stable(void) > +static notrace u64 arch_counter_get_cntvct_stable(void) > { > return __arch_counter_get_cntvct_stable(); > } > > -static u64 arch_counter_get_cntvct(void) > +static notrace u64 arch_counter_get_cntvct(void) > { > return __arch_counter_get_cntvct(); > } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel