Hello Oleg,
You are right, the functionality can be implemented with the system call.
But it means we have the overhead of a system call just to clear two bits,
the TIF_SYSCALL_TRACE and the PTS_SELF.
On the other hand we have an overhead of one single "if" inside
the handle_signal() function.
We can do the same with fork and ptrace, yes, but with a very big
overhead on each system call and this is why this patch is so usefull:
because with this patch you sit inside the thread when analysing it and
have a direct access to all data without the need of IPC, ptrace or any
task switch.
I will provide a test program and plan to release a tracing tool based
on it.
I think I can reduce the task struct modification by using just a bit
like you suggest if nobody seen any problem with this.
best regards,
Pierre
Oleg Nesterov wrote:
--
=============
Pierre Morel
RTOS and Embedded Linux
--