Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp469166rdb; Thu, 30 Nov 2023 09:18:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEP+1pyPF1w0PEUVTeZ2uVd8oZjy3IPZ1gC5k3GKw2hKeL5NB0ewT2eMHgyOgqRPghlhOEy X-Received: by 2002:a05:6a20:9145:b0:18b:e6c7:7c72 with SMTP id x5-20020a056a20914500b0018be6c77c72mr22485509pzc.57.1701364704487; Thu, 30 Nov 2023 09:18:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701364704; cv=none; d=google.com; s=arc-20160816; b=O9bm/IhKD7ZMKUNPMDxgb9BtWUkwPCJZAn5c79afv8j6At3HZRYstB4bQEv0uSQyUe tPyvyP5HNWHejfMKiY1SpEAraJKNXJL5GqAUZeLPTIjJ70rJfHWRK/s+rjgI6VbkWw6s EKG14k1FFYeSvT9w6FFU3Qmc5LBEeDNbB441f54b0HuqAQEKy9rBleHGoGbqamCRim/N xWP2tPrVRhjYjr3/i/mzRqmwIStmsqeUg/IqgNZSs6vE1QHp1d2Z/Wa0TkFCrTOVjwrR 6O18sHvxbYjqjcx7TLbUBvhmxLePerUUx0X3MOr6GvzL1b5REMqcZtVYjoGTvxSDI5hi puVw== 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=nvWqkbbMjZTrAA/xYUu5Y0mrg+0DIA6Cl5eb0Vd2WrY=; fh=qIobCfX76lsQY4tPHmFabU/v7o/CpMmoYC6lNgko6fI=; b=hBC3psyPI5FG05x6y1GFykCybPHIQ6x430JVWG//wujEsjyp/3sfUJsNqaCBNUXqt0 NChfQmCzkjrVjJmBdC7LMI6CPmpf6ETRNtzhyOhkBWrLN2po/JcA2E3Ptib6+HnuPfy8 5qG6/U+20YUzbLSzJwQxN741QK7cLNuPA70Sg2QIWE4L8LhHCJuNkHdYkej+INJ88OZu hHun2Ru1MSUpfgIAkYHz+j1XmFmobnQM6uGPGzKW4WY/a8ERLwl92Yy8uXyofhnIP+Op uAv2jACJGrSLYsu8ja6xisa1xgoCB0WGkQkuzxfz90H0Pyn/3f3fSgEJ5izxi+T0a5St Fgkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k1Tdc1Co; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id e13-20020a056a001a8d00b006cb852928ffsi1651797pfv.66.2023.11.30.09.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 09:18:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=k1Tdc1Co; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id C263682A176F; Thu, 30 Nov 2023 09:18:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232280AbjK3RRw (ORCPT + 99 others); Thu, 30 Nov 2023 12:17:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbjK3RRi (ORCPT ); Thu, 30 Nov 2023 12:17:38 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C19BE1993 for ; Thu, 30 Nov 2023 09:17:34 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BE85C433C7; Thu, 30 Nov 2023 17:17:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701364654; bh=ov/IfYsQplFcmSodemtHJLL3XrICMOvduLqoUc5oKMw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=k1Tdc1Co+ALyIJcaK0n5iLj9dtr3U4+7LMseLqWxHJrzFLYBMZdyFto7Hmh8fxgBf tp1m9x0GX4CjL6ffboSceynAn25RSEbvYf+E1B0WPQ0OF8keoKmr0sRd289lmcEfac xQEwrD/gzhS6xTs4+VAek+JXsA6lWku3It8r/p0J73d8mLzCmJX6KKFpZTx34EkfvB on+SkCGKBudNboM42YQj74+9OZE4CukTQO5BIg5I2Kf6D+JKGM5UY9mPbDZdiSoV0Z iT7nXMDoK9K+JMELInXtjfk7227phdAeaBPvXGagjljcFXldgpHErKMDqrocd42Fdb eDiLXQgb5zPlw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 9DC2840094; Thu, 30 Nov 2023 14:17:31 -0300 (-03) Date: Thu, 30 Nov 2023 14:17:31 -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, Guilherme Amadio Subject: Re: [PATCH v5 02/50] libperf: Lazily allocate/size mmap event copy Message-ID: References: <20231127220902.1315692-1-irogers@google.com> <20231127220902.1315692-3-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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, NUMERIC_HTTP_ADDR,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 morse.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 (morse.vger.email [0.0.0.0]); Thu, 30 Nov 2023 09:18:21 -0800 (PST) Em Thu, Nov 30, 2023 at 11:19:51AM -0300, Arnaldo Carvalho de Melo escreveu: > Em Thu, Nov 30, 2023 at 10:15:43AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Mon, Nov 27, 2023 at 02:08:14PM -0800, Ian Rogers escreveu: > > > void perf_mmap__munmap(struct perf_mmap *map) > > > { > > > - if (map && map->base != NULL) { > > > + if (!map) > > > + return; > > > + > > > + free(map->event_copy); > > > + map->event_copy = NULL; > > > > I?m converting this to: > > > > zfree(&map->event_copy); > > > > Hopefully we'll find some tool to flag these before submitting patches, > > does clang-tidy do these kinds of things? > > > > Also, applied: > > > > b4 am -P2,4-7 -ctsl --cc-trailers 20231127220902.1315692-1-irogers@google.com > > > > The ones that Namhyung acked and that applied cleanly in order. > > > > The first one, as Namhyung noted, is already merged. > > I'll fix this later: > > [perfbuilder@five ~]$ export BUILD_TARBALL=http://192.168.86.5/perf/perf-6.6.0-rc1.tar.xz > [perfbuilder@five ~]$ time dm > 1 16.97 almalinux:8 : FAIL gcc version 8.5.0 20210514 (Red Hat 8.5.0-20) (GCC) > In file included from fs/fs.c:19: > fs/../io.h:94:46: error: unknown type name '__u64' > static inline int io__get_hex(struct io *io, __u64 *hex) Added the following patch to just before your patches. https://lore.kernel.org/all/ZWjDPL+IzPPsuC3X@kernel.org/T/#u tldr; missing linux/types.h for __u64 in api/io.h. - Arnaldo