tracing: Simplify and document the trace event filtering temp buffer code
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 0 repliesNew
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
Switch "unlikely" to "likely"
Test max_len <= instead of just <
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | tracing: Simplify the max length test when using the filtering temp bufferkernel/ | +3 | 0 replies | |
| 2/2 | tracing: Add better comments for the filtering temp buffer use casekernel/ | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH 0/2 v2] tracing: Simplify and document the trace event filtering temp buffer code
When filtering trace events, a temp buffer is used because the extra copy from the temp buffer into the ring buffer is still faster than the direct write into the ring buffer followed by a discard if the filter does not match.
But the data that can be stored in the temp buffer is a PAGE_SIZE minus the ring buffer event header. The calculation of that header size is complex, but using the helper macro "struct_size()" can simplify it.
Also, add more documentation about what is going on.
Changes since v1:
Switch "unlikely" to "likely"
Test max_len <= instead of just <
Steven Rostedt (VMware) (2):
tracing: Simplify the max length test when using the filtering temp buffer
tracing: Add better comments for the filtering temp buffer use case
----
kernel/trace/trace.c | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-)