Thanks, yes I am sure it might.
Yes, we plan to release a tool to trace an application soon.
Yes, of course I have one for x86 and one for s390.
I am cleaning them to make them available.
OK, I will prepare this.
Yes, I will prepare this too.
Right. It should be self_ptrace.
I used to steal one bit in the ptrace bit-field of the task_struct but
Oleg pointed out that the ptrace bit-field is used in a lot of places
without any bit mask, so I chose another way to remember that I (the
thread) am instrumenting myself.
Alternatively, I could also use the ptrace bit-field and modify every
reference to use a mask for any test, set or reset of the bit-field.
I provision a 64 bit wide bit-field for future extensions of the
instrumentation. I could of course use a smaller bit-field as only 1
bit is really useful for now. I used 64 bit to be memory aligned with
most of the architectures.
There is no lock for the instrumentation bit-field because it is used
for self tracing only, and only current ever accesses the flag.
--
=============
Pierre Morel
RTOS and Embedded Linux
--