linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] tracing: Clean up how iter is freed
@ 2023-07-13 15:45 Steven Rostedt
  2023-07-13 15:46 ` [PATCH 1/2] tracing: Remove unnecessary copying of tr->current_trace Steven Rostedt
  2023-07-13 15:47 ` [PATCH 2/2] tracing: Add free_trace_iter_content() helper function Steven Rostedt
  0 siblings, 2 replies; 9+ messages in thread
From: Steven Rostedt @ 2023-07-13 15:45 UTC (permalink / raw)
  To: LKML, Linux Trace Kernel; +Cc: Masami Hiramatsu, Mark Rutland, Zheng Yejian

The trace iterator is used in various interfaces and needs to be consistent
in how it is cleaned up. Add a helper function to clean up its content. But
before doing so, I noticed that iter->trace is allocated then the content
of tr->current_trace is copied to it. There's no reason for this, so the
first patch removes that allocation and just points to the content of
tr->current_trace, as tr->current_trace can change, but the content should
not.

Steven Rostedt (Google) (2):
      tracing: Remove unnecessary copying of tr->current_trace
      tracing: Add free_trace_iter_content() helper function
----
 kernel/trace/trace.c | 62 +++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

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

end of thread, other threads:[~2023-07-15 13:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13 15:45 [PATCH 0/2] tracing: Clean up how iter is freed Steven Rostedt
2023-07-13 15:46 ` [PATCH 1/2] tracing: Remove unnecessary copying of tr->current_trace Steven Rostedt
2023-07-14  8:38   ` Masami Hiramatsu
2023-07-13 15:47 ` [PATCH 2/2] tracing: Add free_trace_iter_content() helper function Steven Rostedt
2023-07-14  8:47   ` Masami Hiramatsu
2023-07-14 14:22     ` Steven Rostedt
2023-07-15  5:15   ` Zheng Yejian
2023-07-15 13:42     ` Steven Rostedt
2023-07-15 13:54       ` 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).