simpleperf: add test for start/stop api.
Add testApiProfiler class in test.py to test start/stop api.
Avoid starting more than one profile threads in CppApi and JavaApi.
Also add assert check to show --trace-offcpu and pause/resume recording
can't be used at the same time.
Also add app_api in simpleperf_script.zip to release it in ndk.
Also use vfork instead of fork in cpp_api to avoid deadlock when forking
new processes.
Bug: 123717243
Test: run test.py TestApiProfiler* on Android N/O/P/Q.
Change-Id: Id382cf59f59bd7f7efb04259cc301ba4b955db78
14 files changed