aboutsummaryrefslogtreecommitdiff
path: root/crosperf/experiment_file.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/experiment_file.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/experiment_file.py')
-rw-r--r--crosperf/experiment_file.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/crosperf/experiment_file.py b/crosperf/experiment_file.py
index 12f9d5df..41a2b809 100644
--- a/crosperf/experiment_file.py
+++ b/crosperf/experiment_file.py
@@ -1,6 +1,8 @@
+# -*- coding: utf-8 -*-
# Copyright (c) 2011 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.
+
"""The experiment file module. It manages the input file of crosperf."""
from __future__ import print_function
@@ -164,11 +166,22 @@ class ExperimentFile(object):
autotest_path = ''
if autotest_field.assigned:
autotest_path = autotest_field.GetString()
- image_path, autotest_path = settings.GetXbuddyPath(
- value, autotest_path, board, chromeos_root, 'quiet')
+ debug_field = settings.fields['debug_path']
+ debug_path = ''
+ if debug_field.assigned:
+ debug_path = autotest_field.GetString()
+ perf_args_field = self.global_settings.fields['perf_args']
+ perf_args = ''
+ if perf_args_field.assigned:
+ perf_args = perf_args_field.GetString()
+ image_path, autotest_path, debug_path = settings.GetXbuddyPath(
+ value, autotest_path, debug_path, board, chromeos_root,
+ 'quiet', perf_args)
res += '\t#actual_image: %s\n' % image_path
if not autotest_field.assigned:
res += '\t#actual_autotest_path: %s\n' % autotest_path
+ if not debug_field.assigned:
+ res += '\t#actual_debug_path: %s\n' % debug_path
res += '}\n\n'