On 08/30, Roland McGrath wrote: > > > Introduce xxx_utrace_stop() which notifies engine we are going to stop. > > It calls report_quiesce(0), but report.action = UTRACE_STOP instead of > > UTRACE_RESUME. > > I don't think this is necessary to go along with the ptrace cooperation > hacks. For any engine, there could always be a later engine that returns > UTRACE_STOP and causes a stop after you thought the task was going to keep > running. If an engine is concerned about that, it uses UTRACE_REPORT and > all it knows for sure is that it will get another report after resumption > if indeed there was a stop. So all the ptrace hacks need to do is meet > that guarantee: set utrace->report when ptrace stops "after" or "between" > utrace event points.
Yes. But this hack was needed because ptrace_utrace_ops is empty, it doesn't even have ->report_quiesce which could return UTRACE_STOP. So xxx_utrace_stop() just sets report.action = UTRACE_STOP "in advance" and then notifies other engines. But this doesn't matter, I no longer think this all makes sense. Oleg.