[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240729121034.455fe04d@rorschach.local.home>
Date: Mon, 29 Jul 2024 12:10:34 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Ajay Kaher <ajay.kaher@...adcom.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Mathias Krause <minipli@...ecurity.net>, Ilkka Naulapää
<digirigawa@...il.com>, Linus Torvalds <torvalds@...ux-foundation.org>, Al
Viro <viro@...iv.linux.org.uk>, regressions@...mhuis.info, Dan Carpenter
<dan.carpenter@...aro.org>, Beau Belgrave <beaub@...ux.microsoft.com>,
Florian Fainelli <florian.fainelli@...adcom.com>, Alexey Makhalov
<alexey.makhalov@...adcom.com>, Vasavi Sirnapalli
<vasavi.sirnapalli@...adcom.com>
Subject: Re: [PATCH] tracing: Have format file honor EVENT_FILE_FL_FREED
On Mon, 29 Jul 2024 18:29:49 +0530
Ajay Kaher <ajay.kaher@...adcom.com> wrote:
> Following is not related to this bug:
> event_release callback executed once 'dir' closed (no more ref), any
> specific reason to register with 'dir'/'enable' file. If not, could we
> register with the 'dir' instead of 'enable'.
I tried that at first but it got messy. The files are saved in an array
for all files in the directory. There is just one array for all
directories that gets passed to the creation functions. That is, it
doesn't grow the memory footprint with the number of directories and
files created. By adding a callback for each file seemed a bit more
robust (and easier to implement as it only modified what the array
pointed to).
Although, I could change this array to a director structure that has a
callback for when it is destroyed and an array of all the files. That
may be the better approach but it caused a bigger change to the code as
it changed a lot of the prototypes.
So I ended up with the per file callback. But it could be updated if it
is appropriate.
-- Steve
Powered by blists - more mailing lists