Monday, December 15, 2008

TraceView : the Android profiler ?

Yesterday, I tried to use the Android profiler, traveView.

I carefully added a Debug.startMethodTracing("MyGame") and a Debug.stopMethodTracing() at the start and at the end of my activity, check that I had a file with a non zero length ( I hadn't that at the start ).

So I happily launch
traceview.bat c:\work\temp\MyGame.trace

How deceive I was to have such a result, instead of a nice graphic application !

Exception in thread "main" java.lang.RuntimeException: Method exit (java/lang/Object. ()V) does not match current method (java/lang/reflect/Constructor.constructNative ([Ljava/lang/Object;Ljava/lang/Class;[Ljava/lang/Class;IZ)Ljava/lang/Object;)
at com.google.traceview.ThreadData.exit(ThreadData.java:116)
at com.google.traceview.ThreadData.handleCall(ThreadData.java:78)
at com.google.traceview.DmTraceReader.parseDataPass2(DmTraceReader.java:285)
at com.google.traceview.DmTraceReader.parseData(DmTraceReader.java:176)
at com.google.traceview.DmTraceReader.generateTrees(DmTraceReader.java:78)
at com.google.traceview.DmTraceReader.(DmTraceReader.java:71)
at com.google.traceview.MainWindow.main(MainWindow.java:187)

I though it might be because of the path, so I put my trace file in my tool directory... Same results...

In the documentation, they don't use the .trace extension... With no hope I tried it... But it didn't change anything...

So for the moment, I have no solution.
On the forums, someone suggested that the profiler was simply not working on XP...
Well, I don't know.

if someone has a suggestion, I'd happily heard it !

1 comment:

Unknown said...

For me the traceview profiler works on XP also

traceview c:\my-logs\vik.trace

I am able to get the traceview in GUI format

vikrant