| #!/bin/bash |
| # Copyright 2023 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=Run, inspect and debug |
| ### pprof wrapper that gives access to local files in symbol-index |
| |
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/vars.sh || exit $? |
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/symbol-index.sh || exit $? |
| fx-config-read |
| |
| # Append the build-id directories from symbol-index to PPROF_BINARY_PATH. |
| extra_dirs="$(fx-symbol-index-get-build-id-dirs | paste -sd:)" |
| export PPROF_BINARY_PATH="${PPROF_BINARY_PATH:+${PPROF_BINARY_PATH}:}$extra_dirs" |
| |
| pprof "$@" |