[TIMOB-13342] Profiler: Android: results are inconsistent and lacking some function calls
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2013-06-11T18:52:41.000+0000 |
Affected Version/s | Release 3.1.0, Release 3.1.1 |
Fix Version/s | n/a |
Components | Android, Tooling |
Labels | qe-3.1.0, qe-3.1.1 |
Reporter | Dustin Hyde |
Assignee | Max Stepanov |
Created | 2013-04-03T03:43:28.000+0000 |
Updated | 2013-06-11T18:52:41.000+0000 |
Description
If you run more than one to three snapshots for Android, all results are one node: (program) 100%
The other nodes only appear on the creation of the first few snapshots.
Test Steps:
1. Run code (app.js) in Android Profiler:
var string = '0123456789';
function complexity_constant()
{
console.log(string);
}
function complexity_linear()
{
for(i in string)
console.log(string[i]);
}
function complexity_quadratic()
{
for(i in string)
for(j in string)
console.log(string[i] + ',' + string[j]);
}
var win = Ti.UI.createWindow({
layout:'vertical',
backgroundColor:'white'
});
function createButton(title, e)
{
var button = Ti.UI.createButton({
title:title
});
button.addEventListener('click', e);
win.add(button);
}
createButton('constant', complexity_constant);
createButton('linear', complexity_linear);
createButton('quadratic', complexity_quadratic);
win.open();
2. Create a few snapshots and click on some of the buttons.
Test Results:
After a few snapshots, all data stops appearing.
Attachments
File | Date | Size |
---|---|---|
alloy_android_device_session_1.hprof | 2013-06-07T22:34:24.000+0000 | 598 |
alloy_android_device_session_2.hprof | 2013-06-07T22:34:24.000+0000 | 263 |
alloy_android_device_session_3.hprof | 2013-06-07T22:34:24.000+0000 | 598 |
alloy_android_device_session_4.hprof | 2013-06-07T22:34:24.000+0000 | 493 |
alloy_android_device_session_5.hprof | 2013-06-07T22:34:24.000+0000 | 361 |
alloy_android_device_session_6.hprof | 2013-06-07T22:34:24.000+0000 | 500 |
This doesn't appear to be a Studio issue. We display the data for what we get for each profiling session, and the data here only contains the idle entry. Need Max to take a look at it.
I turned on profiler logging and here is what reported from underlying V8 profiler APIs:
This might be related to JIT optimizations, or a bug in V8 profiler. The issue is only seen on Emulator, cannot reproduce on device.
I am attaching some alloy profile sessions on the default alloy project. For each session, I clicked on the hello world button three times. I seem to get the results as time progresses, so I don't see this issue (of the results disappearing over time) for alloy on android device. However, the results are different each time, possibly related to the time being too close to zero, and thus not showing up.
Reclosing as not our bug for now. Perhaps upgrading V8 might help.
Closing.