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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 02142C433C1 for ; Sat, 27 Mar 2021 12:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF5A2619BB for ; Sat, 27 Mar 2021 12:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230197AbhC0MRh (ORCPT ); Sat, 27 Mar 2021 08:17:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbhC0MRf (ORCPT ); Sat, 27 Mar 2021 08:17:35 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78015C0613B1 for ; Sat, 27 Mar 2021 05:17:35 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id v26so8110490iox.11 for ; Sat, 27 Mar 2021 05:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=W0OCNJlAmSG63LfDiOFxZzKLOJtCIjR/fUw42G8WAYI=; b=iEWQcmzfe1YXd0pp2Aq7mgJ9QaK2nVkq6mYvXsPmLN7UysMFvRvedIyIVnNd/I3XWL AUw7xSQN55n7TASuf9xxb53665/TolORGTIGNTzMOUgLfSiSF09d4+0YvFxwhYbXpCyn kHZ95SVcqwA7RQ6QiXxbUBhQ4fxlMyjCXf5ImsHu0V60oXJCNuaj8Hnzu/+JDAcVFW3s 2Hkz2Ro5e39ooRKSdV53UiR1jntHvXl3HYPyx1Z+JoTdGHiolNu9vheL3orubZROpsLN bZQZgJVQUjvSejKL7kEcmVwijJkZpjMJbr1AFhIvFe1gVoTrtRsPYoxDtZhpJOpALQmr huRg== 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:reply-to :from:date:message-id:subject:to:cc; bh=W0OCNJlAmSG63LfDiOFxZzKLOJtCIjR/fUw42G8WAYI=; b=Gx6dwSYGL5dcFtpRMRvFbShV0qi+FmwPH0rz9T/Orklw3iEQngTEzSnD/gqtSokZ82 fnh1fvdwSG1bT25Zzol+nj44dnQwnic2toYTEctEqjOiU2JvhRT59zeVgmnFtTPTY4t8 kyVtIur/Q8fCQortIo5eajf3uj4mjHkmWMag/WNONdVpCyTxv9CcXMRZMP7wte+yTDxA aWWCy9ZwF2p/zl9WKnyCVQKqYg4H+h0yIYU+j2g6LytVM1ngk0DcxHdpYRdax04CX63R hgj8x4+rp1qoxrmhheAmqW5OLTU1G97PmFneMCb4OY98pcea2dojZ7N0P/W/g1a2YLhg yjiA== X-Gm-Message-State: AOAM532Z/BOyq/NLM7t5dMcCiTSR2fnOs+WK6dszVcYDjUwSsAoTSCSf XW9yngxPTuXpzsLazbE00iR8fIjTi3dpjiJAINk= X-Google-Smtp-Source: ABdhPJxq0LbjHww3sV5wuK2q4vWZC2pFkSIydOiu6GLexH1m0wSxxKl5Hwo5znh81XK59ms4cf7fbgr7Us4ud3CNyTI= X-Received: by 2002:a5d:9d13:: with SMTP id j19mr14040542ioj.110.1616847454985; Sat, 27 Mar 2021 05:17:34 -0700 (PDT) MIME-Version: 1.0 References: <20210325223807.2423265-1-nathan@kernel.org> <20210326130702.3yaz2vqwejnfnlq4@MSI.localdomain> In-Reply-To: <20210326130702.3yaz2vqwejnfnlq4@MSI.localdomain> Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Sat, 27 Mar 2021 13:16:58 +0100 Message-ID: Subject: Re: [PATCH 0/3] Fix CONFIG_FUNCTION_TRACER with clang To: Nathan Chancellor Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Clang-Built-Linux ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 26, 2021 at 2:07 PM Nathan Chancellor wrote: > > On Fri, Mar 26, 2021 at 09:37:55AM +0100, Sedat Dilek wrote: > > On Thu, Mar 25, 2021 at 11:38 PM Nathan Chancellor wrote: > > > > > > Hi all, > > > > > > This series fixes function tracing with clang. > > > > > > Patch 1 adjusts the mcount regex in scripts/recordmcount.pl to handle > > > the presence of PLT relocations, which happen with clang. Without this, > > > the mcount_loc section will not be created properly. > > > > > > Patch 2 adds a workaround for clang less than 13.0.0 in relation to the > > > mcount symbol name, which was "mcount" rather than "_mcount". This was > > > written as a separate patch so that it can be reverted when the minimum > > > clang version is bumped to clang 13.0.0. > > > > > > Patch 3 avoids a build error when -fpatchable-function-entry is not > > > available, which is the case with clang less than 13.0.0. This will make > > > dynamic ftrace unavailable but all of the other function tracing should > > > work due to the prescence of the previous patch. > > > > > > I am hoping this series can go in as fixes for 5.12, due to patch 3, but > > > if not, they can always be backported (patches 1 and 2 are already > > > marked for stable). > > > > > > This series has been build tested with gcc-8 through gcc-10 and clang-11 > > > through clang-13 with defconfig and nommu_virt_defconfig plus > > > CONFIG_FTRACE=y and CONFIG_FUNCTION_TRACER=y then boot tested under > > > QEMU. > > > > > > Cheers, > > > Nathan > > > > > > Nathan Chancellor (3): > > > scripts/recordmcount.pl: Fix RISC-V regex for clang > > > riscv: Workaround mcount name prior to clang-13 > > > riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is > > > available > > > > > > > Does this only fixes stuff for clang + riscv? > > Yes. > > > If so, please put a label "riscv" also in the cover-letter. > > Sure, my apologies for not doing that in the first place, I must have > been in a rush with the cover letter. > > In my defense, I think the titles of my commit messages and the diffstat > below make that obvious without the tag :) > No need for any apologies. I was fooled as you sent two triple-patchset nearly simultaneously. This riscv patchset here was not of interest to me. - Sedat - > > > - Sedat - > > > > > arch/riscv/Kconfig | 2 +- > > > arch/riscv/include/asm/ftrace.h | 14 ++++++++++++-- > > > arch/riscv/kernel/mcount.S | 10 +++++----- > > > scripts/recordmcount.pl | 2 +- > > > 4 files changed, 19 insertions(+), 9 deletions(-) > > > > > > -- > > > 2.31.0 > > >