Android JIT编译:adb shell cmd package compile选项

Android JIT编译:adb shell cmd package compile选项

例如:

adb shell cmd package compile -m speed -f --full 包名

配置参数指令说明:

  compile [-r COMPILATION_REASON] [-m COMPILER_FILTER] [-p PRIORITY] [-f]
      [--primary-dex] [--secondary-dex] [--include-dependencies] [--full]
      [--split SPLIT_NAME] [--reset] [-a | PACKAGE_NAME]
    Dexopt a package or all packages.
    Options:
      -a Dexopt all packages
      -r Set the compiler filter and the priority based on the given
         compilation reason.
         Available options: 'first-boot', 'boot-after-ota',
         'boot-after-mainline-update', 'install', 'bg-dexopt', 'cmdline'.
      -m Set the target compiler filter. The filter actually used may be
         different, e.g. 'speed-profile' without profiles present may result in
         'verify' being used instead. If not specified, this defaults to the
         value given by -r, or the system property 'pm.dexopt.cmdline'.
         Available options (in descending order): 'speed', 'speed-profile',
         'verify'.
      -p Set the priority of the operation, which determines the resource usage
         and the process priority. If not specified, this defaults to
         the value given by -r, or 'PRIORITY_INTERACTIVE'.
         Available options (in descending order): 'PRIORITY_BOOT',
         'PRIORITY_INTERACTIVE_FAST', 'PRIORITY_INTERACTIVE',
         'PRIORITY_BACKGROUND'.
      -f Force dexopt, also when the compiler filter being applied is not
         better than that of the current dexopt artifacts for a package.
      --reset Reset the dexopt state of the package as if the package is newly
         installed.
         More specifically, it clears reference profiles, current profiles, and
         any code compiled from those local profiles. If there is an external
         profile (e.g., a cloud profile), the code compiled from that profile
         will be kept.
         For secondary dex files, it also clears all dexopt artifacts.
         When this flag is set, all the other flags are ignored.
      -v Verbose mode. This mode prints detailed results.
      --force-merge-profile Force merge profiles even if the difference between
         before and after the merge is not significant.
    Scope options:
      --primary-dex Dexopt primary dex files only (all APKs that are installed
        as part of the package, including the base APK and all other split
        APKs).
      --secondary-dex Dexopt secondary dex files only (APKs/JARs that the app
        puts in its own data directory at runtime and loads with custom
        classloaders).
      --include-dependencies Include dependency packages (dependencies that are
        declared by the app with <uses-library> tags and transitive
        dependencies). This option can only be used together with
        '--primary-dex' or '--secondary-dex'.
      --full Dexopt all above. (Recommended)
      --split SPLIT_NAME Only dexopt the given split. If SPLIT_NAME is an empty
        string, only dexopt the base APK.
        Tip: To pass an empty string, use a pair of quotes ("").
        When this option is set, '--primary-dex', '--secondary-dex',
        '--include-dependencies', '--full', and '-a' must not be set.
      Note: If none of the scope options above are set, the scope defaults to
      '--primary-dex --include-dependencies'.
  
  delete-dexopt PACKAGE_NAME
    Delete the dexopt artifacts of both primary dex files and secondary dex
    files of a package.
  
  bg-dexopt-job [--cancel | --disable | --enable]
    Control the background dexopt job.
    Without flags, it starts a background dexopt job immediately and waits for
      it to finish. If a job is already started either automatically by the
      system or through this command, it will wait for the running job to
      finish and then start a new one.
    Different from 'pm compile -r bg-dexopt -a', the behavior of this command
    is the same as a real background dexopt job. Specifically,
      - It only dexopts a subset of apps determined by either the system's
        default logic based on app usage data or the custom logic specified by
        the 'ArtManagerLocal.setBatchDexoptStartCallback' Java API.
      - It runs dexopt in parallel, where the concurrency setting is specified
        by the system property 'pm.dexopt.bg-dexopt.concurrency'.
      - If the storage is low, it also downgrades unused apps.
      - It also cleans up obsolete files.
    Options:
      --cancel Cancel any currently running background dexopt job immediately.
        This cancels jobs started either automatically by the system or through
        this command. This command is not blocking.
      --disable: Disable the background dexopt job from being started by the
        job scheduler. If a job is already started by the job scheduler and is
        running, it will be cancelled immediately. Does not affect jobs started
        through this command or by the system in other ways.
        This state will be lost when the system_server process exits.
      --enable: Enable the background dexopt job to be started by the job
        scheduler again, if previously disabled by --disable.
    When a list of package names is passed, this command does NOT start a real
    background dexopt job. Instead, it dexopts the given packages sequentially.
    This usage is deprecated. Please use 'pm compile -r bg-dexopt PACKAGE_NAME'
    instead.

