From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AFC256443 for ; Thu, 30 Nov 2023 17:17:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k1Tdc1Co" 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> Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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