From patchwork Tue Feb 6 11:05:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Bristot de Oliveira X-Patchwork-Id: 19993 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1462253dyb; Tue, 6 Feb 2024 03:06:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMNkcri/jHwW6UvCOMTdQJSd223ngJ82q+A4mlqUvSEKddkiZMsHCN/efskmLXEmqKy6RW X-Received: by 2002:ac2:4ac4:0:b0:511:551a:c330 with SMTP id m4-20020ac24ac4000000b00511551ac330mr1507234lfp.16.1707217578037; Tue, 06 Feb 2024 03:06:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707217578; cv=pass; d=google.com; s=arc-20160816; b=gQWyUGb49x1XQHBrXvxuPfmSHkUv5JmHRx8g74JzG/c1AJAT5ktuIN5ALBfFIdAoGa WAvEdeLpGc2L+BJbo9SeC6FnbQd/0xUbRvtCGkEsRfli67U4qOaCmK7Nt5aoYVNnGfSc hjcj9mmiArLfi8GSM9/i5uGsgM7eswOqBKLwSl3Yt7htuMFNZ1nq3HkHChQi1dfztsdF +E80DoQrINrHnsCy4lCt5slxMd59+EfelNeKCN2sCTXzON4LvwZ/nfKiCy+gZTxglL0v FplCnBMr6Slh2En7vcrtwHugfn4yQ1eugKsPsuLHSDQFsG4oIRdnviqYcQGRQRl6vATh Uzpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=E+GgpCF5YnkDGc/72qLStSzm1jxvKGshxOlgl/Zu63U=; fh=rqZm5ibzZZvToStkIxDblIMklxgbVc+WflsO7zpDeU8=; b=wChbj79XfgAO6dsr0r3TaIYg0CV7q0lzR8Iod8N1PB1seXCsdiOtRVCccL/ZFRorni JoMUnjqj2wEMMEtdaRzg05ZHyJ21Be49cmpLGPhRwq0sl4OMAhZBofcWc0GyCz+Hawhi g0P1kK2Gor0Q0HNEWQFDAS80/QDSPoIpKXCfRHIk7qVmoPhyXI7N2fqX0cFGQYhMWJoB heXQ3zZy8vwGzQ0J3cMICIB9VR6JGFBJIjmRTdvMTCsatYQwqmf/9N2CDc/7xCfB+8WK AMeDjyoffMTyU5G0Ti0EdIOLjcKITLW10frjCpvKASOHuwjm7nBr7OYCJNFTYAqL6qEK 5OMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HMKCcY2O; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54736-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54736-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUUxSBSuDkQ1eD2sS2uR0d7gSgh6Wfqh4DDi9otThwcn5U4ZCoyPfZtx9ykkbauRiexr9SaBwxwxIGV+smI23NiShBFXA== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lo12-20020a170906fa0c00b00a37f9e7d105si967039ejb.262.2024.02.06.03.06.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 03:06:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54736-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HMKCcY2O; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-54736-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54736-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B40061F23915 for ; Tue, 6 Feb 2024 11:06:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C15B812EBEE; Tue, 6 Feb 2024 11:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HMKCcY2O" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFFF58131; Tue, 6 Feb 2024 11:05:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707217543; cv=none; b=MX3MVpNOwHOzYUQZb/HJBUN1U3p5tu92yHQj5GX6LZF0Ogy0XJRDdt6i0CBm/BtoBp2G9HrlWgFBf3so7kEr2VNas+xj+1fFEZ5PxCLBAM5tp9jrbpbLMvYEIYg1burYVakVJI38pslEvJL6SObgv10KKu+17hwYTnE3mhiql54= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707217543; c=relaxed/simple; bh=+sKgZu/0veJ04OfVo0LEnmbeU//UnOnHzs1l4gtuKKI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EbJKf0kDSjUqLXoiwwn3lKYpsOFHFUTZypVg1j2Sb+Vp1kszj8PJUPnCZZt70PtNJkqK0e7jJC3zAM/7Bkd/f3ltGP1c3t6O/SMbGDLVOC6HL7goKoF9xHf6p8fBnohK+rxlND1y4tyHsPshkxmsH/B/nlFTCy7E9Hq+m5qbHaI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HMKCcY2O; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01436C433F1; Tue, 6 Feb 2024 11:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707217542; bh=+sKgZu/0veJ04OfVo0LEnmbeU//UnOnHzs1l4gtuKKI=; h=From:To:Cc:Subject:Date:From; b=HMKCcY2Oh9+Ppy92uBJR6AEmhAkY7UPt3DD4Mgh6W9nSc9s7uX9Q6Ra3Mq/918mzU 6xjPoUNnP3iILjMRrokQIIoNlbZ4Hm4wwghuexuUKzFAYnQyJdSvvZljQKzIzcuET/ gn0ngDsj+gCML2STgi2TDVmljv8bVZkCmhrBEV05oSn/Y8VuKc04ufvkPLZG+UEite PgjavT8OKptn/obWJ/EW8pR7kng9xVpi1DvrrGyg5m1lT3KX2pZ4knhO8mt7zbq8iD hhb53HtUwDzjjCUQbGz7G3Eitxo3hNvkzinlbJaF+oM2r6OPcBliJSFXC3DEuymIay 0mxMNj3wOdY0w== From: Daniel Bristot de Oliveira To: Steven Rostedt Cc: Daniel Bristot de Oliveira , Masami Hiramatsu , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Donald Zickus , stable@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH 0/6] tools: Fix rtla and rv problems (found) with clang Date: Tue, 6 Feb 2024 12:05:28 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790147379574578744 X-GMAIL-MSGID: 1790147379574578744 RHEL people reported some errors when compiling rtla and rv with clang. The command line used to compile the tools is: $ make HOSTCC=clang CC=clang LLVM_IAS=1 The first problem is two unsupported flags passed to the compiler: -ffat-lto-objects and -Wno-maybe-uninitialized. They will be removed if the compile is clang. Also, the clang linker does not automatically recognize the -flto=auto option used at compilation time, so it is explicitly set. With the compiler working, it starts pointing to some warnings and errors about uninitialized variables, variable size, and an unused function. These problems are also fixed. Daniel Bristot de Oliveira (6): tools/rtla: Fix Makefile compiler options for clang tools/rtla: Fix uninitialized bucket/data->bucket_size warning tools/rtla: Fix clang warning about mount_point var size tools/rtla: Remove unused sched_getattr() function tools/rv: Fix Makefile compiler options for clang tools/rv: Fix curr_reactor uninitialized variable tools/tracing/rtla/Makefile | 7 ++++++- tools/tracing/rtla/src/osnoise_hist.c | 3 +-- tools/tracing/rtla/src/timerlat_hist.c | 3 +-- tools/tracing/rtla/src/utils.c | 8 +------- tools/verification/rv/Makefile | 7 ++++++- tools/verification/rv/src/in_kernel.c | 2 +- 6 files changed, 16 insertions(+), 14 deletions(-)