aboutsummaryrefslogtreecommitdiff
path: root/user_activity_benchmarks/symbolize_profiles.sh
diff options
context:
space:
mode:
authorEvelina Dumitrescu <evelinad@google.com>2016-09-20 00:35:47 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-02-01 18:13:45 -0800
commit058aae85dcfb12049ef90137915ec7e981288569 (patch)
tree87b3a32b13c392939d66fa93105896f5df0736a6 /user_activity_benchmarks/symbolize_profiles.sh
parent215fd6f8720cd3f6c691e256e59fcdef4a8ac17b (diff)
downloadtoolchain-utils-058aae85dcfb12049ef90137915ec7e981288569.tar.gz
user_activity: Added tools for the benchmark profile collection.
The scripts run the Telemetry benchmarks, collects their perf profiles, use local_cwp to do the profile symbolization and collect the hot functions and callchains with pprof. BUG=None TEST=None Change-Id: I2170e53d95924f1a3ba134bd62b1eead9e7a3077 Reviewed-on: https://chrome-internal-review.googlesource.com/288517 Reviewed-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Evelina Dumitrescu <evelinad@google.com> Commit-Queue: Evelina Dumitrescu <evelinad@google.com> Tested-by: Evelina Dumitrescu <evelinad@google.com> Reviewed-on: https://chromium-review.googlesource.com/435923 Commit-Ready: Luis Lozano <llozano@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'user_activity_benchmarks/symbolize_profiles.sh')
-rwxr-xr-xuser_activity_benchmarks/symbolize_profiles.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/user_activity_benchmarks/symbolize_profiles.sh b/user_activity_benchmarks/symbolize_profiles.sh
new file mode 100755
index 00000000..904cc1ba
--- /dev/null
+++ b/user_activity_benchmarks/symbolize_profiles.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+# Copyright 2016 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+# Uses local_cwp to do the profile symbolization.
+# The profiles that need to be symbolized are placed in the profiles_path.
+# The results are placed in the local_cwp_results_path.
+
+set -e
+
+if [ "$#" -ne 3 ]; then
+ echo "USAGE: symbolize_profiles.sh profiles_path local_cwp_binary_path " \
+ "local_cwp_results_path"
+ exit 1
+fi
+
+readonly PROFILES_PATH=$1
+readonly LOCAL_CWP_BINARY_PATH=$2
+readonly LOCAL_CWP_RESULTS_PATH=$3
+readonly PROFILES=$(ls $PROFILES_PATH)
+
+for profile in "${PROFILES[@]}"
+do
+ $LOCAL_CWP_BINARY_PATH --output="$LOCAL_CWP_RESULTS_PATH/${profile}.pb.gz" \
+ "$PROFILES_PATH/$profile"
+ if [ $? -ne 0 ]; then
+ echo "Failed to symbolize the perf profile output with local_cwp for " \
+ "$profile."
+ continue
+ fi
+done