android_log_formatLogLine(): don't use strcat().
We're already manually maintaining the insertion point, and we already
know the length of everything we copy in this code, so it can all just
use memcpy() instead. (I've actually gone for mempcpy() because that
lets us maintain the insertion point on the same line by returning a
pointer to the end rather than a pointer to the start.)
Tested on the host, the benchmark goes from 540ns to 520ns. (But the
motivation is actually for the device, where the arm64 strcat() is
currently a very naive implementation, and logcat is the only caller
that's showing up in the fleet-wide sampling.)
Change-Id: I9097aaa3941a0cffe298743ecca514d201f78e04
1 file changed