Even if we send the log to the parent, I'd still like to see the logcat happen 
in the child in the thread that originally issues the log. 

This accomplishes 2 things: 

1 - logcat records the PID and TID of the logger. I've found this to be 
extremely useful information which would be lost. in logcat if the logging is 
done in the parent. 

2 - If you do the logcat in the parent you get out-of-sequence logs. The 
parents logs will be logged with lower latency than the childs, which causes 
weird logs. When the child does the logging, the sequence is preserved. This is 
extremely useful when logging any type of activity which is split between the 
child and parent. 

Dave Hylands 

----- Original Message -----

> From: "Jonas Sicking" <[email protected]>
> To: "Gabriele Svelto" <[email protected]>
> Cc: "Eric Rahm" <[email protected]>, [email protected], "Dave
> Hylands" <[email protected]>
> Sent: Thursday, August 28, 2014 10:09:05 AM
> Subject: Re: [b2g] Log collection needs improvement

> On Thu, Aug 28, 2014 at 1:39 AM, Gabriele Svelto <[email protected]> wrote:
> > IPC is quite expensive in general on our implementation so even when
> > it's non-blocking it does have a measurable performance impact on
> > single-core devices. Bug 915733 [1] contains more information on this.

> There's a lot of disagreement on this. So far no one has been able to
> show a profile where this is the case. Every time that we have
> performance with IPC it is because the parent process is busy doing
> other things which means that it takes longer than we want to get a
> response.

> I.e. the problem is one of latency rather than throughput in every
> profile that anyone has been able to produce.

> However for logging we don't need to get any response. And it doesn't
> matter if the logging message appears a few ms later than when the
> logging call was made. So this is not a problem.

> If you have a profile that can show otherwise, please do share.

> / Jonas
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to