Skip to content

ftrace: Introduce the new I/F "nr_saved_cmdlines"

Yoshihiro YUNOMAE lkml 3 versions – In review

Get series with b4
b4 am 20140220084428.3839.59555.stgit@yunodevel

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesIn review
  2. v1 posting 2/22 patches 4 repliesSuperseded
  3. v1 posting 1/22 patches 1 replySuperseded

Changes in v2 from the cover letter

- Fix a racing problem of savedcmd between saved_cmdlines I/F and nr_saved_cmdlines I/F. If one reads saved_cmdlines and writes a value to nr_saved_cmdlines at the same time, then the write returns -EBUSY. [2/2]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ftrace: Make saved_cmdlines use seq_readkernel/trace/trace.c+54 -351 reply
2/2ftrace: Introduce nr_saved_cmdlines I/Fkernel/trace/trace.c+210 -233 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH V2 0/2] ftrace: Introduce the new I/F "nr_saved_cmdlines"

Hi,

This patch set introduces the new I/F "nr_saved_cmdlines" for increasing the number of saved cmdlines. Current saved_cmdlines can store just 128 command names and PIDs, but process names are often lost like <...> when we read trace data. If the process exists, we can get the name by using ps command. However, if the process already has not existed, we cannot get the name.

To solve this issue, we introduce the new I/F "nr_saved_cmdlines" to expand the max number of saved command line names. This I/F is very simple. If we write a number to nr_saved_cmdlines, the number of command name will be stored. And, if we read the I/F, we can get current maximum number of command name. The default number is 128 which is current default number, so this patch does not change the usage of memory for saved_cmdlines when we boot kernel.

Thanks!

Changes in V2:
- Fix a racing problem of savedcmd between saved_cmdlines I/F and nr_saved_cmdlines I/F. If one reads saved_cmdlines and writes a value to nr_saved_cmdlines at the same time, then the write returns -EBUSY. [2/2]

---

Yoshihiro YUNOMAE (2):
ftrace: Make saved_cmdlines use seq_read
ftrace: Introduce nr_saved_cmdlines I/F

 kernel/trace/trace.c |  316 +++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 261 insertions(+), 55 deletions(-)
Signature · 4 lines
Yoshihiro YUNOMAE
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: [email protected]