OSDN Git Service

[Frameworks] Add an 'am' cmd option to enable streaming in profiling.
authorShukang Zhou <shukang@google.com>
Tue, 24 Jan 2017 23:30:29 +0000 (15:30 -0800)
committerShukang Zhou <shukang@google.com>
Thu, 26 Jan 2017 00:53:41 +0000 (16:53 -0800)
commit6ec0b7e21d0f6fdee9f24d91b33c0c71e50cafc4
treea51c2c8fa759b8c3c985c0f1ca0660364f0e445f
parentedadb3efc37c457e0493ce4a5d1977721b6d605a
[Frameworks] Add an 'am' cmd option to enable streaming in profiling.

Add option '--streaming' to 'am start' and 'am profile' commands.
If the option is given, the output of method trace profiling
will be streamed into the specified file, so the output is no
longer limited by the buffer size.

Test: m -j48 test-art-host;
m -j48 ART_TEST_TRACE=true ART_TEST_TRACE_STREAM=true test-art-host;
I also tested manually. Tried all 8 combinations of
    sampling/instrumention
    streaming/non-streaming
    'am start --start-profiler' / 'am profile start'
The output files are all in expected shape.

Bug: 33300765

Merged-In: I8a5136a1c7330c8260b7c6c8da63f42a73aee275

Change-Id: I8a5136a1c7330c8260b7c6c8da63f42a73aee275
cmds/am/src/com/android/commands/am/Am.java
core/java/android/app/ActivityThread.java
core/java/android/app/ProfilerInfo.java
core/java/android/os/Debug.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java