Skip to content

tracing: Clean up how iter is freed

Steven Rostedt linux-trace-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tracing: Remove unnecessary copying of tr->current_tracekernel/trace/trace.c+3 -190 replies
2/2tracing: Add free_trace_iter_content() helper functionkernel/trace/trace.c+22 -112 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMasami Hiramatsu (Google)
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] tracing: Clean up how iter is freed

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.

Changes since v1: https://lore.kernel.org/linux-trace-kernel/[email protected]/

- Updated the change log of patch 1, as I remembered why the copy was done.

- Remove the allocation and copy of the second patch. I started with the second patch and noticed that there was an inconsistency with the iter->trace. Where in one place it was allocated and copied and the second place it was just pointing to the tr->current_trace. I first started to make it be a copy as well, but then realized that the copy wasn't needed. I created the first patch but forgot to remove the copy and it ended up in the second patch.

Steven Rostedt (Google) (2):
tracing: Remove unnecessary copying of tr->current_trace
tracing: Add free_trace_iter_content() helper function

----

 kernel/trace/trace.c | 55 ++++++++++++++++++++++++----------------------------
 1 file changed, 25 insertions(+), 30 deletions(-)