Create code size treemaps for executable containing GL/Vulkan

DM is already available and should have GL or Vulkan backends in it.

Change-Id: Ie1dad639d0d20aae86ed8d8435c0787e15880767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/261148
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
This commit is contained in:
Kevin Lubick 2019-12-20 09:32:02 -05:00 committed by Skia Commit-Bot
parent 334d0ba9d7
commit 2702dc77e0
6 changed files with 189 additions and 4 deletions
infra/bots

View File

@ -169,7 +169,10 @@ var (
// BUILD_STATS_NO_UPLOAD indicates which BuildStats tasks should not
// have their results uploaded.
BUILD_STATS_NO_UPLOAD = []string{"BuildStats-Debian9-Clang-x86_64-Release"}
BUILD_STATS_NO_UPLOAD = []string{
"BuildStats-Debian9-Clang-x86_64-Release",
"BuildStats-Debian9-Clang-x86_64-Release-Vulkan",
}
)
// Config contains general configuration information.

View File

@ -135,6 +135,7 @@
"Build-Win-MSVC-x86_64-Release-Vulkan",
"BuildStats-Debian9-Clang-arm-Release-Flutter_Android",
"BuildStats-Debian9-Clang-x86_64-Release",
"BuildStats-Debian9-Clang-x86_64-Release-Vulkan",
"BuildStats-Debian9-EMCC-asmjs-Release-PathKit",
"BuildStats-Debian9-EMCC-wasm-Debug-CanvasKit",
"BuildStats-Debian9-EMCC-wasm-Debug-CanvasKit_CPU",

View File

