diff options
author | Yabin Cui <yabinc@google.com> | 2019-02-14 16:23:05 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2019-02-20 13:43:09 -0800 |
commit | 82c4c23a97dacdf140988dcc1dc46c0cd34ce93e (patch) | |
tree | 0ecc3c4287ed2976ef8d497e426116cf54b0852a /simpleperf/cmd_record.cpp | |
parent | d9121cec265ca1ecaea7fcf415ea5a0ddd39530e (diff) | |
download | extras-82c4c23a97dacdf140988dcc1dc46c0cd34ce93e.tar.gz |
simpleperf: Add Java/C++ API to control simpleperf in app code.
Also add JavaApi app to test the Java API, and CppApi App to test
the C++ API.
Also expose help msgs for options used in the API.
Bug: 123717243
Test: run apps manually and verify the generated profiling data.
Change-Id: I64c9de82b3f7eb3d76c6aff0703e12ce33233e49
Diffstat (limited to 'simpleperf/cmd_record.cpp')
-rw-r--r-- | simpleperf/cmd_record.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/simpleperf/cmd_record.cpp b/simpleperf/cmd_record.cpp index 6b45c3cd..ff01d808 100644 --- a/simpleperf/cmd_record.cpp +++ b/simpleperf/cmd_record.cpp @@ -206,20 +206,24 @@ class RecordCommand : public Command { " dumped in perf.data, to support reporting in another\n" " environment.\n" "-o record_file_name Set record file name, default is perf.data.\n" -"--exit-with-parent Stop recording when the process starting\n" -" simpleperf dies.\n" "--size-limit SIZE[K|M|G] Stop recording after SIZE bytes of records.\n" " Default is unlimited.\n" -"--start_profiling_fd fd_no After starting profiling, write \"STARTED\" to\n" -" <fd_no>, then close <fd_no>.\n" -"--stdio-controls-profiling Use stdin/stdout to pause/resume profiling.\n" "--symfs <dir> Look for files with symbols relative to this directory.\n" " This option is used to provide files with symbol table and\n" " debug information, which are used for unwinding and dumping symbols.\n" +"\n" +"Other options:\n" +"--exit-with-parent Stop recording when the process starting\n" +" simpleperf dies.\n" +"--start_profiling_fd fd_no After starting profiling, write \"STARTED\" to\n" +" <fd_no>, then close <fd_no>.\n" +"--stdio-controls-profiling Use stdin/stdout to pause/resume profiling.\n" +#if defined(__ANDROID__) +"--in-app We are already running in the app's context.\n" +"--tracepoint-events file_name Read tracepoint events from [file_name] instead of tracefs.\n" +#endif #if 0 // Below options are only used internally and shouldn't be visible to the public. -"--in-app We are already running in the app's context.\n" -"--tracepoint-events file_name Read tracepoint events from [file_name] instead of tracefs.\n" "--out-fd <fd> Write perf.data to a file descriptor.\n" "--stop-signal-fd <fd> Stop recording when fd is readable.\n" #endif |