Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: tools-webrtc/android/profiling/perf_setup.sh

Issue 2718103002: Minor fixes for profiling - part III (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools-webrtc/android/profiling/perf_setup.sh
diff --git a/tools-webrtc/android/profiling/perf_setup.sh b/tools-webrtc/android/profiling/perf_setup.sh
index 3cd5d1da26a3b9b9ef7a369903e3b1d4fc5024eb..7025fd27e78b09e92dd265cf83cd860508e8b655 100755
--- a/tools-webrtc/android/profiling/perf_setup.sh
+++ b/tools-webrtc/android/profiling/perf_setup.sh
@@ -127,15 +127,16 @@ function copy_simpleperf_to_device() {
&& perf_binary="/arm64/simpleperf" \
|| perf_binary="/arm/simpleperf"
local simpleperf="${DEV_TMP_DIR}/simpleperf"
- # Avoid copying to device if simpleperf already exists.
- if [[ ! $(dev_ls "${simpleperf}") ]]; then
- adb push "${SIMPLE_PERF_DIR}${perf_binary}" "${DEV_TMP_DIR}"
- adb shell chmod a+x $simpleperf
- fi
+ # Copy the simpleperf binary from local host to temp folder on device.
+ adb push "${SCRIPT_DIR}/simpleperf/bin/android${perf_binary}" \
+ "${DEV_TMP_DIR}" 1> /dev/null
+ adb shell chmod a+x $simpleperf
# Enable profiling on the device.
enable_profiling
# Allows usage of running report commands on the device.
- enable_report_symbols
+ if image_is_root; then
+ enable_report_symbols
+ fi
}
# Copy the recorded 'perf.data' file from the device to the current directory.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698