> 1. Suppose you're tracing task t with engine e, and > e->ops->report_quiesce is non-NULL. Will utrace ever call > e->ops->report_quiesce from a task other than t? If so, under what > circumstances?
Old utrace would in one case. New utrace never does. That one case was utrace_set_flags when the target was already quiescent. > 2. Suppose some thread t2 (t != t2) does: > A: > utrace_set_events(t, e, UTRACE_EVENT(QUIESCE)); > B: > result = utrace_control(t, e, UTRACE_STOP); > C: > Suppose t was already stopped at point A, and remains stopped > through point C. My understanding is that e->ops->report_quiesce > will get called before t returns to user space (but only from t, > not t2). Is that correct? Not quite. At point C, T will not return to user space before you make some other utrace_control call on T,E (assuming RESULT==0 as you said). That is, it stays stopped unless it suddenly dies (which means it never gets to user space at all). What happens between point C and when T returns to user space depends on which action your next utrace_control call uses. If it's UTRACE_RESUME, then you are not guaranteed any callback. If it's UTRACE_REPORT or UTRACE_INTERRUPT, then you are. (You might get the callback after UTRACE_RESUME if another engine has used UTRACE_REPORT or other such things--using UTRACE_RESUME doesn't mean you won't, but it means you aren't demanding it.) > (I ask partly because in previous versions of utrace, calling > utrace_set_flags(t, e, UTRACE_ACTION_QUIESCE | UTRACE_EVENT(QUIESCE)) > from t2 could yield a call to e->ops->report_quiesce from t2.) Correct. That never happens any more (utrace_set_events). Thanks, Roland