基线轮廓X R8/Proguard
我一直在尝试Android的基线概况& Macrobenchmark库,用于改善应用程序性能。
我的问题是,建议 macrobchmark的构建类型与reparts
构建一样,但使用-dontobfuscate
在Proguard中规则。
如果生产应用程序将是通过
,那么基线profiler如何在应用程序性能方面有所帮助,因为这些类在Minification
混淆baseare>基线>基线prof.txt中可能完全不同
&在应用程序的class.dex
文件中。
Profiler&amp之间是否存在某种映射。 proguard/r8?
I've been experimenting with Android's Baseline Profile & MacroBenchmark libraries for improving the app performance.
The question I have is that it is suggested that the MacroBenchmark's build-types be as close to the release
build but with -dontobfuscate
in the proguard rules.
If the production app is going to be obfuscated
via minification
then how can Baseline Profiler help in app performance as the classes could be completely different in baseline-prof.txt
& in the app's classes.dex
file.
Is there some sort of mapping happening internally between Profiler & Proguard/R8?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在
资料来源:检查注释#2 。
I asked the same question on the Google Issue Tracker & was told that the Baseline Profile also participates in the obfuscation process & the classes/methods recorded by the benchmark are refactored with the new obfuscated ones during the obfuscation.
Source: Check comment#2.
我在与基线订单团队咨询后进行了编辑。
支持基线配置文件使用R8映射文件从输入程序到R8生成的应用的基线配置文件。由于R8生成的映射文件仅旨在能够从生成的应用程序映射回Orignial应用程序,因此映射另一种方式尚未完成。 “最佳努力”通常会很好,但可能还不完整。
I edited this after consulting with the Baseline Profule team.
The support for Baseline Profiles will do a "best effort" mapping of the baseline profile from the input program to the R8 generated app using the R8 mapping file. As the mapping file generated by R8 is only designed to be able to map from the generated app back to the orignial app, so mapping the other way is not complete. The "best effort" usually will work quite well, but might not be complete.