Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp944326rdb; Fri, 17 Nov 2023 18:52:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGlVRGCLSRnFKLeYHmbYF2bc1qUWclVZ7aEnXyrtorH5bCFKN1uOfj+NVfB6CwZAJzPZlR X-Received: by 2002:a05:6a20:748e:b0:186:58d6:ca65 with SMTP id p14-20020a056a20748e00b0018658d6ca65mr1416125pzd.32.1700275946654; Fri, 17 Nov 2023 18:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700275946; cv=none; d=google.com; s=arc-20160816; b=vV33tA1QTgIN9qJ7GGlpwle7OpySbr30H/ANNgpvDmfLgfcwsRQhnAKVp1RIm8AZa7 JZSyTQlFkM1IdxtgfLUxKQiJYmrW3OCq23bdjtIQ0U41+4l1iKhTua5pV4mGdY90GJpu bqs5AyjO4ziNeq4SarT5YEsKyn0eLNi1X7cZ416H/50wteHBnWmLgDCuzBnWUZHz7mat mnZbqGApO54uqcUQhG5dvToAypN5LZ6+bSg/YP58pLETSlYDPDPmGmlKLHDimua0jFKP i8Iz7DFl3GNm/q8/G001FvN9EQupqrqYPU/PjDb7+bGGtQb4uLKsG2nNe6n0G2U2BkHh qvUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=428YcJDl2841MoLUgmgdFq+T+No+CBRQs8VuOqNLiQw=; fh=DIzfUWfj21RIAI8ibHhNFjdiKeApGT6CviQ22JnUOaM=; b=GA/jTbGQZk6/Lcnb6vtdUlXXDal1Tjgh8rNrQGcZ9nGGHZ/hvKLF1wLi1ATbPIiSrQ EbH6YBGNcWSdw77InOLwwhMVz5tIxu22Qw+sAD6TOxmYLH+dCdRFatVJFhWUQcCw7C/c 8B3l8lQ7lhcZnigzmavKmCvfwuoElnvVRdWGKL6pjoJi4gh8bt+1KsGtQlwFfVNUrLPM 6ERXxlaL/PwSlcpzfKLPAG2o4aKLqoV/7+jc/epuaUgAOqi7DmkO41wmQXNbH/PSHBFB y3/TyMzctuAJ4+/f1qLoBhBx2gXglmKRhkcdGjm23K6X03EXiXtPDe6mxGCFUd80e4Qd 998g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id 34-20020a631562000000b005b909afef1fsi3127540pgv.518.2023.11.17.18.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 18:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4264580B8E60; Fri, 17 Nov 2023 18:52:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232891AbjKRCvy (ORCPT + 99 others); Fri, 17 Nov 2023 21:51:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232840AbjKRCvv (ORCPT ); Fri, 17 Nov 2023 21:51:51 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E17A710D0; Fri, 17 Nov 2023 18:51:43 -0800 (PST) Received: from kwepemm000003.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SXJ9Y1ChyzsR5m; Sat, 18 Nov 2023 10:48:17 +0800 (CST) Received: from ubuntu2204.huawei.com (10.67.174.22) by kwepemm000003.china.huawei.com (7.193.23.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 18 Nov 2023 10:51:40 +0800 From: Yang Jihong To: , , , , , , , , , , , , CC: Subject: [PATCH 2/3] perf lock contention: Fix a build error on 32-bit Date: Sat, 18 Nov 2023 02:48:57 +0000 Message-ID: <20231118024858.1567039-3-yangjihong1@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231118024858.1567039-1-yangjihong1@huawei.com> References: <20231118024858.1567039-1-yangjihong1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.22] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm000003.china.huawei.com (7.193.23.66) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 17 Nov 2023 18:52:06 -0800 (PST) Fix a build error on 32-bit system: util/bpf_lock_contention.c: In function 'lock_contention_get_name': util/bpf_lock_contention.c:253:50: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'u64 {aka long long unsigned int}' [-Werror=format=] snprintf(name_buf, sizeof(name_buf), "cgroup:%lu", cgrp_id); ~~^ %llu cc1: all warnings being treated as errors Fixes: d0c502e46e97 ("perf lock contention: Prepare to handle cgroups") Signed-off-by: Yang Jihong --- tools/perf/util/bpf_lock_contention.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/bpf_lock_contention.c b/tools/perf/util/bpf_lock_contention.c index e105245eb905..f1716c089c99 100644 --- a/tools/perf/util/bpf_lock_contention.c +++ b/tools/perf/util/bpf_lock_contention.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "bpf_skel/lock_contention.skel.h" #include "bpf_skel/lock_data.h" @@ -250,7 +251,7 @@ static const char *lock_contention_get_name(struct lock_contention *con, if (cgrp) return cgrp->name; - snprintf(name_buf, sizeof(name_buf), "cgroup:%lu", cgrp_id); + snprintf(name_buf, sizeof(name_buf), "cgroup:%" PRIu64 "", cgrp_id); return name_buf; } -- 2.34.1