Bug 41434 - Multiple problems with Time Profiler on Android
Summary: Multiple problems with Time Profiler on Android
Status: RESOLVED FIXED
Alias: None
Product: Profiler
Classification: Xamarin
Component: Android ()
Version: 0.33.x
Hardware: PC Mac OS
: High normal
Target Milestone: (C8)
Assignee: Rodrigo Moya
URL:
Depends on:
Blocks:
 
Reported: 2016-06-01 14:50 UTC by Evgeny
Modified: 2016-10-13 16:03 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Separate by thread (535.37 KB, image/png)
2016-06-01 14:50 UTC, Evgeny
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Evgeny 2016-06-01 14:50:30 UTC
Created attachment 16155 [details]
Separate by thread

I have just tried the latest version of the Time Profiler (0.33.1-0) with our Android app. While I am happy to see it re-enabled, it seems to be unusable in it's current state. Here are the problems I have encountered in my brief testing:

1) The app crashes every time when executed with Timer Profiler on a device. The profiler seems to start collecting information, but app crashes a few seconds after the startup. Tried clean/rebuild multiple times. Seems to be working fine on a simulator (that's where I did all of my testing).

2) Separate by thread option seems to be completely wrong. All but one thread have zero execution time. 

3) Both Full and Invert call trees options only have part of the call stack. Some leaf nodes in the Invert call tree appear as '0x0'.

4) There seems to be a lot of information missing in Full/Invert call tree modes. I know which parts of our app are CPU heavy, but I don't see them in the profiler.
Comment 1 Rodrigo Moya 2016-06-03 14:37:51 UTC
Yes, we re-enabled the Time instrument for Android because it works in some situations, but unfortunately it doesn't in some others :( The runtime team is looking at a fix which should hit the channels soon, so please be patient.

All of the problems you mention are indeed related to sampling not working on your Android device/simulator.
Comment 2 asimk 2016-07-05 05:36:02 UTC
I have checked this issue with the latest profiler build and able to reproduce this issue. 
I observed that I am getting 0X0 value for call Tree Nodes.

Profiler Log: https://gist.github.com/Asimk360/86f8cb132a9b9f8707d41bf1fbc088ae
Screencast: http://www.screencast.com/t/80cf8jT34d

Environment Info:
Profiler v.0.33.99.55
Comment 3 Rodrigo Moya 2016-10-13 12:27:13 UTC
This should be working now with the latest runtime fixes, so closing. Please reopen if you still see it
Comment 4 Nate Cook 2016-10-13 16:00:09 UTC
@Rodrigo The latest preview for Xamarin Profiler (0.38.0) says that one of the known issues is "Time instrument not available for Android". Are you saying that those release notes are inaccurate?
Comment 5 Rodrigo Moya 2016-10-13 16:02:55 UTC
hmm, where do you see that? See:

https://developer.xamarin.com/releases/profiler/preview/profiler-0.38.0/

it just mentions Time instrument not available for tvOS.
Comment 6 Nate Cook 2016-10-13 16:03:55 UTC
@Rodrigo here https://releases.xamarin.com/preview-xamarin-profiler-0-38-0/