linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] tracing: Changes to saved_cmdlines
@ 2024-02-20 14:06 Steven Rostedt
  2024-02-20 14:06 ` [PATCH v4 1/3] tracing: Have saved_cmdlines arrays all in one allocation Steven Rostedt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steven Rostedt @ 2024-02-20 14:06 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel
  Cc: Masami Hiramatsu, Mark Rutland, Mathieu Desnoyers, Andrew Morton,
	Tim Chen, Vincent Donnefort, Sven Schnelle, Mete Durlu


The first patch is to consolidate the map_cmdline_to_pid into the allocate
page for the saved_cmdlines structure.

The second patch removes some open coded saved_cmdlines logic in trace.c
into a helper function to make it a cleaner move.

The third patch simply moves code around. The goal is to keep all the
saved_cmdlines logic in one place. Currently it's in two files (trace.c and
trace_sched_switch.c). Since trace.c is awfully large, move all the code to
trace_sched_switch.c, as that's its only purpose today anyway.

Changes since v3: https://lore.kernel.org/linux-trace-kernel/20240216210047.584712062@goodmis.org/

- The map_cmdline_to_pid field was moved into the pages allocated of the
  structure and that replaced the kmalloc. But that field still had
  kfree() called on it in the freeing of the structure which caused
  a memory corruption.

Steven Rostedt (Google) (3):
      tracing: Have saved_cmdlines arrays all in one allocation
      tracing: Move open coded processing of tgid_map into helper function
      tracing: Move saved_cmdline code into trace_sched_switch.c

----
 kernel/trace/trace.c              | 509 +------------------------------------
 kernel/trace/trace.h              |  10 +
 kernel/trace/trace_sched_switch.c | 515 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 528 insertions(+), 506 deletions(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-20 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-20 14:06 [PATCH v4 0/3] tracing: Changes to saved_cmdlines Steven Rostedt
2024-02-20 14:06 ` [PATCH v4 1/3] tracing: Have saved_cmdlines arrays all in one allocation Steven Rostedt
2024-02-20 14:06 ` [PATCH v4 2/3] tracing: Move open coded processing of tgid_map into helper function Steven Rostedt
2024-02-20 14:06 ` [PATCH v4 3/3] tracing: Move saved_cmdline code into trace_sched_switch.c Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).