From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4B56C4167B for ; Thu, 30 Nov 2023 17:18:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345950AbjK3RRy (ORCPT ); Thu, 30 Nov 2023 12:17:54 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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