Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2499046rwb; Thu, 17 Nov 2022 11:36:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf5C7Fh2Nc+7/7io33T05aFlCPoRyzRap1dC+ZM/xKjnH/tbftOswLt0hWSS9xXpaCw3FZZE X-Received: by 2002:aa7:d88c:0:b0:468:ffca:6982 with SMTP id u12-20020aa7d88c000000b00468ffca6982mr1015235edq.282.1668713817975; Thu, 17 Nov 2022 11:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668713817; cv=none; d=google.com; s=arc-20160816; b=eq3/EdrSdwC2aetWPxcE4MsHJMBf1HelQb7i3Gnxw3ifYkqVHqDWGdkBcIL6LDWdWD Z/kIpYgnvDoK2BZ11oyYFykCi9Q+3jD49EFzkzmiMetiVTkiKvboS35t316OhL3oLIEf zxof/pg6wC9KT7bz2GDEH27R2YPPdPrCZ7G7/Y29HTBOYaDNhVwOKDTkO1oAD4C+WEcV PyBLhFpDko9CTW73FJDqbedWEytZN6DpiBMk+hq5Rdry/2C5lzcSC9s2jmzBzLakVzBW k5XoQYRTSIIPBxMrxcAYdQXkXnsS5ID11KDzLkyum3UpuTE3/tsTHjPGK/ICJnz0/+5v MYbA== 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; bh=7TiNyM9B5M+n2XUh8qUxi//SLLvzOC5yxBWOEqJpqDM=; b=dVzqA+m7uKNpsTPmjGpeXEAW31aM2q5lX52ExI1PcdrY9d9LS83HrtWYoRLkAoFh3b 2XAoREllTF7pH7PgD+jpvJxyxXqq1iJ144YJUx5LktQl+I6jgYHQauF+YjUKgXfKOUT9 FIsjImXn150mL1tHHva6DenupxBeJiZhfhjUBQLnEjqaWAetzbXsBUm2oWrlzsDO+UiO xv0wXBIlJzuF9WqgRXXjwE3TOwz4qaAVxuF++vzCONGB6/cbsOWr12cEm42rrRxpQuqZ GHJOxnWLYkUDrFfK0xekQGPpS0nlHsQI0KeK4hUX0ozGVIaQbJnH5HGsFE4OGbzm5Wui NxVg== ARC-Authentication-Results: i=1; mx.google.com; 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 g13-20020a056402090d00b004595af54eacsi1637308edz.226.2022.11.17.11.36.33; Thu, 17 Nov 2022 11:36:57 -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; 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 S235042AbiKQSMW (ORCPT + 92 others); Thu, 17 Nov 2022 13:12:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235066AbiKQSLu (ORCPT ); Thu, 17 Nov 2022 13:11:50 -0500 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CECA7FF39; Thu, 17 Nov 2022 10:11:48 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id p8-20020a056830130800b0066bb73cf3bcso1545424otq.11; Thu, 17 Nov 2022 10:11:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7TiNyM9B5M+n2XUh8qUxi//SLLvzOC5yxBWOEqJpqDM=; b=EFjPOR8TZIkh2AITRBxbIRluckgnZ5qj/qL/QFt+neUPNS5NIclcjE3TJUus16ilRL CuQWE0dcF600n6hKK/ex5haCg3i4Ee/SYaSX3FIzs4Gc8Wo3sTn8wFQQQjfERxwhP0wi Q4K5yXwC2IY/Z0nIg6krn+IJmcKa29ha5KyHg2gfTUfa9ngZpD6j+PULM+EWt7Krwd3C 7X2WSMw8omlCEsPqhAMwZv4lazQV6PVDjrw8oUeWtaJn0zY4E3CPoiyiWUsiZKU4TnLA iuSXOacJkDBDlv3LbofwpPraN0zXjyBj2F6EMYYqUgKQJO364/7c88MyllEsC/+K5JdR kYkg== X-Gm-Message-State: ANoB5pnPeZjOQpMZPcaISXuo7QQblWUd+HiYkBzfC7tM+7Pf6O+lsDDy CmeaC4BW17sWbk9dsxtIbffpi2Ev3oNxhep2UbM= X-Received: by 2002:a05:6830:1215:b0:66d:78b8:7b1a with SMTP id r21-20020a056830121500b0066d78b87b1amr2135173otp.206.1668708707662; Thu, 17 Nov 2022 10:11:47 -0800 (PST) MIME-Version: 1.0 References: <20221116233854.1596378-1-namhyung@kernel.org> <20221116233854.1596378-6-namhyung@kernel.org> In-Reply-To: From: Namhyung Kim Date: Thu, 17 Nov 2022 10:11:36 -0800 Message-ID: Subject: Re: [PATCH 05/12] perf test: Add 'leafloop' test workload To: Ian Rogers , German Gomez Cc: Arnaldo Carvalho de Melo , Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Adrian Hunter , linux-perf-users@vger.kernel.org, Leo Yan , Zhengjun Xing , James Clark , Athira Jajeev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no 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 Hi, On Thu, Nov 17, 2022 at 9:42 AM Ian Rogers wrote: > > On Thu, Nov 17, 2022 at 9:24 AM Arnaldo Carvalho de Melo > wrote: > > > > 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? Exactly :) > > > > 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. I think it just checks frame-pointer based callstacks on ARM to have the precise results for leaves and their parents. > > Would the following in the Build be better: > > ``` > # Undefine _FORTIFY_SOURCE as it doesn't work with -O0 > CFLAGS_leafloop.o = -g -O0 -fno-inline -fno-omit-frame-pointer > -U_FORTIFY_SOURCE > ``` > > We could also use make's `filter-out`. If we are disabling inlining > then there is also `-fno-optimize-sibling-calls` otherwise we can > still lose stack frames. I wonder if it's enough to use -O0 as it's enabled from -O2. Maybe we can get rid of -fno-inline as well. German, did you have any concerns for those options? Thanks, Namhyung