Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4021103rdh; Tue, 28 Nov 2023 09:38:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHtwUKkWNjB8uyS6QlMPRyY2M44oxW8XwfTG2HjSSJryZnqEheFSHwDxmdZ9FSiI9b7mBEx X-Received: by 2002:a05:6a00:3018:b0:6cb:6a4d:3a80 with SMTP id ay24-20020a056a00301800b006cb6a4d3a80mr22009238pfb.5.1701193107140; Tue, 28 Nov 2023 09:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701193107; cv=none; d=google.com; s=arc-20160816; b=MtmBfcfiizt/54alL9K1G2e95E7+Iu2UsQXlWkO3YRAiF4QAZGu8hPyD4ib8UKZzAL oycpUBC6E9owcXLvKATaUJq6itOEqISdyz1GyWxk00zAOOier3kh9LQg2K4haMZLQolR Q8f/kMu6YY/GSklFZ4KJ2AMTFGht0SoU3rnNw4zMGjLG04tc8dEb58x/lS7kgH3urhqG GcTbHCXhZFCiJy60Aoqarbnw6aTEcIxSdeuPUnUm2AhGcCoykG6hpXl5jwVQPhb0uuKQ +QFbpRGlSbm6wTIg7sIyd9bYBfBclYOYJAiOO/n15jk1oV0W+6e7+8P3XkK64dfuB0RG Aq2g== 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=x5cTX88f93gnWBlAQafvfOJBhrZ99Ousb25KdHguSAw=; fh=+v6iOBhBPepiTm5jfh5hb/DbZOKRJ3o62f2r0DhfAo4=; b=DmIigstZuwUPKjO70NmN3QnPquZGtuXIwA1nrqHC2aOrf4/WENjXwVMzJs2IrU2noE UCgKWcxwWoZlrO7gdTcFOlKTjKYDo1Qu5OtFcMCN5ar8rTAKYk06qWOUXitV5H7NBnY3 XtOgl9mCq2iCQhvQ4AbIpVLm/vulLDNlYU16rcWqM79L9NJA2mt/RHCsJ0D5ceyV3q4H wZ7fIJCntTBUtc5azShHCRSR+Dg2cAWdXjEFqf4pCxhQ+znWN9m+9Xlzrk67TGti8a/E nOO5Lu74K83+DsEMhv5Rm8qw5S8VI8Mnlguj0aR96WXWKHAyC2oWJE15aO/vnaQi5dLW l4SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bz4SkCeb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id b24-20020aa78118000000b006cc0288a7basi7978880pfi.33.2023.11.28.09.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 09:38:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bz4SkCeb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 5D7F780A9D75; Tue, 28 Nov 2023 09:38:24 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345971AbjK1RiH (ORCPT + 99 others); Tue, 28 Nov 2023 12:38:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345467AbjK1RiG (ORCPT ); Tue, 28 Nov 2023 12:38:06 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23C858F for ; Tue, 28 Nov 2023 09:38:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 595FFC433C8; Tue, 28 Nov 2023 17:38:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701193091; bh=RNOf8IUGxxmeyuakZPDZPc9mbJAGG9faA4v5329Ernw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bz4SkCebOTVMTP6Qa7rIp0+bVTQpj0o9TlcZB74as2jAGtg3bYSAUF7Xbs9XhxoJf i3H5zpbjrNdQ0Z9wMVcezaM/z7GU0TOr0qLMPnsQHNFvlCAYh21X/M/GwZDZ2cMuNS ywI6hyORJRnNNuxwrqFV/iY/q6YIFxsVh636iQ8iMZiOr/H/fHWb2yBdMuXvHDJOaI bUg+40VS2I1a6IlJhSAD/b2Qa312hcR4XAFBnd6vJV5JxOcGhl68xRcr9OrasJeocY hWqHXmTy+C5hSwokkLdo9b29Af/tfyOqn+D3oAYRsNuJJB+Eilv9ooTrdP7wvKVtgl CDs1Pb8P4o1vg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 0EDFA40094; Tue, 28 Nov 2023 14:38:09 -0300 (-03) Date: Tue, 28 Nov 2023 14:38:08 -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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 09:38:24 -0800 (PST) Em Tue, Nov 28, 2023 at 02:14:33PM -0300, Arnaldo Carvalho de Melo escreveu: > 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'? So the problem was really the one above, that got fixed with the patch below, that is what 'man size_t' documents on my fedora:38 system. - Arnaldo diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h index 9eb6eb5bf038ce54..b29109cd36095c4f 100644 --- a/tools/perf/util/compress.h +++ b/tools/perf/util/compress.h @@ -3,7 +3,8 @@ #define PERF_COMPRESS_H #include -#include +#include +#include #ifdef HAVE_ZSTD_SUPPORT #include #endif > 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, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > --