blob: b4c4de2a576ab06b6bd97be67b76b7c863b08389 [file] [log] [blame] [edit]
#!/bin/bash
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#### CATEGORY=Build
### Collect Ninja trace information for analysis in chrome://tracing
## Usage: fx ninjatrace2json
##
## Use this after a build to write "ninjatrace.json" in the build directory.
##
## See //build/scripts/ninjatrace2json.py for more usage information.
set -e
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"/lib/vars.sh || exit $?
fx-config-read
exec "${PREBUILT_PYTHON3}" \
"$FUCHSIA_DIR/build/scripts/ninjatrace2json.py" \
--fuchsia-build-dir "$FUCHSIA_BUILD_DIR" \
--ninja-path "$PREBUILT_NINJA" \
--ninjatrace-path "$PREBUILT_NINJATRACE" \
--subbuilds-in-place \
"$@"