Re: [PATCH 2/6] tracing: Replace memcpy() with __get_task_comm()

Yafang Shao
2024-06-04T02:35:48Z

On Tue, Jun 4, 2024 at 6:39 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Mon, 3 Jun 2024 18:37:42 -0400
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > Note, I've been wanting to get rid of the hard coded TASK_COMM_LEN from the
> > events for a while. As I mentioned before, the only reason the memcpy exists
> > is because it was added before the __string() logic was. Then it became
> > somewhat of a habit to do that for everything that referenced task->comm. :-/
>
> My point is that if we are going to be changing the way we record
> task->comm in the events, might as well do the change I've been wanting to
> do for years. I'd hold off on the sched_switch event, as that's the one
> event (and perhaps sched_waking events) that user space may be have
> hardcoded how to read it.
>
> I would be interested in changing it, just to see what breaks, so I would
> know where to go fix things. But keep it a separate patch so that it could
> be easily reverted.
>

I will drop the tracing part that includes this patch and the patch #6
in the next version, and leave it to you.

--
Regards
Yafang