Speed up trace mode (GSoC Project)

Mihir Luthra 1999mihir.luthra at gmail.com
Sun Mar 31 16:36:12 UTC 2019


Hi,

I need help understanding *static* *int* TracelibRunCmd(Tcl_Interp *in),
it has blown my mind, I am totally new with these kevents.

I have been trying to understand that from a while now.
Till what I understand, the thread responsible for creating server
eventually calls tracelib run
and then here
 *if* (1 != kevent(kq, &kev, 1, &kev, 1, *NULL*)).  —— (1)

waits here until the kqueue detects that someone is trying to read via
socket and returns a value.

in porttrace.tcl, the library gets injected and sandbox gets set.
and then in portutil.tcl tracelib setdeps sets the dependencies.

Now the in  (1) , it would only return when someone tries to read data from
the socket, when does that happen? Is it when darwintrace calls frecv? That
seems to be the only part where data is read from that socket and for
breaking going beyond that kevent(), reading seems necessary. But to do
that accept() must be called which is called later.

Sorry to make it so cluttered.
Kindly help me in understanding this :)

Regards,
Mihir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20190331/57b14058/attachment.html>


More information about the macports-dev mailing list