Xcode's Time Profiler shows addresses instead of symbols
Asked Answered
F

5

19

In general, my problem could be seen on this screen-shot:

A lot of non-symbolicated addresses and something that looks broken inside "Symbols" menu.

Well, and some settings and actions in attempt to solve this. But none still helped:

  • Profile tab is set to use Debug
  • Symbols stripping disabled for both Debug and Release
  • Optimization level is "none" for both Debug and Release
  • Clean, Delete, Restart, etc
  • mdimport ~/Library/Developer/
  • DWARF and dSYM format
Fuller answered 1/10, 2015 at 14:19 Comment(5)
Unusual. It's supposed to be run in release mode (no point profiling unoptimized code) using the default symbol/stripping settings. I have never had any issues with this.Adsorbate
I've run it in both modesFuller
@Fuller Make sure the Generate Debug Symbols build setting is set to Yes.Burgener
set to "Yes" for both modesFuller
I faced with it too few times, I think it's bug and restarting Xcode was always worked for me.Halflife
C
6

I had the same problem - and did everything on your list as well. Here's what finally worked for me:

  • In Instruments, stop the process if it's running.
  • Go to File -> Symbols, and under dSYM path, find the library that isn't being symbolicated.
  • In my case, it was pointing to items in the Trash. So I emptied the Trash, deleted the Module Cache and project in the Derived Data folder, and when I rebuilt the project it started working again. In your case it could be pointing to some other file that either doesn't exist or isn't reachable by Instruments.
Cytology answered 1/2, 2016 at 19:59 Comment(0)
L
1

Activating "Always Embed Swift Standard Libraries" on the target I was profiling, fixed it for me. YMMV

Lewin answered 7/12, 2020 at 19:29 Comment(0)
T
0

I had the same problem running in the simulator, and it was driving me nuts because ALL the standard go-to fixes were not working.

What did it for me was plugging my iPad into the MacBook and running an instruments session against said app on my plugged in iPad. Instruments properly symbolicated my app when running on the iPad, and then continued to work when I disconnected the iPad and ran instruments later in the simulator.

I suspect it had something to do with updating my project to use the following...

  • libsqlite3.tbd instead of libsqlite3.dylib
  • libstdc++.6.tbd instead of libstdc++.dylib

I don't know why that would be the case, but that was the ONLY project change I had made before my symbols were lost in Instruments.

Tilbury answered 18/5, 2017 at 20:42 Comment(0)
T
0

In my case I had excluded my derived data directory from spotlight. It turns out that if you do this you must add it back into instruments via Instruments -> Preferences -> Symbols

Tierza answered 28/11, 2017 at 15:33 Comment(0)
L
0

You are able to add your dSYM[About] using Instruments 12.0

Instruments -> Preferences... -> Symbols
//or
File -> Symbols...
//if File -> Symbols... is not active - stop the process and try again

*Also do not forget to generate .dSYM file beforehand

Lamasery answered 17/11, 2020 at 23:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.