Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BLANK Instruments screen when using 'Time Profiler'. Latest build of Xcode 6

A few days ago, 'time profiler' stopped working. Other instruments still work... core animation, allocations, etc. Time profiler is just a blank screen. No function calls showed, no graph, nothing. Same result for multiple projects.

I just reinstalled Xcode (over itself). Same problem. I can't find any preference files floating around that I can delete for Instruments. I really, really need this to work. I don't really have time to reinstall the entire OS.

enter image description here



HELP


Edit: Deleting com.apple.dt.instruments.plist doesn't change anything. Found these logs in Console from instruments (below). Looks like something funny is going on, and probably worth submitting a bug to Apple. For now, the question is - how do I reset the state of instruments back to what it should be?

1/10/14 9:12:02.690 am Instruments[30211]: WebKit Threading Violation - initial use of WebKit from a secondary thread.
1/10/14 9:12:02.887 am Instruments[30211]: Invalid color System, labelColor (warning given only once)
1/10/14 9:12:04.761 am Instruments[30211]: <XRHorizontalFillSplitView: 0x6180001440a0>: the delegate <PFTTraceDocument: 0x7fda11423d90> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
1/10/14 9:12:04.761 am Instruments[30211]: Split view bounds: {{0, 0}, {1000, 629}}
1/10/14 9:12:04.761 am Instruments[30211]:     Subview frame: {{0, 0}, {1232, 247}}
1/10/14 9:12:04.761 am Instruments[30211]:     Subview frame: {{0, 248}, {1232, 323}}
1/10/14 9:12:04.761 am Instruments[30211]: The outer edges of the subview frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)
1/10/14 9:12:04.762 am Instruments[30211]: <XRSplitView: 0x618000133240>: the delegate <PFTTraceDocument: 0x7fda11423d90> was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:
1/10/14 9:12:04.762 am Instruments[30211]: Split view bounds: {{0, 0}, {1000, 323}}
1/10/14 9:12:04.762 am Instruments[30211]:     Subview frame: {{0, 0}, {972, 223}}
1/10/14 9:12:04.762 am Instruments[30211]:     Subview frame: {{973, 0}, {259, 223}}
1/10/14 9:12:04.763 am Instruments[30211]: The outer edges of the subview frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)
1/10/14 9:12:04.975 am Instruments[30211]: Unable to simultaneously satisfy constraints:
(
    "<NSAutoresizingMaskLayoutConstraint:0x61000009f810 h=-&- v=--& H:|-(22)-[NSSlider:0x6180001435a0]   (Names: '|':NSView:0x610000136760 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009f7c0 h=-&- v=--& H:[NSSlider:0x6180001435a0]-(34)-|   (Names: '|':NSView:0x610000136760 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009eeb0 h=-&- v=-&- H:|-(0)-[NSView:0x610000136760]   (Names: '|':NSClipView:0x7fda1164d0d0 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009ee60 h=-&- v=-&- H:[NSView:0x610000136760]-(0)-|   (Names: '|':NSClipView:0x7fda1164d0d0 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009ecd0 h=-&- v=-&- H:|-(0)-[NSClipView:0x7fda1164d0d0]   (Names: '|':NSScrollView:0x6180001db210 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009ec80 h=-&- v=-&- H:[NSClipView:0x7fda1164d0d0]-(0)-|   (Names: '|':NSScrollView:0x6180001db210 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009e5f0 h=-&- v=--& H:|-(0)-[NSScrollView:0x6180001db210]   (Names: '|':PFTDataViewer:0x6100001edb00 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009e5a0 h=-&- v=--& H:[NSScrollView:0x6180001db210]-(0)-|   (Names: '|':PFTDataViewer:0x6100001edb00 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x61000009dfb0 h=--& v=--& H:[PFTDataViewer:0x6100001edb00(0)]>"
)

Will attempt to recover by breaking constraint 
<NSAutoresizingMaskLayoutConstraint:0x61000009f7c0 h=-&- v=--& H:[NSSlider:0x6180001435a0]-(34)-|   (Names: '|':NSView:0x610000136760 )>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, break on objc_exception_throw to catch this in the debugger.
like image 678
Jordan Smith Avatar asked Sep 30 '14 20:09

Jordan Smith


People also ask

Where is instruments in Xcode?

If you have Xcode already, you already have Instruments. From Xcode's product menu, choose Profile. Although Instruments is embedded within and is often used with Xcode, Instruments is a separate app which may be used independently as needed. You are free to choose how you start your performance analysis quest.

How do I use instruments in Xcode?

Instrumenting AllocationsPress Command-I in Xcode, select Allocations from the list and press Choose. After a moment, you'll see the Allocations instrument. It should look familiar because it looks a lot like Time Profiler. Click the record button in the top-left corner to run the app.

What is profiler in Xcode?

Using the Xcode Instruments Time Profile to investigate and improve the performance. The Time Profiler instrument gives insights into the system's CPUs and how effective multiple cores and threads are used. The better this part in your app is, the better your app is performing.

What is profiler in Swift?

In simplest of terms, Time Profiler collects information about your app while it's running, determines how long each of your functions takes to run, and also figures out the percentage of CPU cycles each of your functions is using.


1 Answers

Restarting the device solved the issue.

Simulator > Hardware > Restart

like image 174
Jordan Smith Avatar answered Oct 15 '22 01:10

Jordan Smith