Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp624188pxb; Thu, 21 Oct 2021 06:28:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaYffxSad9l8cqn2RAWWJg8sMLECm4KfOx6yuRsm6geF3hmC1XwJzgJclhd4V747uNHEuH X-Received: by 2002:a17:90a:d24d:: with SMTP id o13mr6769566pjw.59.1634822894183; Thu, 21 Oct 2021 06:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634822894; cv=none; d=google.com; s=arc-20160816; b=DVn5AeYWkNLUB+xtOHjDPaOPVewNSyAQ4/hknzzDyNj9UC64YgeJTTMlr2xEfMlNhy 6RQvlt2CzHLTk5RDlTroh3Bxz3EKAaMYgc90cZCMNwU1qC0vcQHttQEfzLXOkVMHUDKG lOPrhG608qa0OKINMjJN+yYIgL/LqQG6ElX4UPv8fpTXKg4BVYL6oFj1YhryQAssPokQ hIkvXNqS0FEXPF527lfM4N4d2amCHvvhnI2PwlyNyxgECmpYEK62ojf2Re346x5/nyE+ 5L1uldcwfbCFMLoN9S8XpPx3OEAfPkJjnnHPxquGRU8fSE2gl97EoUnfS7KFGejv81t0 F8hQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vEl5sw71K9+wm6CwPmdtwFqSsPe+v6u5kafHKZa7At0=; b=puiDtZ0dCl9tew1GdDwXGPTIS6Xdhmj2KxgG8vTNSbC4YoeyzYqhkIOXjQqfmIfAzO aKFesYhjW0N4zAeOmNX9C9AIdvcceGIYimwIcQPuNQkxjjIwVEzNFaJrvk2jeG7phdJE A5wnS+lex8V+uwDRXdWXCYtOxv1Iu4xTjR6cXUGHgdCutASMep6mAgttemkrBxAKOFro AkFh/0CcMV9o8T7Tmaliw2F5xibQeC7n7G4HUxUp1i8JudhN0jjTr2BpMKUAt2EWCM9L DZ8ClpLsZLPFiQPRoCyAV9247+s1Oo82lWUTGepBlbQ6aeFfTkBCBwS1WinYMAwR1c3B ibxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LC3bzHXA; 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 lx2si10574980pjb.20.2021.10.21.06.27.58; Thu, 21 Oct 2021 06:28:14 -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=k20201202 header.b=LC3bzHXA; 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 S231293AbhJUN2M (ORCPT + 99 others); Thu, 21 Oct 2021 09:28:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:58344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230425AbhJUN2M (ORCPT ); Thu, 21 Oct 2021 09:28:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B47EB610CB; Thu, 21 Oct 2021 13:25:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634822756; bh=97EQWqxB+NgM73M8P2ikYsx5BVa/jFCaVEfOcLm4DAc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LC3bzHXANc9HNpdF1fCEzyxrw4yDtgeVY9RGeGo+Qh3KCwCCVjQSJDObGvPDRm9nu twT67ERS3WpER4BD9b/ZmeUZ/BSAdy661UWuwGGyHp9j/SsxzBj27Lfr9Q3HA7Pusl L6iOPJhGEazpR0tGObvShlLV+QSLto7HXtoJrGnwt7IP70B8F93Nl7ekeXlU3HMrZ3 SsUT38t5Ru3kAg+X+bjaimtvgtxrdqhCHFeIqRvMPMtOn3SpPmNlQByh7zoQ9YKHl/ vX+K2ZfV5oc8y6RLumbS6l9EOyyyvzh4lBqkPEtQgWnjzjMKaMucP+w86Y3THp7VRE jHzZFW17mb9CA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 789E2410A1; Thu, 21 Oct 2021 10:25:52 -0300 (-03) Date: Thu, 21 Oct 2021 10:25:52 -0300 From: Arnaldo Carvalho de Melo To: Alistair Francis Cc: linux-riscv@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, alistair23@gmail.com, namhyung@kernel.org, jolsa@redhat.com, alexander.shishkin@linux.intel.com, mark.rutland@arm.com, dave@stgolabs.net, dvhart@infradead.org, peterz@infradead.org, mingo@redhat.com, tglx@linutronix.de, atish.patra@wdc.com, arnd@arndb.de, Alistair Francis , Davidlohr Bueso Subject: Re: [PATCH v4 1/4] perf bench futex: Call the futex syscall from a function Message-ID: References: <20211020223920.2810727-1-alistair.francis@opensource.wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211020223920.2810727-1-alistair.francis@opensource.wdc.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Oct 21, 2021 at 08:39:17AM +1000, Alistair Francis escreveu: > From: Alistair Francis > > In preparation for a more complex futex() function let's convert the > current macro into two functions. We need two functions to avoid > compiler failures as the macro is overloaded. > > This will allow us to include pre-processor conditionals in the futex > syscall functions. > > Signed-off-by: Alistair Francis > Acked-by: Davidlohr Bueso > --- > tools/perf/bench/futex.h | 43 ++++++++++++++++++++++++---------------- > 1 file changed, 26 insertions(+), 17 deletions(-) Right after applying this one: In file included from bench/futex-hash.c:29: bench/futex.h: In function ‘futex_syscall’: bench/futex.h:52:61: error: ‘ts32’ undeclared (first use in this function); did you mean ‘s32’? 52 | return syscall(SYS_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); | ^~~~ | s32 bench/futex.h:52:61: note: each undeclared identifier is reported only once for each function it appears in bench/futex.h:49:82: error: unused parameter ‘timeout’ [-Werror=unused-parameter] 49 | futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, | ~~~~~~~~~~~~~~~~~^~~~~~~ bench/futex.h:53:1: error: control reaches end of non-void function [-Werror=return-type] 53 | } | ^ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/bench/futex-hash.o] Error 1 make[4]: *** Waiting for unfinished jobs.... In file included from bench/futex-wake-parallel.c:31: bench/futex.h: In function ‘futex_syscall’: bench/futex.h:52:61: error: ‘ts32’ undeclared (first use in this function); did you mean ‘s32’? 52 | return syscall(SYS_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); | ^~~~ | s32 bench/futex.h:52:61: note: each undeclared identifier is reported only once for each function it appears in bench/futex.h:49:82: error: unused parameter ‘timeout’ [-Werror=unused-parameter] 49 | futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, | ~~~~~~~~~~~~~~~~~^~~~~~~ bench/futex.h:53:1: error: control reaches end of non-void function [-Werror=return-type] 53 | } | ^ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/bench/futex-wake-parallel.o] Error 1 In file included from bench/futex-requeue.c:26: bench/futex.h: In function ‘futex_syscall’: bench/futex.h:52:61: error: ‘ts32’ undeclared (first use in this function); did you mean ‘s32’? 52 | return syscall(SYS_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); | ^~~~ | s32 bench/futex.h:52:61: note: each undeclared identifier is reported only once for each function it appears in bench/futex.h:49:82: error: unused parameter ‘timeout’ [-Werror=unused-parameter] 49 | futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, | ~~~~~~~~~~~~~~~~~^~~~~~~ bench/futex.h:53:1: error: control reaches end of non-void function [-Werror=return-type] 53 | } | ^ cc1: all warnings being treated as errors In file included from bench/futex-lock-pi.c:19: bench/futex.h: In function ‘futex_syscall’: bench/futex.h:52:61: error: ‘ts32’ undeclared (first use in this function); did you mean ‘s32’? 52 | return syscall(SYS_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); | ^~~~ | s32 bench/futex.h:52:61: note: each undeclared identifier is reported only once for each function it appears in bench/futex.h:49:82: error: unused parameter ‘timeout’ [-Werror=unused-parameter] 49 | futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, | ~~~~~~~~~~~~~~~~~^~~~~~~ bench/futex.h:53:1: error: control reaches end of non-void function [-Werror=return-type] 53 | } | ^ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/bench/futex-requeue.o] Error 1 make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/bench/futex-lock-pi.o] Error 1 In file included from bench/futex-wake.c:25: bench/futex.h: In function ‘futex_syscall’: bench/futex.h:52:61: error: ‘ts32’ undeclared (first use in this function); did you mean ‘s32’? 52 | return syscall(SYS_futex, uaddr, op | opflags, val, ts32, uaddr2, val3); | ^~~~ | s32 bench/futex.h:52:61: note: each undeclared identifier is reported only once for each function it appears in bench/futex.h:49:82: error: unused parameter ‘timeout’ [-Werror=unused-parameter] 49 | futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, | ~~~~~~~~~~~~~~~~~^~~~~~~ bench/futex.h:53:1: error: control reaches end of non-void function [-Werror=return-type] 53 | } | ^ cc1: all warnings being treated as errors make[4]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:96: /tmp/build/perf/bench/futex-wake.o] Error 1 make[3]: *** [/var/home/acme/git/perf/tools/build/Makefile.build:139: bench] Error 2 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile.perf:660: /tmp/build/perf/perf-in.o] Error 2 make[1]: *** [Makefile.perf:240: sub-make] Error 2 make: *** [Makefile:113: install-bin] Error 2 make: Leaving directory '/var/home/acme/git/perf/tools/perf' Performance counter stats for 'make -k BUILD_BPF_SKEL=1 CORESIGHT=1 PYTHON=python3 O=/tmp/build/perf -C tools/perf install-bin': 2,467.00 msec task-clock:u # 1.263 CPUs utilized 2,457.82 msec cpu-clock:u # 1.259 CPUs utilized 1.952573032 seconds time elapsed 1.444401000 seconds user 1.111434000 seconds sys ⬢[acme@toolbox perf]$