Re: [PATCH 2/2] trace-cmd: Add an option to set saved_cmdlines_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 12, 2019 at 09:40:37AM -0500, Steven Rostedt wrote:
> On Tue, 12 Nov 2019 12:03:15 +0000
> Vincent Donnefort <vincent.donnefort@xxxxxxx> wrote:
>
> > Hi Steve,
> >
> > Thank you for your review. I also thought that we could avoid having a new
> > option and try to write /proc/sys/kernel/threads-max into saved_cmdlines_size,
> > before recording the trace. Do you think that would be a more suitable
> > solution?
>
> That's an interesting approach. I still think that having a parameter
> would be good as well, but then use the threads-max approach if one is
> not supplied.
>
> -- Steve

This was not a good idea in the end. We can't rely on the sysctl entries
threads-max or pid_max, as the pid/comm map is static and the maximum is
defined by PID_MAX_DEFAULT. I do not see any way of getting this value from
user-space.

We could though, as an alternative, use a hard-coded value of 32768 for
--cmdlines-size. Without being perfect, this should still be true for most of
the systems. PID_MAX_DEFAULT depends on CONFIG_BASE_SMALL and hasn't changed
since Linux started using Git.

--
Vincent
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux