Re: [PATCH v6 00/27] Constify tool pointers
From: Ian Rogers <irogers@google.com>
Date: 2024-08-12 18:10:15
Also in:
linux-perf-users, lkml
On Mon, Aug 12, 2024 at 6:53 AM Arnaldo Carvalho de Melo [off-list ref] wrote:
On Fri, Jul 19, 2024 at 09:26:57AM -0700, Ian Rogers wrote:quoted
On Fri, Jul 19, 2024 at 1:51 AM Adrian Hunter [off-list ref] wrote:quoted
On 18/07/24 03:59, Ian Rogers wrote:quoted
struct perf_tool provides a set of function pointers that are called through when processing perf data. To make filling the pointers less cumbersome, if they are NULL perf_tools__fill_defaults will add default do nothing implementations. This change refactors struct perf_tool to have an init function that provides the default implementation. The special use of NULL and perf_tools__fill_defaults are removed. As a consequence the tool pointers can then all be made const, which better reflects the behavior a particular perf command would expect of the tool and to some extent can reduce the cognitive load on someone working on a command. v6: Rebase adding Adrian's reviewed-by/tested-by and Leo's tested-by.The tags were really meant only for patch 1, the email that was replied to. But now for patches 2 and 3: Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>Applied 1-3, 4 is not applying, I'll look at it later.
I have a rebase and can resend. I haven't addressed Adrian's feedback as I prefer callers of the tool function pointers not to have to do NULL tests, I'm trying to minimize spaghetti. Not sure if you're applying the whole series here or just the beginning. Thanks, Ian