New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set AppStartUp UserTag from engine #27553
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
The presubmit test failures appear to be realted. |
@jason-simmons Do you know if there's any way to get the backtraces in the test logs to show file names and line numbers? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@zanderso The Abseil symbolizer library that we recently adopted does not provide line numbers. Apparently that feature is not on their roadmap (abseil/abseil-cpp#382) |
I was able to get a backtrace:
Looks like we might need to Instructions to get better backtraces:
|
Are you suggesting that we make a call to If it is the former, what isolate would we want to pass to |
@kenzieschmoll Given that you wish to set the start and end tags prior to the start of the app and after the end of the app respectively, I think the API shouldn't expect you to have an isolate started. Given this, I think the Dart impl should allow for setting and unsetting of user tags without having to call enter isolate. |
That might be difficult. I believe the user tag is stored on the current isolate: https://github.com/dart-lang/sdk/blob/master/runtime/vm/isolate.h#L1498. @a-siva or @rmacnak-google might know more. |
Just a small correction on this - we wish to set the "AppStartUp" tag at the start of the app if possible. So whereever the main isolate is created / started, we should be setting the "AppStartUp" UserTag. And then we want to unset the "AppStartUp" UserTag once app start up has completed, which has already landed in the framework (flutter/flutter#86516). |
Yes, UserTags are stored per isolate and the C API call Dart_NewUserTag requires an isolate to be present when it is invoked. |
This is the engine side of flutter/flutter#84884. This 'AppStartUp' user tag will be unset in the framework once app start up is complete (flutter/flutter#86516). Tools will pull the CPU profile tagged with 'AppStartUp' to provide better app start up profiling support. Supercedes: flutter#27553
This is the engine side of flutter/flutter#84884. This 'AppStartUp' user tag will be unset in the framework once app start up is complete (flutter/flutter#86516). Tools will pull the CPU profile tagged with 'AppStartUp' to provide better app start up profiling support. Supercedes: flutter#27553
This is the engine side of flutter/flutter#84884. This 'AppStartUp' user tag will be unset in the framework once app start up is complete (flutter/flutter#86516). Tools will pull the CPU profile tagged with 'AppStartUp' to provide better app start up profiling support. Supercedes: flutter#27553
This is the engine side of flutter/flutter#84884. This 'AppStartUp' user tag will be unset in the framework once app start up is complete (flutter/flutter#86516). Tools will pull the CPU profile tagged with 'AppStartUp' to provide better app start up profiling support. Supercedes: flutter#27553
Kaushik's variant of the patch has landed. Closing this one. |
This is the engine side of flutter/flutter#84884. This 'AppStartUp' user tag will be unset in the framework once app start up is complete (flutter/flutter#86516). Tools will pull the CPU profile tagged with 'AppStartUp' to provide better app start up profiling support.
CC @xster @bkonyi @iskakaushik