Profiling Android apps with Eclipse plugin TPTP instead of traceview

二次信任 提交于 2019-12-03 01:28:31

问题


The standard way to profile an Android application in Eclipse is using the plugin DDMS and creating a trace file with all the information inside. If you want to view this information you can use "traceview". I didn't like my first experience with this application because you can't filter the results. You have a lot of method calls for starting your application and you cannot filter only your code.

I have been looking for an alternative method. I found this tutorial Using Eclipse* TPTP to Visualize Google* Android* Profiling Data that explains how you can use the Eclipse Test & Performance Tools Platform (TPTP) Profiling tool to visualize Android profiling data. Thanks to this previous post Permission to write to the SD card I managed to take my trace file from the Android Emulator into my file systems. The next step is converting this .trace file into a TPTP .trcxml file. I didn't find this converter they talk about.

Anyone knows where I can find this converter? Do you know another way to analyze this trace file with TPTP or with another more mature FREE profiler tool? Do you know another way to profile Android application? Thanks in advance


Edit 1:

I found some interesting tool you can use to analyze Android apps memory usage. In order to get memory usage from Eclipse you have to "Dump HPROF file" from the DDMS prospective. Before doing that you have to choose in the DDMS preference panel, when it says "HPROF Action", the "Save to disk" action. So from now on when you dump HPROF file you'll be asked where you want to save your .hprof file. You have to convert this file with the Android tool "hprof-conv" you can find in your Android SDK installation under the directory "./tools". Finally now you can use the Eclipse MAT plugin to view the memory usage stats. I hope it will help someone else. If anyone knows something else about profiling Android apps it will appreciated. Thanks


回答1:


From DeveloperWorks

To read a trcxml file content, you should use "File" > "Import..." > "Profiling and Logging" > "Profiling File" option to import the resource and view the trace data with TPTP views

Update:

Are you looking for hprof-conv? Should be in the sdk/tools directory

Update2:

Sorry, I didn't see your update, the conversion tool is available as an attachment from the source provided at EclipseWorld 2005. Hope that helps.



来源:https://stackoverflow.com/questions/5507816/profiling-android-apps-with-eclipse-plugin-tptp-instead-of-traceview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!