blob: 69d403ed5934d51f2ef37177446ad8c26203b9ab [file] [log] [blame]
# Copyright 2021 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.
declare_args() {
# List of GN paths to source files to be instrumented by `profile` variants.
# If [`profile_source_files_list_files`](#profile_source_files_list_files) is
# also set, both lists are used. Use that option with a file constructed
# separately instead to use more complex selection features such as
# per-function selection, file name patterns, or exclusion.
profile_source_files = [
# Default: profile all sources under //.
# See: fxbug.dev/89451 for context.
"//*",
]
# List GN path to files in Clang's `-fprofile-list` format describing files
# and functions to be instrumented by `profile` variants. Note that if
# [`profile_source_files`](#profile_source_files) is also set, both are used.
profile_source_files_list_files = []
}
# This helps build code discern whether all code is being instrumented by
# default or not. If it's true, then additional -fprofile-list=... switches
# may be required to ensure particular code (e.g. in tests) gets instrumented.
#
# Type: bool
selective_profiling =
profile_source_files + profile_source_files_list_files != []