[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: utrace_control(XXXSTEP)->is_setting_trap_flag() is not safe



> And. If we have multiple tracers, then utrace_control(SINGLESTEP) just
> "fools" the caller, another engine can do utrace_control(RESUME) at any
> moment.

Sure, but more likely nobody will.

> I think you are right, utrace_control() should simply consider UTRACE_XXXSTEP
> as UTRACE_REPORT.

All else being equal, I still think it would be preferable to optimize when
we can.  If nobody else used UTRACE_REPORT lately, then they official don't
care whether it's stopped, or running, or stepping, or what.  If you can
just resume it stepping without going through utrace_resume, that is ideal.

I'm not sure, but there might be a benefit on some machines to doing
user_enable_single_step from the other thread and letting its effects come
in with context-switch.  (That keeps the arch details of the performance
profile the same as with old ptrace.)


Thanks,
Roland


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]