Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1873120pxx; Sat, 31 Oct 2020 00:44:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx7uatBKbbLrrxEcoea8HAqGD7edsaopmSoqFfdVEXPnJSfTjGkNaU+OaXQPmEAOfhBODl X-Received: by 2002:a05:6402:d0d:: with SMTP id eb13mr6525236edb.244.1604130266374; Sat, 31 Oct 2020 00:44:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604130266; cv=none; d=google.com; s=arc-20160816; b=GT87ZrjSyVro68JsmzAA5fB42tdWZ9U/CLa9z+7G5LZ/1XeT7ekGWzcvPYUAQNKhOb VzFEcSMCrvyyakazTegtiFZ9JKaWz6s6Evx8HVcSX6JhjhHjxzI+ftfFBiBKCnmexV3c nzBgZe82cXg0/nRk2cQWez0v0agq0tI2nxh7/f52UZlMlwqUaFWt+2NLifpcb7MOg24p ZT+E5yZroiX9r6vmjojl1X8yObLP3ZtvSoxxW3ARz6XdRAuS3zb4NbB/FBBU8xdGtm5N lSqbW4LUXZrpk6BiSzqsX1x6u9wRN6J1iaHf7WiEtlKF2UCskmjYINJW7GbQ3ypMF1EJ rtXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XIZNe6YuLy46n5Nada4MP7n1xRFY7UH0wRIAGuL5JcQ=; b=nDvvydHYtgHsKuFWq4Q+JwPgu84X53sK+AxHT0lzaOMRVYUvPW4GELMzkI1eFDSjx+ tCaR0nTDpN25vSNR9s+pMB/i+TsNb75fo+7FlqXwGX+Aaj2ZsNu6oxl2GmB8Egj6nIpg IDNvtFib6CKge0bft+LJ65jBDAZbvmdDLibfbtg8v8Bpr5iRHOkheSVbUGxsv6xll20l tMWSxzE72AmrCS/7uQPeD3yLghU0J05KlHw8tZRaslRnD6izJLF9AhKPxJ/hYBG+yFQ1 7cSXoCqrk8FyA0HOIILPHcFJcpcBh93C7VEHAeBgWw76QLRbEYbAC5KQ3Kb4ce9v6pEl KmNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LrWrz0Qa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si6211869edq.25.2020.10.31.00.44.04; Sat, 31 Oct 2020 00:44:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LrWrz0Qa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726328AbgJaHmm (ORCPT + 99 others); Sat, 31 Oct 2020 03:42:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:36538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbgJaHmm (ORCPT ); Sat, 31 Oct 2020 03:42:42 -0400 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C27C822241; Sat, 31 Oct 2020 07:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604130162; bh=oi5Erw8ptiShmFnsFP95vlnIhS9KpblRKlS7+BrH0hM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LrWrz0Qa8oElMhI8dyu2VN1FEgaPk/ZbZ6ymB1aaDktS+tZh7cXHdaYQF7WeLfGwM yqMeKe3C7i6pWMyxBZVMOOV7vLv/V4dKBKZRVRfbvAwFFAqu+DcFbXKfbR1fC/2NoN M1T/BwiwtpF9lN7Aq58nh4Js8SYqsbb9nrsoT1vw= Received: by mail-lf1-f42.google.com with SMTP id l2so10822077lfk.0; Sat, 31 Oct 2020 00:42:41 -0700 (PDT) X-Gm-Message-State: AOAM532ClRvKNonWGpk76PVjJEoVTgVRVjTduoxa7+erah5RnbhyGsmU 66trqtQu7ehC7FZaZblxda6b/GicUZ9lpecbgL0= X-Received: by 2002:a19:6b10:: with SMTP id d16mr2205633lfa.121.1604130160109; Sat, 31 Oct 2020 00:42:40 -0700 (PDT) MIME-Version: 1.0 References: <20201021073839.43935-1-zong.li@sifive.com> <20201030202818.72070cbd@oasis.local.home> In-Reply-To: <20201030202818.72070cbd@oasis.local.home> From: Guo Ren Date: Sat, 31 Oct 2020 15:42:28 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] stop_machine: Mark functions as notrace To: Steven Rostedt Cc: Atish Patra , Zong Li , Paul McKenney , josh@joshtriplett.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, joel@joelfernandes.org, vincent.whitchurch@axis.com, Thomas Gleixner , Paul Walmsley , Palmer Dabbelt , Masami Hiramatsu , Greentime Hu , Colin Ian King , rcu@vger.kernel.org, Linux Kernel Mailing List , linux-riscv Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 31, 2020 at 8:28 AM Steven Rostedt wrote: > > On Fri, 30 Oct 2020 14:47:56 -0700 > Atish Patra wrote: > > > > Look at arm64, they __kprobes flag and I guess it would also prevent > > > ftrace call site. > > > > > > > Are you sure about that ? __kprobes puts the code in .kprobes.text section > > which is under whitelist sections in recordmcount.pl & recordmcount.c. > > Correct, ftrace can trace functions marked with __kprobes. That said, I guess wrong, thx for correct me. > the instruction you are looking at here, is in a file that is > blacklisted from recordmcount. > > CFLAGS_REMOVE_insn.o = $(CC_FLAGS_FTRACE) > > All ftrace flags are removed from the compiling of insn.c, and every > function in that file will not be traced. Yes, arm64 prevents the whole file from ftrace. My patch just use notrace flag setting on some functions. @Atish How do think: CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/