IP Library › Granted Patent US 9,389,936
Granted Patent B2
US 9,389,936 · App. 13/241,249 · Granted Jul 12, 2016

Monitoring the responsiveness of a user interface

Inventors: Cameron McColl (Woodinville, WA); Philip Price (Seattle, WA); Bertan Aygun (Issaquah, WA); Shibani Basava (Redmond, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC.
G06F11/0715G06F9/485G06F11/0757G06F11/0778
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,389,936
App. No.
13/241,249
Granted
Jul 12, 2016
Kind
B2
Abstract

A diagnostic mechanism monitors execution of a user interface (UI) thread to detect execution of a long running task that may have caused the UI thread to become unresponsive. The execution time of the UI thread is monitored and when it exceeds a threshold, the UI thread's call stack is preserved to a mini-dump file. The completion time of the UI thread is also tracked and stored in a delay file. The mini-dump and delay files are then uploaded to a server where the collected data is aggregated overall execution runs by multiple users to identify the cause of the unresponsiveness.

Claims (51)

1. A method for monitoring the responsiveness of a user interface, comprising:

monitoring execution of a user interface (UI) thread processing an event from when the UI thread initiates execution of a message associated with the event to completion of an event handler that is associated with the event;

determining that the UI thread is unresponsive when an amount of time the UI thread takes to process the event exceeds a threshold;

suspending execution of the UI thread;

during the suspended execution of the UI thread, preserving a call stack associated with the UI thread when the UI thread is determined to be unresponsive; and

resuming execution of the UI thread once the call stack is preserved,

wherein the preceding steps are performed on at least one processor.

2. The method of claim 1 , further comprising:

aggregating a plurality of call stacks and a plurality of delay times associated with unresponsiveness of the UI thread.

3. The computer implemented method of claim 2 , further comprising:

transmitting the aggregated plurality of call stacks and aggregated plurality of delays times to a remote server.

4. The method of claim 1 , wherein monitoring execution of the UI thread is performed by a monitoring thread executing concurrently in a same process as the UI thread.

5. The method of claim 1 , the determining step further comprising:

resetting a stored time value prior to the UI thread initiating execution of the event; and

polling a current timer until the current timer meets the threshold.

6. The method of claim 1 , wherein the event is represented in the form of at least one message, wherein the threshold represents a predetermined amount of time the UI thread is expected to retrieve a message from a message queue.

7. The method of claim 1 , wherein an operating system inserts the message into a message queue upon detection of a user input and wherein the UI thread initiates processing of the event when the UI thread pulls the message off the message queue.

8. A device, comprising:

at least one processor and a memory;

the at least one processor configured to:

monitor execution of a user interface (UI) thread processing an event from when the UI thread initiates execution of a message associated with the event to completion of an event handler that is associated with the event;

determine that the UI thread is unresponsive when an amount of time the UI thread takes to process the event exceeds a threshold;

suspend execution of the UI thread;

during the suspended execution of the UI thread, preserve a call stack associated with the UI thread when the UI thread is determined to be unresponsive; and

resume execution of the UI thread once the call stack is preserved.

9. The device of claim 8 , wherein the at least one processor is further configured to:

aggregate a plurality of call stacks and a plurality of delay times associated with unresponsiveness of the UI thread.

10. The device of claim 9 , wherein the at least one processor is further configured to:

transmit the aggregated plurality of call stacks and aggregated plurality of delay times to a remote server.

11. The device of claim 8 , wherein monitor execution of the UI thread is performed by a monitoring thread executing concurrently in a same process as the UI thread.

12. The device of claim 8 , wherein the at least one processor is further configured to:

reset a stored time value prior to the UI thread initiating execution of the event; and

poll a current timer until the current timer meets the threshold.

13. The device of claim 8 , wherein the event is represented in the form of at least one message, wherein the threshold represents a predetermined amount of time the UI thread is expected to retrieve a message from a message queue.

14. The device of claim 8 , wherein an operating system inserts the message into a message queue upon detection of a user input and wherein the UI thread initiates processing of the event when the UI thread pulls the message off the message queue.

15. A system, comprising:

at least one processor and a memory;

the at least one processor configured to:

monitor execution of a user interface (UI) thread processing an event from when the UI thread initiates execution of a message associated with the event to completion of an event handler that is associated with the event;

determine that the UI thread is unresponsive when an amount of time the UI thread takes to process the event exceeds a threshold;

suspend execution of the UI thread;

during the suspended execution of the UI thread, preserve a call stack associated with the UI thread when the UI thread is determined to be unresponsive; and

resume execution of the UI thread once the call stack is preserved.

16. The system of claim 15 , wherein monitor execution of the UI thread is performed by a monitoring thread executing concurrently in a same process as the UI thread.

17. The system of claim 15 , wherein the at least one processor is further configured to:

aggregate a plurality of call stacks and a plurality of delay times associated with unresponsiveness of the UI thread.

18. The system of claim 15 , wherein the at least one processor is further configured to:

reset a stored time value prior to the UI thread initiating execution of the event; and

poll a current timer until the current timer meets the threshold.

19. The system of claim 15 , wherein the event is represented in the form of at least one message, wherein the threshold represents a predetermined amount of time the UI thread is expected to retrieve a message from a message queue.

20. The system of claim 15 , wherein an operating system inserts the message into a message queue upon detection of a user input and wherein the UI thread initiates processing of the event when the UI thread pulls the message off the message queue.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034544/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 17, 2011
From: MCCOLL, CAMERON; PRICE, PHILIP; AYGUN, BERTAN; BASAVA, SHIBANI
To: MICROSOFT CORPORATION
Reel/Frame 027242/0102 →
Continuity (1)
Related Publication 20130080502A1 · Mar 28, 2013