基线轮廓X R8/Proguard

发布于 2025-02-06 08:29:27 字数 408 浏览 3 评论 0原文

我一直在尝试Android的基线概况& Macrobenchmark库,用于改善应用程序性能。

我的问题是,建议 macrobchmark的构建类型与reparts构建一样,但使用-dontobfuscate在Proguard中规则。
如果生产应用程序将是通过Minification混淆,那么基线profiler如何在应用程序性能方面有所帮助,因为这些类在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

残花月 2025-02-13 08:29:27

我在

资料来源:检查注释#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.

南街九尾狐 2025-02-13 08:29:27

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文