> 2.  *******
> tracehook_inhibit_wait_stopped, tracehook_inhibit_wait_zombie, 
> tracehook_inhibit_wait_continued have same
> parameter and function body. How about to merge them into one?
> 
> 3.  *******
> There are some unused parameters in tracehook_report_clone_complete, 
> tracehook_report_vfork_done, tracehook_report_handle_signal.
> To keep good interface ?

Perhaps I should clarify the intent of the <linux/tracehook.h> interfaces.
Your questions suggest an impression that their purpose is just to meet the
immediate needs of the utrace code they call.

The rationale behind these interfaces is that the core code (what calls
tracehook_*) should not need to change in the future, regardless of many
kinds changes in the details of tracing support.  Hence, the guiding
principle is that the callers supply all the information that is
particularly convenient to get at that place, in case it is relevant and
helpful to the tracing support.  That way, the callers won't be required to
adapt to new calling signatures whenever we want to tweak the tracing
infrastructure.  That information includes which code path in do_wait the
call is from, as well as the pointers passed (and now unused) in those
calls you mentioned.  (Because these are actually inlines, any unused
parameters compile away completely.  If any core code calling tracehook
functions were ever to change so that one of these items were no longer
already on hand, then we would change the tracehook signature to keep it a
natural and painless call for the core code to make.)  

Since these things are on hand, and certainly potentially relevant to that
tracehook call's topic, they are parameters to the tracehook functions.
We can change tracehook.h repeatedly as we work on the tracing support,
while never again bothering the maintainers of the core code that makes
that tracehook call.


Thanks,
Roland

Reply via email to