On Thu, 6 Feb 2025 10:29:49 -0500 Steven Rostedt <rost...@goodmis.org> wrote:
> On Thu, 6 Feb 2025 17:26:42 +0900 > Masami Hiramatsu (Google) <mhira...@kernel.org> wrote: > > > This maybe too frequently scan the module because the update_last_data() is > > called when; > > - change tracer (this maybe OK) > > - update "set_event" > > - write 1 to "enable" under events > > - change pid filter > > - etc. > > > > Once it is scanned, it should not scan again, but update by module > > callback, because usually events are enabled individually (thus > > write 1 to "event" can happen multiple time online). > > > > I think we can move this after TRACE_ARRAY_FL_LAST_BOOT check, > > if TRACE_ARRAY_FL_LAST_BOOT flag is set, that flag should be cleared > > with updating the tscratch, and the flag is not set, we can skip updating > > the scratch. > > No, because we could enable it, disable it, and then the user could be > adding and removing modules all day long, and we only add and do not remove > (I do have a patch that does remove them). I think TRACE_ARRAY_FL_LAST_BOOT is something like one-way flag, it is set if the buffer is persistent, but cleared when it is reused (start writing) and never be back. Isn't it? > > But we can do the same check as patch 8 does, and only do this if the > tracer wasn't already active. Yeah, so I think this change needs patch 8 change. Thank you, > > -- Steve -- Masami Hiramatsu (Google) <mhira...@kernel.org>