aboutsummaryrefslogtreecommitdiff
path: root/crosperf/settings_factory.py
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2019-04-10 14:04:05 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-18 19:52:03 -0700
commitced8957f7a858d5cca66352522e916705f004944 (patch)
tree7777bb88cd76c4d6c97442b8cbe91c39754042cd /crosperf/settings_factory.py
parent5ed02e0990d636f4220ac3259cfe541a296275b6 (diff)
downloadtoolchain-utils-ced8957f7a858d5cca66352522e916705f004944.tar.gz
crosperf: generate perf report with correct debug files
This patch fixes the issue in chromium:946588. This patch makes perf report no longer use hard code debug directories. There are several different situations: 1) When running tests on a downloaded image, it will download debug.tgz from gs, extract it to debug_files in /tmp. Options --symfs and --vmlinux will depend on this directory, and throw a warning to user that --kallsyms cannot be applied. 2) If running with downloaded image and debug.tgz could not work, then we will try to use local build, but give user a warning that it may not match real symbols well. 3) When running tests with local build, try to find debug info from /build/$board directory. Thus, this patch added a new field in label, called 'debug_path', if this is manually set in experiment file, then crosperf will directly use the location. Downloading of debug.tgz will only happen when perf_args is set in global settings. TEST=Passed all unit tests, tested with eve and sand. BUG=chromium:946588 Change-Id: I7f35d1216d912c8526d5501748f951face1273aa Reviewed-on: https://chromium-review.googlesource.com/1561780 Commit-Ready: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'crosperf/settings_factory.py')
-rw-r--r--crosperf/settings_factory.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/crosperf/settings_factory.py b/crosperf/settings_factory.py
index 82956501..1b30e11c 100644
--- a/crosperf/settings_factory.py
+++ b/crosperf/settings_factory.py
@@ -2,6 +2,7 @@
# Copyright (c) 2013 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.
+
"""Setting files for global, benchmark and labels."""
from __future__ import print_function
@@ -81,6 +82,12 @@ class LabelSettings(Settings):
'files.'))
self.AddField(
TextField(
+ 'debug_path',
+ required=False,
+ description='Debug info directory relative to chroot which has '
+ 'symbols and vmlinux that can be used by perf tool.'))
+ self.AddField(
+ TextField(
'chromeos_root',
description='The path to a chromeos checkout which '
'contains a src/scripts directory. Defaults to '