OSDN Git Service

simpleperf: make app api available for profileable apps.
authorYabin Cui <yabinc@google.com>
Mon, 25 Feb 2019 23:22:43 +0000 (15:22 -0800)
committerYabin Cui <yabinc@google.com>
Thu, 28 Feb 2019 21:50:41 +0000 (13:50 -0800)
commit1befe4fd62dffee1e9a9d19549d18e8604c726e2
tree9369ff7c55379233a8982cab212c81af73662720
parentc65e54940b4b7350cc4a2f72e2f2190269909ec5
simpleperf: make app api available for profileable apps.

Add api-prepare cmd to prepare recording via app api.
Add api-collect cmd to collect recording data generated by app api. The
recording data is compressed into a zip file.
The two added cmds support both debuggable apps and profileable apps.
Move api_app_profiler.py to api_profiler.py. And use the two added cmds in it.

Also improve app_api code:
1. Fix finding simpleperf.
2. Use time based output filenames.

Bug: 123717243
Test: test manually, will add run python tests later.

Change-Id: I88c20578d01a84bc20ea72276f2cab0f3c4d9109
14 files changed:
simpleperf/Android.bp
simpleperf/app_api/cpp/simpleperf.cpp
simpleperf/app_api/cpp/simpleperf.h
simpleperf/app_api/java/com/android/simpleperf/ProfileSession.java
simpleperf/app_api/java/com/android/simpleperf/RecordOptions.java
simpleperf/cmd_api.cpp [new file with mode: 0644]
simpleperf/command.cpp
simpleperf/demo/CppApi/app/src/main/cpp/native-lib.cpp
simpleperf/demo/JavaApi/app/src/main/java/simpleperf/demo/java_api/MainActivity.java
simpleperf/environment.cpp
simpleperf/environment.h
simpleperf/scripts/api_app_profiler.py [deleted file]
simpleperf/scripts/api_profiler.py [new file with mode: 0755]
simpleperf/simpleperf_app_runner/simpleperf_app_runner.cpp