Skip to content

tracing: Add string_has_prefix() and usages

Steven Rostedt linux-sh lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5string.h: Add str_has_prefix() helper functioninclude/linux/string.h+20 -00 replies
2/5tracing: Use str_has_prefix() helper for histogram codekernel/trace/trace_events_hist.c+14 -146 replies
3/5tracing: Use str_has_prefix() instead of using fixed sizeskernel/trace/trace.c kernel/trace/trace_events.c kernel/trace/trace_events_hist.c +2 more+6 -60 replies
4/5tracing: Have the historgram use the result of str_has_prefix() for len of prefixkernel/trace/trace_events_hist.c+5 -42 replies
5/5tracing: Use the return of str_has_prefix() to remove open coded numberskernel/trace/trace.c kernel/trace/trace_probe.c kernel/trace/trace_stack.c+18 -132 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLinus TorvaldsJoe PerchesAndreas SchwabMasami HiramatsuNamhyung KimTom Zanussi
SeriesA-b
1/5Suggestions-by Suggestions-by Suggestions-by
2/5A-b
3/5
4/5A-b
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [for-next][PATCH 0/5] tracing: Add string_has_prefix() and usages

I hope everyone is OK with these changes. I pushed to linux-next but I'm willing to change them if there are still issues.

They ran through all my tests, althought zero-day-bot had a weird build regression in sh, that looks totally unrelated:

Regressions in current branch:

arch/sh/kernel/dwarf.c:107:26: error: 'dwarf_frame_reg' defined but not used [-Werror=unused-function] arch/sh/kernel/dwarf.c:1209:0: error: unterminated argument list invoking macro "WARN_ON" arch/sh/kernel/dwarf.c:226:12: error: 'dwarf_read_encoded_value' defined but not used [-Werror=unused-function] arch/sh/kernel/dwarf.c:306:26: error: 'dwarf_lookup_cie' defined but not used [-Werror=unused-function] arch/sh/kernel/dwarf.c:38:27: error: 'dwarf_frame_cachep' defined but not used [-Werror=unused-variable] arch/sh/kernel/dwarf.c:399:12: error: 'dwarf_cfa_execute_insns' defined but not used [-Werror=unused-function] arch/sh/kernel/dwarf.c:41:27: error: 'dwarf_reg_cachep' defined but not used [-Werror=unused-variable] arch/sh/kernel/dwarf.c:580:22: error: unused variable 'frame' [-Werror=unused-variable] arch/sh/kernel/dwarf.c:581:20: error: unused variable 'cie' [-Werror=unused-variable] arch/sh/kernel/dwarf.c:582:20: error: unused variable 'fde' [-Werror=unused-variable] arch/sh/kernel/dwarf.c:583:20: error: unused variable 'reg' [-Werror=unused-variable] arch/sh/kernel/dwarf.c:584:16: error: unused variable 'addr' [-Werror=unused-variable] arch/sh/kernel/dwarf.c:622:3: error: expected ';' at end of input arch/sh/kernel/dwarf.c:622:3: error: expected declaration or statement at end of input arch/sh/kernel/dwarf.c:622:3: error: 'WARN_ON' undeclared (first use in this function); did you mean 'WMARK_LOW'?

Pushing to my for-next branch should kick off another run. Let's see if it reports that again. Unless someone knows why that happened?

-- Steve

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next

Head SHA1: 92b9de3e574bd874188a4e27a8830bb901a08ef8

Steven Rostedt (VMware) (5):
string.h: Add str_has_prefix() helper function
tracing: Use str_has_prefix() helper for histogram code
tracing: Use str_has_prefix() instead of using fixed sizes
tracing: Have the historgram use the result of str_has_prefix() for len of prefix
tracing: Use the return of str_has_prefix() to remove open coded numbers

----

 include/linux/string.h           | 20 ++++++++++++++++++++
 kernel/trace/trace.c             |  8 +++++---
 kernel/trace/trace_events.c      |  2 +-
 kernel/trace/trace_events_hist.c | 35 ++++++++++++++++++-----------------
 kernel/trace/trace_probe.c       | 17 +++++++++--------
 kernel/trace/trace_stack.c       |  6 ++++--
 6 files changed, 57 insertions(+), 31 deletions(-)