Android JIT( ART即时编译器),Just In Time Compiler,即时编译技术-CSDN博客文章浏览阅读560次,点赞6次,收藏6次。Android Runtime (ART) 包含一个具备代码分析功能的即时 (JIT) 编译器,该编译器可以在 Android 应用运行时持续提高其性能。JIT是Just In Time Compiler,即时编译技术。JIT:以下是 ART 实现的一些主要功能。ART 引入了预先编译机制,可提高应用的性能。ART 还具有比 Dalvik 更严格的安装时验证。在安装时,ART 使用设备自带的 dex2oat 工具来编译应用。 https://blog.csdn.net/zhangphil/article/details/147520790

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/903760.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Android Kotlin 项目集成 Firebase Cloud Messaging (FCM) 全攻略

Firebase Cloud Messaging (FCM) 是 Google 提供的跨平台消息推送解决方案。以下是在 Android Kotlin 项目中集成 FCM 的详细步骤。 一、前期准备 1. 创建 Firebase 项目 访问 Firebase 控制台点击"添加项目"&#xff0c;按照向导创建新项目项目创建完成后&#x…

搭建PCDN大节点,服务器该怎么配

搭建P2P大节点时&#xff0c;服务器要怎么配呢&#xff1f;需要综合考虑硬件性能、网络带宽、存储能力、系统架构以及安全性等多个方面&#xff0c;以确保节点能够高效、稳定地运行。 一、硬件配置 CPU&#xff1a;选择高性能的多核处理器&#xff0c;以满足高并发处理需求。核…

(done) 吴恩达版提示词工程 8. 聊天机器人 (聊天格式设计,上下文内容,点餐机器人)

视频&#xff1a;https://www.bilibili.com/video/BV1Z14y1Z7LJ/?spm_id_from333.337.search-card.all.click&vd_source7a1a0bc74158c6993c7355c5490fc600 别人的笔记&#xff1a;https://zhuanlan.zhihu.com/p/626966526 8. 聊天机器人&#xff08;Chatbot&#xff09; …

AtCoder Beginner Contest 403(题解ABCDEF)

A - Odd Position Sum #1.奇数数位和 #include<iostream> #include<vector> #include<stdio.h> #include<map> #include<string> #include<algorithm> #include<queue> #include<cstring> #include<stack> #include&l…

【Game】Powerful——Abandoned Ruins(9)

文章目录 1、新增古玩2、机关机制3、探索法宝4、智斗强敌5、地图6、参考 2025 年 1 月迎来的新玩法——荒废遗迹 每周四个宝藏铲&#xff08;老玩法&#xff09;或者两个遗迹线索&#xff08;新玩法&#xff09;&#xff0c;3 个宝藏铲也可以换一个遗迹线索&#xff0c;之前没时…

构建网页版IPFS去中心化网盘

前言&#xff1a;我把它命名为无限网盘 Unlimited network disks&#xff08;ULND&#xff09;&#xff0c;可以实现简单的去中心化存储&#xff0c;其实实现起来并不难&#xff0c;还是依靠强大的IPFS&#xff0c;跟着我一步一步做就可以了。 第一步&#xff1a;准备开发环境…

国标GB28181视频平台EasyGBS在物业视频安防管理服务中的应用方案​

一、方案背景​ 在现代物业服务中&#xff0c;高效的安全管理与便捷的服务运营至关重要。随着科技的不断发展&#xff0c;物业行业对智能化、集成化管理系统的需求日益增长。EasyGBS作为一款基于国标GB28181协议的视频监控平台&#xff0c;具备强大的视频管理与集成能力&#…

[Unity]设置自动打包脚本

