Handle multiple tracing sessions collecting OOME heap dumps

In case there are multiple tracing sessions (possibly with different
configs) we need to invoke the DataSource::Trace method once all data
sources are setup (== OnStart is invoked for all of them).

Changes:
- Use the sysprop (set by perfetto traced) to know when to start the
  operation
- Since we know for a fact there is a session going, slightly increase
  the post-OOME wait-for-perfetto timeout to 1s (from 500ms)

Test: manual, atest HeapprofdJavaCtsTest
Bug: 269246893
Change-Id: I04da2c380236c53e22c92eba502ae50570ae2e6b
Merged-In: I04da2c380236c53e22c92eba502ae50570ae2e6b
1 file changed