def CreateArgumentParser(): """Creates and returns the argument parser.""" parser = argparse.ArgumentParser() parser.add_argument( '--lightweight-instrumentation', action='store_true', default=False, help='Use the lightweight instrumentation path') parser.add_argument( '--buildbot', action='store_true', help='If true, the script expects to be run on a buildbot') parser.add_argument( '--verify', action='store_true', help='If true, the script only verifies the current orderfile') parser.add_argument('--target-arch', action='store', dest='arch', default=cygprofile_utils.DetectArchitecture(), choices=['arm', 'arm64', 'x86', 'x86_64', 'x64', 'mips'], help='The target architecture for which to build') parser.add_argument('--output-json', action='store', dest='json_file', help='Location to save stats in json format') parser.add_argument( '--skip-profile', action='store_false', dest='profile', default=True, help='Don\'t generate a profile on the device. Only patch from the ' 'existing profile.') parser.add_argument( '--skip-patch', action='store_false', dest='patch', default=True, help='Only generate the raw (unpatched) orderfile, don\'t patch it.') parser.add_argument( '--netrc', action='store', help='A custom .netrc file to use for git checkin. Only used on bots.') parser.add_argument( '--branch', action='store', default='master', help='When running on buildbot with a netrc, the branch orderfile ' 'hashes get checked into.') # Note: -j50 was causing issues on the bot. parser.add_argument( '-j', '--jobs', action='store', default=20, help='Number of jobs to use for compilation.') parser.add_argument( '-l', '--max-load', action='store', default=4, help='Max cpu load.') parser.add_argument('--goma-dir', help='GOMA directory.') parser.add_argument( '--use-goma', action='store_true', help='Enable GOMA.', default=False) parser.add_argument('--adb-path', help='Path to the adb binary.') profile_android_startup.AddProfileCollectionArguments(parser) return parser
def CreateArgumentParser(): """Creates and returns the argument parser.""" parser = argparse.ArgumentParser() parser.add_argument( '--buildbot', action='store_true', help='If true, the script expects to be run on a buildbot') parser.add_argument('--device', default=None, type=str, help='Device serial number on which to run profiling.') parser.add_argument( '--verify', action='store_true', help='If true, the script only verifies the current orderfile') parser.add_argument( '--target-arch', action='store', dest='arch', default=cygprofile_utils.DetectArchitecture(), choices=['arm', 'arm64', 'x86', 'x86_64', 'x64', 'mips'], help='The target architecture for which to build') parser.add_argument('--output-json', action='store', dest='json_file', help='Location to save stats in json format') parser.add_argument( '--skip-profile', action='store_false', dest='profile', default=True, help='Don\'t generate a profile on the device. Only patch from the ' 'existing profile.') parser.add_argument( '--skip-patch', action='store_false', dest='patch', default=True, help='Only generate the raw (unpatched) orderfile, don\'t patch it.') parser.add_argument( '--netrc', action='store', help='A custom .netrc file to use for git checkin. Only used on bots.') parser.add_argument( '--branch', action='store', default='master', help='When running on buildbot with a netrc, the branch orderfile ' 'hashes get checked into.') # Note: -j50 was causing issues on the bot. parser.add_argument('-j', '--jobs', action='store', default=20, help='Number of jobs to use for compilation.') parser.add_argument('-l', '--max-load', action='store', default=4, help='Max cpu load.') parser.add_argument('--goma-dir', help='GOMA directory.') parser.add_argument('--use-goma', action='store_true', help='Enable GOMA.', default=False) parser.add_argument('--adb-path', help='Path to the adb binary.') parser.add_argument( '--manual-symbol-offsets', default=None, type=str, help=('File of list of ordered symbol offsets generated ' 'by manual profiling. Must set other --manual* ' 'flags if this is used, and must --skip-profile.')) parser.add_argument('--manual-libname', default=None, type=str, help=('Library filename corresponding to ' '--manual-symbol-offsets.')) parser.add_argument('--manual-objdir', default=None, type=str, help=('Root of object file directory corresponding to ' '--manual-symbol-offsets.')) profile_android_startup.AddProfileCollectionArguments(parser) return parser
def CreateArgumentParser(): """Creates and returns the argument parser.""" parser = argparse.ArgumentParser() parser.add_argument('--no-benchmark', action='store_false', dest='benchmark', default=True, help='Disables running benchmarks.') parser.add_argument( '--buildbot', action='store_true', help='If true, the script expects to be run on a buildbot') parser.add_argument( '--device', default=None, type=str, help='Device serial number on which to run profiling.') parser.add_argument( '--verify', action='store_true', help='If true, the script only verifies the current orderfile') parser.add_argument('--target-arch', action='store', dest='arch', default='arm', choices=['arm', 'arm64'], help='The target architecture for which to build.') parser.add_argument('--output-json', action='store', dest='json_file', help='Location to save stats in json format') parser.add_argument( '--skip-profile', action='store_false', dest='profile', default=True, help='Don\'t generate a profile on the device. Only patch from the ' 'existing profile.') parser.add_argument( '--skip-patch', action='store_false', dest='patch', default=True, help='Only generate the raw (unpatched) orderfile, don\'t patch it.') parser.add_argument('--goma-dir', help='GOMA directory.') parser.add_argument( '--use-goma', action='store_true', help='Enable GOMA.', default=False) parser.add_argument('--adb-path', help='Path to the adb binary.') parser.add_argument('--public', action='store_true', help='Build non-internal APK and change the orderfile ' 'location. Required if your checkout is non-internal.', default=False) parser.add_argument('--nosystem-health-orderfile', action='store_false', dest='system_health_orderfile', default=True, help=('Create an orderfile based on an about:blank ' 'startup benchmark instead of system health ' 'benchmarks.')) parser.add_argument( '--use-legacy-chrome-apk', action='store_true', default=False, help=('Compile and instrument chrome for [L, K] devices.')) parser.add_argument('--manual-symbol-offsets', default=None, type=str, help=('File of list of ordered symbol offsets generated ' 'by manual profiling. Must set other --manual* ' 'flags if this is used, and must --skip-profile.')) parser.add_argument('--manual-libname', default=None, type=str, help=('Library filename corresponding to ' '--manual-symbol-offsets.')) parser.add_argument('--manual-objdir', default=None, type=str, help=('Root of object file directory corresponding to ' '--manual-symbol-offsets.')) parser.add_argument('--noorder-outlined-functions', action='store_true', help='Disable outlined functions in the orderfile.') parser.add_argument('--pregenerated-profiles', default=None, type=str, help=('Pregenerated profiles to use instead of running ' 'profile step. Cannot be used with ' '--skip-profiles.')) parser.add_argument('--profile-save-dir', default=None, type=str, help=('Directory to save any profiles created. These can ' 'be used with --pregenerated-profiles. Cannot be ' 'used with --skip-profiles.')) parser.add_argument('--upload-ready-orderfiles', action='store_true', help=('Skip orderfile generation and manually upload ' 'orderfiles (both patched and unpatched) from ' 'their normal location in the tree to the cloud ' 'storage. DANGEROUS! USE WITH CARE!')) parser.add_argument('--streamline-for-debugging', action='store_true', help=('Streamline where possible the run for faster ' 'iteration while debugging. The orderfile ' 'generated will be valid and nontrivial, but ' 'may not be based on a representative profile ' 'or other such considerations. Use with caution.')) parser.add_argument('--commit-hashes', action='store_true', help=('Commit any orderfile hash files in the current ' 'checkout; performs no other action')) parser.add_argument('--use-call-graph', action='store_true', default=False, help='Use call graph instrumentation.') profile_android_startup.AddProfileCollectionArguments(parser) return parser
def CreateArgumentParser(): """Creates and returns the argument parser.""" parser = argparse.ArgumentParser() parser.add_argument( '--buildbot', action='store_true', help='If true, the script expects to be run on a buildbot') parser.add_argument('--device', default=None, type=str, help='Device serial number on which to run profiling.') parser.add_argument( '--verify', action='store_true', help='If true, the script only verifies the current orderfile') parser.add_argument('--target-arch', action='store', dest='arch', default='arm', choices=['arm', 'arm64'], help='The target architecture for which to build.') parser.add_argument('--output-json', action='store', dest='json_file', help='Location to save stats in json format') parser.add_argument( '--skip-profile', action='store_false', dest='profile', default=True, help='Don\'t generate a profile on the device. Only patch from the ' 'existing profile.') parser.add_argument( '--skip-patch', action='store_false', dest='patch', default=True, help='Only generate the raw (unpatched) orderfile, don\'t patch it.') parser.add_argument( '--netrc', action='store', help='A custom .netrc file to use for git checkin. Only used on bots.') parser.add_argument( '--branch', action='store', default='master', help='When running on buildbot with a netrc, the branch orderfile ' 'hashes get checked into.') # Note: -j50 was causing issues on the bot. parser.add_argument('-j', '--jobs', action='store', default=20, help='Number of jobs to use for compilation.') parser.add_argument('-l', '--max-load', action='store', default=4, help='Max cpu load.') parser.add_argument('--goma-dir', help='GOMA directory.') parser.add_argument('--use-goma', action='store_true', help='Enable GOMA.', default=False) parser.add_argument('--adb-path', help='Path to the adb binary.') parser.add_argument('--nosystem-health-orderfile', action='store_false', dest='system_health_orderfile', default=True, help=('Create an orderfile based on an about:blank ' 'startup benchmark instead of system health ' 'benchmarks.')) parser.add_argument('--monochrome', action='store_true', help=('Compile and instrument monochrome (for post-N ' 'devices).')) parser.add_argument( '--manual-symbol-offsets', default=None, type=str, help=('File of list of ordered symbol offsets generated ' 'by manual profiling. Must set other --manual* ' 'flags if this is used, and must --skip-profile.')) parser.add_argument('--manual-libname', default=None, type=str, help=('Library filename corresponding to ' '--manual-symbol-offsets.')) parser.add_argument('--manual-objdir', default=None, type=str, help=('Root of object file directory corresponding to ' '--manual-symbol-offsets.')) parser.add_argument('--noorder-outlined-functions', action='store_true', help='Disable outlined functions in the orderfile.') parser.add_argument( '--pregenerated-profiles', default=None, type=str, help=('Pregenerated profiles to use instead of running ' 'profile step. Cannot be used with ' '--skip-profiles.')) parser.add_argument( '--profile-save-dir', default=None, type=str, help=('Directory to save any profiles created. These can ' 'be used with --pregenerated-profiles. Cannot be ' 'used with --skip-profiles.')) parser.add_argument('--upload-ready-orderfiles', action='store_true', help=('Skip orderfile generation and manually upload ' 'orderfiles (both patched and unpatched) from ' 'their normal location in the tree to the cloud ' 'storage. DANGEROUS! USE WITH CARE!')) profile_android_startup.AddProfileCollectionArguments(parser) return parser