Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4686366pxk; Wed, 30 Sep 2020 09:07:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp1f8dqTKYF0Snu0vkzObq2QXx7YHea4RPUGzH0CSEEwZZzPf8vocg4nnvdLbagCCV+vll X-Received: by 2002:a17:906:8248:: with SMTP id f8mr3632578ejx.292.1601482058888; Wed, 30 Sep 2020 09:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601482058; cv=none; d=google.com; s=arc-20160816; b=id95aUWQukzeiKFllJ7oMyjR+b9+v3BwzeZVPTh185HhP2CUf1VH+/x6JdTsvhuFTw 8UNtzePnAdQUiIhcZeibEI3eDFlCNyOJhyZ04sFcy52ELjJMaAlyZseBkHZ/2Fc6VINX Kfd9iBlVuv2Eh8FgVQwTtPD/zSkxAkFax4mNEiGnhoEikhwjl7W0sjVU4lSrTGVN/wy+ Vof9N3DClfEqfcug+Oy/5y2RKjIgZ+49t0Y+7RddpilXzcrZNmQxtkDFMTfmSspTAget JpokkkKLjIkQxHfunIcIdQbCqNRZ6vbU+SiZm7tKNz0THNrw8DrIE5VM5zG+tsqsWRO5 bVwQ== 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=4nf8e6hIaPbRqntvQjCiPI17gKDQL3g6MdR3siKHn30=; b=E2mRq9Hfr3FGXQ8/G6OwSHANJnS4MjXrvN/mrzP9ezgrUf8Fmid4epOJwaRWtyPkoD BZd6Xeo8tncmfvvbj6VplIubV4cn+s5UA2uvPvI668OP/ss7babsvm5y/wwnj9o8PgP6 O7ar3ap9JjlDvdwrQIAoatSy7+ZmwaBq1quPb5qUUApKctQ3BDf0m/sajjXDpg6nZzGr OuGOEm0d8mvWhFLHnAMHbOlVtYBCJ7Hpym8qRiUr1Z66T6piYwWDhnNxdRsraDcN7nDi dp0XUqNvQP9KV+iaF4vMfl5s6/CkX3lkQ2uPMvPgLB/8hImibtT1FkCV0CAJ7An57LkX RzJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FdREMa9Y; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si1460606eje.545.2020.09.30.09.07.14; Wed, 30 Sep 2020 09:07:38 -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=@google.com header.s=20161025 header.b=FdREMa9Y; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731160AbgI3QF7 (ORCPT + 99 others); Wed, 30 Sep 2020 12:05:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731099AbgI3QFv (ORCPT ); Wed, 30 Sep 2020 12:05:51 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E85C0613D2 for ; Wed, 30 Sep 2020 09:05:51 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id a3so2826647ejy.11 for ; Wed, 30 Sep 2020 09:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4nf8e6hIaPbRqntvQjCiPI17gKDQL3g6MdR3siKHn30=; b=FdREMa9YQ4gNRdQHURf/x/R8SmYVJ5gIkH9KpmlqeEAlOLeXAhaYjSC7VB4Y8/uoLl NpSU9flOBZMB2LnlrWowvIpCnct6WksL48hJ6hEvbeije9viNCjBJLNglsVPmK17McTE bQR932o1ftCv5I/jccydLYq37ELOk8HLaS5waUMw2Sl4+mDrlXBlbynVNtazEd8rcTZn oCfVkT2gQBFoWgRMv35xCS9XqXQ6DAZwYypy9P5mdyuszGukdvxnnn/AnzhUUV4OJTG3 jalYoYIzQjQOW6W2UeOKJ1wH4ANi3gdiXC8IiXeG+7KUsH9D9cVc5b9Ynx38GiIxo6v5 fQpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4nf8e6hIaPbRqntvQjCiPI17gKDQL3g6MdR3siKHn30=; b=BT9Dlaj8XHDExcTH9ezldtAP7Rp81atSNxViVM4Dv7H64jT3Zc6BTXmwbLy8NtOTJE 4SDgoLuq77avNzwOPrc+ulF+rPsXizQ4l5FkVIEBnc0i9Gawzg2hMh2fHDJ9Us9RuPTC AtuKsWflsktlltqTI38nXz2/sthDTVXYb/m+hFzDvuFAXS1rdVGdbdsYrWoKmKV/g5+W sjj9Jkbj/a5GY3Q5EwpJQADP7at6bI5+mF1l3YvlHNpiDbE6XC/TPzeMYdN3WzvWOlH2 mTQlsZhN8VE3hzKqEikB61XZJiicKW6nGpcUEmQdLpuYFQpW0M0qrP5e8qFrtHBG+ec+ 8OFA== X-Gm-Message-State: AOAM530XCHfHyeb8Dv0IGRhjtTQqZjzn6hz2vwdCHs13KHs1rXrrTCem PFEm9m1Qhcd6exM4X5hiWsyO7HApDfFET6Jkk4dHpg== X-Received: by 2002:a17:906:a256:: with SMTP id bi22mr3464394ejb.375.1601481949457; Wed, 30 Sep 2020 09:05:49 -0700 (PDT) MIME-Version: 1.0 References: <20200929214631.3516445-1-samitolvanen@google.com> <20200929214631.3516445-7-samitolvanen@google.com> <20200929201257.1570aadd@oasis.local.home> In-Reply-To: <20200929201257.1570aadd@oasis.local.home> From: Sami Tolvanen Date: Wed, 30 Sep 2020 09:05:38 -0700 Message-ID: Subject: Re: [PATCH v4 06/29] tracing: move function tracer options to Kconfig To: Steven Rostedt Cc: Masahiro Yamada , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , linux-kbuild , LKML , linux-pci@vger.kernel.org, X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 29, 2020 at 5:13 PM Steven Rostedt wrote: > > On Tue, 29 Sep 2020 14:46:08 -0700 > Sami Tolvanen wrote: > > > +++ b/kernel/trace/Kconfig > > @@ -595,6 +595,22 @@ config FTRACE_MCOUNT_RECORD > > depends on DYNAMIC_FTRACE > > depends on HAVE_FTRACE_MCOUNT_RECORD > > > > +config FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY > > + bool > > + depends on FTRACE_MCOUNT_RECORD > > + > > +config FTRACE_MCOUNT_USE_CC > > + def_bool y > > + depends on $(cc-option,-mrecord-mcount) > > Does the above get executed at every build? Or does a make *config need > to be done? If someone were to pass a .config to someone else that had > a compiler that didn't support this, would it be changed if the person > just did a make? Yes, it's updated if you copy a .config and just run make. For example, here's what happens when I create a config with gcc and then build it with Clang: $ make defconfig ... $ ./scripts/config -e FUNCTION_TRACER -e DYNAMIC_FTRACE $ make olddefconfig ... $ grep MCOUNT_USE .config CONFIG_FTRACE_MCOUNT_USE_CC=y $ make CC=clang scripts/kconfig/conf --syncconfig Kconfig ... ^C $ grep MCOUNT_USE .config CONFIG_FTRACE_MCOUNT_USE_OBJTOOL=y Sami