Skip to content

[flutter_tools] simplify symbol logic for iOS#49628

Merged
jonahwilliams merged 2 commits intoflutter:masterfrom
jonahwilliams:simplify_debug_symbols
Jan 29, 2020
Merged

[flutter_tools] simplify symbol logic for iOS#49628
jonahwilliams merged 2 commits intoflutter:masterfrom
jonahwilliams:simplify_debug_symbols

Conversation

@jonahwilliams
Copy link
Copy Markdown
Contributor

Description

Previously, gen_snapshot could not properly strip assembly snapshots created for profile/release applications on iOS. Thus, several tests were written with the assumption that debug symbols exist for profile and specific symbol stripping logic was added to xcode_backend.sh.

After reviewing the tests/documentation, it's not clear that we can't remove all of it.

FYI @goderbauer / @cbracken / @jmagman

@fluttergithubbot fluttergithubbot added c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels. labels Jan 28, 2020
@jonahwilliams
Copy link
Copy Markdown
Contributor Author

Also @dnfield

Copy link
Copy Markdown
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The impeotant part here is that they don't get indexed by spotlight, which Xcode will use incorrectly

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

Does strip not remove the symbols that dsymutil would otherwise use?

@dnfield
Copy link
Copy Markdown
Contributor

dnfield commented Jan 28, 2020

You may want to use those symbols for local debugging though right?

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

We're currently only keeping those symbols in profile mode though - there are no symbols for debug, and release is always stripped. What are they being used for, and why is this configuration different from the configuration we use for android?

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

Basically its not clear to me that the current state of the world is due to anything besides --strip previously not working

@dnfield
Copy link
Copy Markdown
Contributor

dnfield commented Jan 28, 2020

I'm pretty sure @xster wanted these for something

@jonahwilliams
Copy link
Copy Markdown
Contributor Author

This may block #48726 , still investigating

Copy link
Copy Markdown
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked offline.

These are only the symbols for the App framework, which is all generated assembly from gen_snapshot. I can't imagine these ever being very useful. If it turns out we need them, we can go back and add them back in. Don't want to block further progress on the iOS build improvements because of this.

LGTM

@jonahwilliams jonahwilliams merged commit cb3b7ab into flutter:master Jan 29, 2020
@jonahwilliams jonahwilliams deleted the simplify_debug_symbols branch January 29, 2020 21:43
@xster
Copy link
Copy Markdown
Member

xster commented Feb 4, 2020

If you globally strip these, you can't use instrument tools like the cpu profiler etc anymore on your application code. Having a single view of cpu utilization across native and Dart (whose functions get properly annotated when symbols are present) is really useful.

@dnfield
Copy link
Copy Markdown
Contributor

dnfield commented Feb 4, 2020

@xster - maybe you, Jonah, and I can talk more about this when you're back.

It seems like using profile mode to do native profiling is sub-optimal because profile mode still has the service isolate/vmservice. It also seems like this use case is pretty specialized and it's not clear if we have customers who need it beyond occasionally using it ourselves.

@xster
Copy link
Copy Markdown
Member

xster commented Feb 12, 2020

@yuanhuihui you guys are doing a lot of work at ByteDance to support AOT traces on Android #47771. Do you make use of native profilers / debug symbols on iOS as well?

@yuanhuihui
Copy link
Copy Markdown
Contributor

@xster currently, our performance analysis tool on iOS does not use debug symbols to view the trace.

@GelaZhang
Copy link
Copy Markdown

Do not generate app.framework.dSym in release mode。
How can I find symbol about app.framework ?

jmagman added a commit to jmagman/flutter-wiki that referenced this pull request Jul 23, 2021
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants