Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2372677rwb; Thu, 17 Nov 2022 09:52:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf4WLsZgBRvLonRGY9YhvYhbdhAXpjII8USmwD4lbvoWLHZgyR8XxzrWNDiFFkkUSVpwlSYZ X-Received: by 2002:a17:907:1303:b0:78d:ee08:1867 with SMTP id vj3-20020a170907130300b0078dee081867mr3189861ejb.123.1668707568575; Thu, 17 Nov 2022 09:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668707568; cv=none; d=google.com; s=arc-20160816; b=UTwBISGhcRbaBpUUf0Pz8dGlwiKE0dwEJXazKtXJuH7AB6l3yrPix9qgz07Tx7vQqa 5wUMNxS96Y/qNIwBML40owpNG8peOFVv4XGEdhHE3VPMukMFM0p/CBmA5G96aQv4DREJ gXMWjLY4/agacCZp3luKYMSkKbY6Xa9x1I+GwQ+3S+GlqrnXOiOCndqfMsBfNzDGrOVe uJcrflFCBPYsx6Hwq1ln/aNepABXk+pIFt3saKXfdg+wb0uG4hPAYUYWsm4bMjMdm0xj CEW0vFReV1GR4XHNe5tqOS07EzhuqzS8k1WDKckdt2oJbe1CFaujc9LVSgpP3EI6gjRf +8fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8aS5Na3hfuVFBdMV1H6ui0ERECXA6N53DRXZ/V+R+A0=; b=PmEjaFVfKMQA+IQQ3BotuvUIo7SS7o4PWw09A/860HUJT1tDbrBMt0Plx+CKPPNW0S m7mJy5xakkp0JRbKBT/iHiqAaXcn2V14Mu0Wt8nOxOLZ43ijBvYElb+DtUcScGBvzYKB Lv2gldfpNCubcFlKfp//DsoHPi8vJDQA0qc/2WjCBJjk8G4B1q+oZX9NWEsQeMlfvtYY Ls/4DRzg6YocEu7utB5ZgNqOmQD2ufyBmagKKMWJgH13V6M5eYICnf/iEzR7cZ66D6Z0 FYwzx/ypc41pTSCWcJkqsYygHWM9aMCVygcTimicmVtF8ZrZlmHWIiH35RDguCKmOcze IlGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XuJgXHQ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z3-20020a1709067e4300b00711da52c6e4si899830ejr.309.2022.11.17.09.52.25; Thu, 17 Nov 2022 09:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XuJgXHQ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234990AbiKQRYv (ORCPT + 93 others); Thu, 17 Nov 2022 12:24:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230447AbiKQRYt (ORCPT ); Thu, 17 Nov 2022 12:24:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C03614C252; Thu, 17 Nov 2022 09:24:48 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA5B0621D6; Thu, 17 Nov 2022 17:24:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC912C433D6; Thu, 17 Nov 2022 17:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668705887; bh=ciiPAicDMVFm+5iziU6lbJHVrHXpHFnxKld+29nDL1M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XuJgXHQ/a4azaN3G9sfhFb0/beyFlIKresutiY2PqHYvWxmB9C7g44/PXB10ktYXI T6sFpsASiTE7MEWVFdt5HDA3mtvqqpQWAt14saQRhpiLqKD+Vg1ktBRcQ/NkzarEW9 p0PMPBeLnwOOoUbiNHsmYFgqLUB7JZloyUiSILjZg5NT60b5Xy6rV1kvB6ymE3HCIy CMAYSGWg5UzbG4/FtDiUhPUcjjJkFvofQ3M3DBfF1VapkQ2ozTdOjcZEBdyk7Goxpg 3ADmKSqU5Y7cMtJZvka+lmNaZjIxm2hiU+TLf4joWUvJqR0RW6Crhsirmvrc456w/9 Hd1WFhtA8ekTw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9F5F34034E; Thu, 17 Nov 2022 14:24:43 -0300 (-03) Date: Thu, 17 Nov 2022 14:24:43 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Namhyung Kim , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Adrian Hunter , linux-perf-users@vger.kernel.org, Leo Yan , German Gomez , Zhengjun Xing , James Clark , Athira Jajeev Subject: Re: [PATCH 05/12] perf test: Add 'leafloop' test workload Message-ID: References: <20221116233854.1596378-1-namhyung@kernel.org> <20221116233854.1596378-6-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Nov 17, 2022 at 09:16:58AM -0800, Ian Rogers escreveu: > On Thu, Nov 17, 2022 at 8:15 AM Arnaldo Carvalho de Melo > wrote: > > > > Em Thu, Nov 17, 2022 at 01:06:16PM -0300, Arnaldo Carvalho de Melo escreveu: > > > Em Wed, Nov 16, 2022 at 03:38:47PM -0800, Namhyung Kim escreveu: > > > > The leafloop workload is to run an infinite loop in the test_leaf > > > > function. This is needed for the ARM fp callgraph test to verify if it > > > > gets the correct callchains. > > > > > > > > $ perf test -w leafloop > > > > > > On fedora:36 > > > > > > In file included from /usr/include/bits/libc-header-start.h:33, > > > from /usr/include/stdlib.h:26, > > > from tests/workloads/leafloop.c:2: > > > /usr/include/features.h:412:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] > > > 412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) > > > | ^~~~~~~ > > > cc1: all warnings being treated as errors > > > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/tests/workloads/leafloop.o] Error 1 > > > make[5]: *** Waiting for unfinished jobs.... > > > > > > I'll try removing the _FORTIFY_SOURCE > > > > Works after I added this to datasym.c, leafloop.c and brstack.c: > > Is there a reason we are compiling without -O ? Perhaps we can filter I assumed so as Namhyung added it, perhaps he is just carrying it from the pre-existing shell tests? I wonder its to have a predictable binary output that the test expects when doing things like hardware tracing? As it come from the coresight tests, IIRC. - Arnaldo > setting _FORTIFY_SOURCE so that it depends on -O being enabled. > Thanks, > Ian > > > diff --git a/tools/perf/tests/workloads/leafloop.c b/tools/perf/tests/workloads/leafloop.c > > index 1bf5cc97649b0e23..5d72c001320e3013 100644 > > --- a/tools/perf/tests/workloads/leafloop.c > > +++ b/tools/perf/tests/workloads/leafloop.c > > @@ -1,4 +1,5 @@ > > /* SPDX-License-Identifier: GPL-2.0 */ > > +#undef _FORTIFY_SOURCE > > #include > > #include > > #include "../tests.h" -- - Arnaldo