Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp464577ybi; Fri, 24 May 2019 06:37:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGrgZGksADOI+RsL5PMkbov352rVhFzXw2/kiYb2SAZjXjS1LmyAth2YX/7cofsZQjTQ0f X-Received: by 2002:a63:1e0c:: with SMTP id e12mr102805403pge.218.1558705076426; Fri, 24 May 2019 06:37:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558705076; cv=none; d=google.com; s=arc-20160816; b=QHYKlsn77Xh0Sn8P2P/yJmB9VSsjjAyraCura9hhDyW40TR3dagkPOaxn3KnFlYv4g 1OeofYIZeU1YUZ8jNN2OChavU7ItOY/GUcQYalZWwGYwKVwu9Ug875irYaidmrsfBQas oxuO4wrWUvGk2igolBUjT36a85o7uKbbVESmmxF+DcCRBY059MKwDeyM25QP3IgG7rK+ B8tmIf/l9d2RS81vkU5vQ8sOKcyifL2LbDrWscjvZTwyPcFit3LjdlXFoKELlxh5Yu7J o2o4pJwM1PPvW8Zzqz/mSM2ETDiOUMMFdF1OtPaY9RRkIBjK5aQ+G8B8H1QCzY/av473 6cFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=wYgHV+/L2Du/C7GlH1RwWpjYrt4/SneszBSUk7eDlIA=; b=iWzknK+nrL4PPWRTToD4a2A/bAYkBk48ifKDYYmD/124lHXZd492786qyhCDXjsv69 ywDFHSNXGeO1cTIkwC2DexOgEVOwPVT3Up3twIrHaQccmi9X6/pyEvcQ4LccVw0KcUo2 rc49KOdEFqUIgewVnj8fYPwjvkRCC1YC2YkYuKpEne5SfPuLJFg+cIoHCWZUGCLs+l1e +MGV3lN2UH6coS9kOw7sNzeWw0vUi3r7ygEITo7oA73VyWc517qmNJ6zqHgZcn19YCx+ uVp3tkTXkTyy+kR2ZNvoJXpFhTOT9pDxURZautz8OgPC82R+OVWJ417qQjnGZIMiEK5F Ve1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s8si4097640plq.106.2019.05.24.06.37.40; Fri, 24 May 2019 06:37:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403864AbfEXNgD (ORCPT + 99 others); Fri, 24 May 2019 09:36:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:42996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403788AbfEXNgC (ORCPT ); Fri, 24 May 2019 09:36:02 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier , Mark Rutland , Daniel Lezcano , Thomas Gleixner 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(); > }