Fix logcat process name caching

The process name of an app takes a few milliseconds to settle.
After the zygote/zygote64 process is forked, the process name
remain for a bit, then as it specialize (a.k.a ActivityThread
runs), it becomes <pre-initialized>, then it becomes the
package/process name.

We don't cache the name until we know the final value.

There is next to no performance impact:

- zygote/zygote64 logs very little while unspecialized
(currently only logs when forking and handling signals).

- Process being specialized log only exceptionnal conditions
(e.g.: ART post-fork hook).

Test: NA
Bug: 351811546
Change-Id: I1ccf4ced6b73308ec137c77aa93a49903d7138d6
1 file changed
tree: 2023bb9b862a89400987854438ed5b24f6bb989f
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/
  5. rust/
  6. OWNERS
  7. PREUPLOAD.cfg
  8. TEST_MAPPING