Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4005708rdh; Tue, 28 Nov 2023 09:15:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0X4RtQuykrOu2+1eesp7Qwp65WHkVdN6Mr82Sw/xSfpolXgtczgo3O+0SYRHlj6RS8SqO X-Received: by 2002:a17:90b:212:b0:285:81aa:aeb7 with SMTP id fy18-20020a17090b021200b0028581aaaeb7mr17044804pjb.8.1701191700020; Tue, 28 Nov 2023 09:15:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701191700; cv=none; d=google.com; s=arc-20160816; b=JlE41UzHaXTK7uVlv3ZAISuLsJKDWJa8JXySCfzJXVieA86FFESZMbzbVZAUwO2+hs HpcZj1x8EkiivSurxAm26q+tX8YeSIOUbX8TFnOqkUo6tBChik9Y9roUYzSWz4AWDPsQ eYo0jzUu19RjR9CmxKjtHSTJtDgwDer816ehGyU+3KEx8hPUlfMTLTI8kWueR1URwice QXE/KpHgBQfIgNxzda1zaCbj/i0cw2Jcuyrp7u1IStP8QUVg8/huDb306nzSGmbjpnSk Rw6vHH0nAKecA6Bl2aH55HPl4f8jcxMjWCVyqlCMZwu14MCvk3MLtl0Qhm1Wx+Vy+LLp IWuw== 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=MuKELBwtGVgPPy4gdanblILjvWHQtH49N0oxNvUe4xA=; fh=+v6iOBhBPepiTm5jfh5hb/DbZOKRJ3o62f2r0DhfAo4=; b=D6tP7J+HY6EMYvDEVWN4SXk1OLFxZ+SSIxvf9+jb3jqV+T/oZ9NGULiyJR3fz3rJh8 1kGSJ2ntBP/91AQ65hiXiYJVPP/rVzPReDFsLWe2t0sdIsGUdN+nwSTn0tkelBqFiSMs TbQnthTgniLOH/Co/bMjygOASk+Lc3fW3lpb6afXBHDd0UKGNL42PjxH2L6gQ5jD7DtU 4bBrnpdXCpMoHSC4fv1E5LmAI+h4rUx7k2D6A33lnM2HCPP6rsBxWxNrX4lRALL9uOaD 1y1Mb4eMle1hlqx1HMGCbn3V6D38RInxg4LYT5DxKHCeYhlnfEwkbWz10/58/5MYTt/5 QDtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tyn9rQF5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id g7-20020a17090a4b0700b002851017a187si12384172pjh.162.2023.11.28.09.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 09:14:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Tyn9rQF5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id B8A7980A21B0; Tue, 28 Nov 2023 09:14:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344566AbjK1ROc (ORCPT + 99 others); Tue, 28 Nov 2023 12:14:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbjK1ROb (ORCPT ); Tue, 28 Nov 2023 12:14:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85674112 for ; Tue, 28 Nov 2023 09:14:37 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA55C433C7; Tue, 28 Nov 2023 17:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701191677; bh=OSYiw0qliE4wxSWnfVZhEHgdDnnePBx7WErooHMw5TQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tyn9rQF57Har0Jv+CLwhBqTpTpeoWjweB84mGZxhO1fTP/5uKsjRmObraK1uvrS97 VtE/bpe5p9bY/CKHafF57dD6AnGLD13qOTVAMSBpPESWGsUZOAqSmTUypd7ZS+uKSY m5s8LIf1vwNzmp9a8w8+zdvoOQRLUilm2EhROwkRS4uQ4NQ34qOaDIr1omNTbADCrR 2CxHSKc2Jc65E3iaUpEdPQ6U/IGFWUzDPt15M1bBy+ycvh1TU56mEyCYb94pa+LxpG FFrEH9nMB4Yi/dS+C8yur23kSlaJgQsYCLHyU30T5F+WLK/1acSLyrBPLz5FKgaGzs 8nKb7KVjjjH4A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id DB68640094; Tue, 28 Nov 2023 14:14:33 -0300 (-03) Date: Tue, 28 Nov 2023 14:14:33 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Kajol Jain , Athira Rajeev , Huacai Chen , Masami Hiramatsu , Vincent Whitchurch , "Steinar H. Gunderson" , Liam Howlett , Miguel Ojeda , Colin Ian King , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , Ming Wang , James Clark , K Prateek Nayak , Sean Christopherson , Leo Yan , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Li Dong , Sandipan Das , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH v4 04/53] perf mmap: Lazily initialize zstd streams Message-ID: References: <20231102175735.2272696-1-irogers@google.com> <20231102175735.2272696-5-irogers@google.com> 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=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Tue, 28 Nov 2023 09:14:56 -0800 (PST) Em Mon, Nov 27, 2023 at 07:00:06PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Nov 02, 2023 at 10:56:46AM -0700, Ian Rogers escreveu: > > Zstd streams create dictionaries that can require significant RAM, > > especially when there is one per-CPU. Tools like perf record won't use > > the streams without the -z option, and so the creation of the streams > > is pure overhead. Switch to creating the streams on first use. > > > > Signed-off-by: Ian Rogers > > Thanks, applied to perf-tools-next. Trying to fix this now: 6 20.59 alpine:3.18 : FAIL gcc version 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10) In file included from util/zstd.c:5: /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:1: error: unknown type name 'ssize_t'; did you mean 'size_t'? 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~ | size_t util/zstd.c:31:9: error: conflicting types for 'zstd_compress_stream_to_records'; have 'ssize_t(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'long int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 31 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:9: note: previous declaration of 'zstd_compress_stream_to_records' with type 'int(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 CC /tmp/build/perf/util/zstd.o CC /tmp/build/perf/util/cap.o CXX /tmp/build/perf/util/demangle-cxx.o CC /tmp/build/perf/util/demangle-ocaml.o In file included from util/zstd.c:5: /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:1: error: unknown type name 'ssize_t'; did you mean 'size_t'? 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~ | size_t CC /tmp/build/perf/util/demangle-java.o util/zstd.c:31:9: error: conflicting types for 'zstd_compress_stream_to_records'; have 'ssize_t(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'long int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 31 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:9: note: previous declaration of 'zstd_compress_stream_to_records' with type 'int(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, 7 21.14 alpine:edge : FAIL gcc version 13.1.1 20230722 (Alpine 13.1.1_git20230722) In file included from util/zstd.c:5: /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:1: error: unknown type name 'ssize_t'; did you mean 'size_t'? 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~ | size_t util/zstd.c:31:9: error: conflicting types for 'zstd_compress_stream_to_records'; have 'ssize_t(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'long int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 31 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:9: note: previous declaration of 'zstd_compress_stream_to_records' with type 'int(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ make[3]: *** [/git/perf-6.6.0-rc1/tools/build/Makefile.build:158: util] Error 2 CC /tmp/build/perf/util/cap.o CXX /tmp/build/perf/util/demangle-cxx.o CC /tmp/build/perf/util/demangle-ocaml.o CC /tmp/build/perf/util/demangle-java.o In file included from util/zstd.c:5: /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:1: error: unknown type name 'ssize_t'; did you mean 'size_t'? 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~ | size_t util/zstd.c:31:9: error: conflicting types for 'zstd_compress_stream_to_records'; have 'ssize_t(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'long int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 31 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /git/perf-6.6.0-rc1/tools/perf/util/compress.h:34:9: note: previous declaration of 'zstd_compress_stream_to_records' with type 'int(struct zstd_data *, void *, size_t, void *, size_t, size_t, size_t (*)(void *, size_t))' {aka 'int(struct zstd_data *, void *, long unsigned int, void *, long unsigned int, long unsigned int, long unsigned int (*)(void *, long unsigned int))'} 34 | ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~