@ -424,7 +424,42 @@
"DOCKER_CONFIG": "/home/chrome-bot/.docker",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"name": "Make code size treemap"
"name": "Make code size treemap [START_DIR]/build/skottie_tool"
},
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"glob",
"[START_DIR]/build",
"dm"
],
"cwd": "[START_DIR]/build",
"infra_step": true,
"name": "find dm",
"~followup_annotations": [
"@@@STEP_LOG_LINE@glob@[START_DIR]/build/dm@@@",
"@@@STEP_LOG_END@glob@@@"
]
},
{
"cmd": [
"python",
"-u",
"[START_DIR]/cache/work/skia/infra/bots/buildstats/make_treemap.py",
"[START_DIR]/build/dm",
"[START_DIR]/[SWARM_OUT_DIR]"
],
"cwd": "[START_DIR]/cache/work/skia",
"env": {
"CHROME_HEADLESS": "1",
"DOCKER_CONFIG": "/home/chrome-bot/.docker",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"name": "Make code size treemap [START_DIR]/build/dm"
},
{
"name": "$result"

View File

@ -469,7 +469,42 @@
"DOCKER_CONFIG": "/home/chrome-bot/.docker",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"name": "Make code size treemap"
"name": "Make code size treemap [START_DIR]/build/skottie_tool"
},
{
"cmd": [
"vpython",
"-u",
"RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
"--json-output",
"/path/to/tmp/json",
"glob",
"[START_DIR]/build",
"dm"
],
"cwd": "[START_DIR]/build",
"infra_step": true,
"name": "find dm",
"~followup_annotations": [
"@@@STEP_LOG_LINE@glob@[START_DIR]/build/dm@@@",
"@@@STEP_LOG_END@glob@@@"
]
},
{
"cmd": [
"python",
"-u",
"[START_DIR]/cache/work/skia/infra/bots/buildstats/make_treemap.py",
"[START_DIR]/build/dm",
"[START_DIR]/[SWARM_OUT_DIR]"
],
"cwd": "[START_DIR]/cache/work/skia",
"env": {
"CHROME_HEADLESS": "1",
"DOCKER_CONFIG": "/home/chrome-bot/.docker",
"PATH": "<PATH>:RECIPE_REPO[depot_tools]"
},
"name": "Make code size treemap [START_DIR]/build/dm"
},
{
"name": "$result"

View File

@ -86,6 +86,15 @@ def RunSteps(api):
if files:
make_treemap(api, checkout_root, out_dir, files)
files = api.file.glob_paths(
'find dm',
bin_dir,
'dm',
test_data=['dm'])
analyzed += len(files)
if files:
make_treemap(api, checkout_root, out_dir, files)
if not analyzed: # pragma: nocover
raise Exception('No files were analyzed!')
@ -206,7 +215,7 @@ def make_treemap(api, checkout_root, out_dir, files):
with api.context(cwd=skia_dir):
script = skia_dir.join('infra', 'bots', 'buildstats',
'make_treemap.py')
api.run(api.python, 'Make code size treemap',
api.run(api.python, 'Make code size treemap %s' % f,
script=script,
args=[f, out_dir],
stdout=api.raw_io.output())

View File

@ -687,6 +687,11 @@
"BuildStats-Debian9-Clang-x86_64-Release"
]
},
"BuildStats-Debian9-Clang-x86_64-Release-Vulkan": {
"tasks": [
"BuildStats-Debian9-Clang-x86_64-Release-Vulkan"
]
},
"BuildStats-Debian9-EMCC-asmjs-Release-PathKit": {
"tasks": [
"Upload-BuildStats-Debian9-EMCC-asmjs-Release-PathKit"
@ -13127,6 +13132,103 @@
"perf"
]
},
"BuildStats-Debian9-Clang-x86_64-Release-Vulkan": {
"caches": [
{
"name": "vpython",
"path": "cache/vpython"
},
{
"name": "git",
"path": "cache/git"
},
{
"name": "git_cache",
"path": "cache/git_cache"
},
{
"name": "work",
"path": "cache/work"
}
],
"cipd_packages": [
{
"name": "infra/tools/luci/kitchen/${platform}",
"path": ".",
"version": "git_revision:af7d2ebd14e9bdad51ff1afacbf37f49815ad27b"
},
{
"name": "infra/tools/luci-auth/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:af7d2ebd14e9bdad51ff1afacbf37f49815ad27b"
},
{
"name": "infra/tools/luci/vpython/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:af7d2ebd14e9bdad51ff1afacbf37f49815ad27b"
},
{
"name": "skia/bots/bloaty",
"path": "bloaty",
"version": "version:1"
},
{
"name": "infra/git/${platform}",
"path": "cipd_bin_packages",
"version": "version:2.24.0.chromium16"
},
{
"name": "infra/tools/git/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:af7d2ebd14e9bdad51ff1afacbf37f49815ad27b"
},
{
"name": "infra/tools/luci/git-credential-luci/${platform}",
"path": "cipd_bin_packages",
"version": "git_revision:af7d2ebd14e9bdad51ff1afacbf37f49815ad27b"
}
],
"command": [
"cipd_bin_packages/vpython${EXECUTABLE_SUFFIX}",
"-u",
"skia/infra/bots/run_recipe.py",
"${ISOLATED_OUTDIR}",
"compute_buildstats",
"{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian9-Clang-x86_64-Release-Vulkan\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}",
"skia"
],
"dependencies": [
"Housekeeper-PerCommit-BundleRecipes",
"Build-Debian9-Clang-x86_64-Release-Vulkan"
],
"dimensions": [
"cpu:x86-64-Haswell_GCE",
"gpu:none",
"machine_type:n1-standard-16",
"os:Debian-9.8",
"pool:Skia",
"docker_installed:true"
],
"env_prefixes": {
"PATH": [
"cipd_bin_packages",
"cipd_bin_packages/bin"
],
"VPYTHON_VIRTUALENV_ROOT": [
"cache/vpython"
]
},
"execution_timeout_ns": 3600000000000,
"extra_tags": {
"log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations"
},
"io_timeout_ns": 3600000000000,
"isolate": "swarm_recipe.isolate",
"max_attempts": 2,
"outputs": [
"perf"
]
},
"BuildStats-Debian9-EMCC-asmjs-Release-PathKit": {
"caches": [
{