背景 我们经常会使用自动打包功能 文件名称: AutoBuild.csusing System.IO; using System.Linq; using UnityEditor; using UnityEngine;public class AutoBuilder {[MenuItem("Build/GetCurrentBuildTarget")]public static void GetCurrentBuildTarget(){Debug.L…

正点原子STM32H743单片机实现ADC多通道检测

目标 使用STM32CubeMX工具&#xff0c;配置ADC相关参数&#xff0c;实现在STM32H743单片机上获取ADC多通道电压值。共14个ADC引脚&#xff0c;ADC2有5个&#xff0c;ADC3有9个&#xff0c;全部设置单通道 ADC引脚 PF3PF4PF5PF10PC0PC2PC3PH2PH3PA3PB0PB1PA4PA5PA6 STM32cube…

深度学习基础(四)——计算量(FLOPs)、参数量(Params)、计算速度(FLOPS/TOPS))

一、计算量FLOPs FLOPs&#xff0c;全称为Floating Point Operations, (s为复数缩写&#xff09;&#xff0c;浮点运算数&#xff0c;指模型完成一次前向传播所需的浮点运算次数&#xff0c;可以理解为计算量&#xff08;模型的时间复杂度&#xff09;&#xff0c;用来衡量算法…

电子秤检测管理系统开发实战:从数据采集到可视化大屏

简介 电子秤作为现代工业生产和商业流通中的核心计量设备,其准确性直接关系到产品质量和交易公平。针对仙贝生产企业的电子秤管理需求,我们开发了一套集电子秤检测信息录入、产品信息管理、实时称重数据采集和后台可视化大屏于一体的综合管理系统。该系统基于Django框架构建…

Cesium添加WMS,WMTS,地形图图,3D Tiles数据

在 Cesium 中&#xff0c;你可以添加 WMS、WMTS、地形图 和 3D Tiles 数据源。以下是详细的实现方法&#xff1a; 1. 添加 WMS 服务 WMS&#xff08;Web Map Service&#xff09;是一种动态地图服务&#xff0c;适用于加载栅格地图图层。 代码示例 const viewer new Cesium…

数据库基本概念:数据库的定义、特点、分类、组成、作用

一&#xff1a;数据库相关概念 1.1 定义 &#xff08;1&#xff09;数据库&#xff1a;存储数据的仓库 &#xff08;2&#xff09;数据库管理系统&#xff1a;模拟和管理数据库的大型软件 &#xff08;3&#xff09;SQL&#xff1a;操作关系型数据库的编程语言&#xff0c;定义…

【项目篇之消息序列化】仿照RabbitMQ模拟实现消息队列

实现消息序列化 为什么不使用JSON来序列化直接使用二进制序列化实现序列化方法toBytes()1&#xff1a; 创建内存缓冲区​​2 &#xff1a;创建对象序列化通道​3&#xff1a;执行序列化操作​4&#xff1a;提取二进制数据&#xff0c;转换成byte[]序列化图示流程&#xff1a;序…

单片机-89C51部分:13、看门狗

飞书文档https://x509p6c8to.feishu.cn/wiki/LefkwDPU7iUUWBkfKE9cGLvonSh 一、作用 程序发生死循环的时候&#xff08;跑飞&#xff09;&#xff0c;能够自动复位。 启动看门狗计数器->计数器计数->指定时间内不对计数器赋值&#xff08;主程序跑飞&#xff0c;无法喂…

C++23/26 静态反射机制深度解析:编译时元编程的新纪元

目录 引言 一、C静态反射的核心特性 1. 编译时元数据获取 2. 元信息操作的语法革新 3. 与现有特性的深度融合 二、应用场景&#xff1a;从理论到实践 1. 序列化与反序列化 2. 领域特定语言&#xff08;DSL&#xff09;与代码生成 3. 动态插件系统 4. 调试与元编程增强…

RISCV学习(5)GD32VF103 MCU架构了解

RISCV学习&#xff08;5&#xff09;GD32VF103 MCU架构了解 1、芯片内核功能简介 GD32VF103 MCU架构&#xff0c;采用Bumblebee内核&#xff0c;芯来科技&#xff08;Nuclei System Technology&#xff09;与台湾晶心科技&#xff08;Andes Technology&#xff09;联合开发&am…

【Java学习笔记】递归

递归&#xff08;recursion&#xff09; 思想&#xff1a;把一个复杂的问题拆分成一个简单问题和子问题&#xff0c;子问题又是更小规模的复杂问题&#xff0c;循环往复 本质&#xff1a;栈的使用 递归的注意事项 &#xff08;1&#xff09;需要有递归出口&#xff0c;否者就…

渗透测试中的那些“水洞”:分析与防御

1. Nginx 版本泄露 风险分析&#xff1a; Nginx 默认会在响应头中返回 Server: nginx/x.x.x&#xff0c;攻击者可利用该信息匹配已知漏洞进行攻击。 防御措施&#xff1a; 修改 nginx.conf 配置文件&#xff0c;隐藏版本信息&#xff1a;server_tokens off;使用 WAF 进行信息…

基于C#开发的适合Windows开源文件管理器

使用DDD从零构建一个完整的系统 推荐一个功能强大且直观的开源文件管理器&#xff0c;适用于Windows平台。 01 项目简介 该项目是一个基于C#开发、开源的文件管理器&#xff0c;适用于Windows&#xff0c;界面UI美观、方便轻松浏览文件。此外&#xff0c;支持创建和提取压缩…