OSDN Git Service

simpleperf: support "--app" option in record/stat command.
authorYabin Cui <yabinc@google.com>
Wed, 12 Jul 2017 22:50:20 +0000 (15:50 -0700)
committerYabin Cui <yabinc@google.com>
Fri, 14 Jul 2017 21:32:50 +0000 (14:32 -0700)
commita80f8f707e9b6f9d4fb79714be1c887445c4511f
treeaedf8c0e7588ecec24260988e4482b0a8b9b057f
parent3cd4b5a765e824f0eb2441a51cd97d4a90f17127
simpleperf: support "--app" option in record/stat command.

By using --app [package_name] option, users don't need to
manually run run-as or look for the app's process.
It is also good for profiling app startup time.

For simpleperf, it now can start in the shell's context,
and be able to get tracing events information, which can
support profiling tracepoint events for apps. This is
useful for monitoring thread sleep time.

This CL is tested manually, but I will change the
way of running simpleperf cts test to test this.

Bug: http://b/34108866
Test: test manually.

Change-Id: I8db0390af8e49c56dc4860374153f753bbcf9b11
simpleperf/cmd_record.cpp
simpleperf/cmd_stat.cpp
simpleperf/environment.cpp
simpleperf/environment.h
simpleperf/workload.cpp
simpleperf/workload.h