IP Library Granted Patent US 9,396,089
Granted Patent B2
US 9,396,089 · App. 14/502,853 · Granted Jul 19, 2016

Activity tracing diagnostic systems and methods

Inventors: Eric Russell Clements (San Martin, CA); Daniel Andreas Steffen (San Francisco, CA); Jainam Ashokkumar Shah (San Jose, CA); Vishal Patel (Sunnyvale, CA); Damien P. Sorresso (San Francisco, CA)
Assignee: Apple Inc.
G06F11/3476G06F11/0778G06F11/34
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,396,089
App. No.
14/502,853
Granted
Jul 19, 2016
Kind
B2
Abstract

Systems and methods are disclosed for logging encoded diagnostic information from a sequence of processing operations, the processing operations generated by an activity in a computing environment. Diagnostic information is tracked by activity, across process boundaries where the processes can be in computationally isolated, or “sandboxed”. Within each process, diagnostic information for an activity is stored in an activity-specific buffer registered with a kernel in the computing environment. For each activity in the computing system, the kernel keeps a list of all processes that have performed, or are performing, a processing task of the activity. The kernel also keeps a reference to the activity-specific log buffers for the activity for each process associated with the activity. If a processing operation for an activity fails, all activity-specific logs from all processes that are associated with the activity can be collected. A report can be generated from the collected logs for the activity.

Claims (58)

1. A non-transitory computer-readable medium comprising processor-executable instructions that, when executed, perform a method comprising:

receiving, by a first process in a computing environment, an initial request to perform a processing activity;

requesting, from the computing environment, an activity ID, wherein the activity ID is an identifier for the processing activity that is unique within one of the computing environment or the first process;

requesting that the computing environment register the activity ID and a reference to a log buffer of the first process for the processing activity;

logging, in the log buffer of the first process, one or more processing operations that are performed by the first process in response to receiving the initial request to perform the processing activity.

2. The computer-readable medium of claim 1 , further comprising registering, with the activity ID and reference to a log buffer of the first process, a reference to the first process.

3. The computer-readable medium of claim 1 , further comprising registering, with the activity ID and reference to a log buffer of the first process, an instance value of the activity.

4. The computer-readable medium of claim 1 , wherein logging comprises, for each processing operation performed, storing a timestamp and an identifier of the processing operation performed in the log buffer of the first process, storing an instance value of the activity in the log buffer of the first process, and wherein the logging defines a sequence of processing operations associated with the processing activity.

5. The computer-readable medium of claim 4 , further comprising:

receiving a subsequent request to perform the processing activity, by the first process in the computing environment;

increasing the instance value of the activity; and

logging, in the log buffer of the first process, one or more processing operations that are performed by the first process in response to receiving the subsequent request to perform the processing activity.

6. The computer-readable medium of claim 4 , further comprising:

communicating one or more attributes of the first process to a second process, wherein the one or more attributes include the activity ID and the instance value for the activity ID; and

calling the second process to perform a processing operation on behalf of the first process for the activity ID and the instance value;

logging, by the first process, the calling of the second process.

7. The computer-readable medium of claim 6 , wherein the first and second processes are sandboxed with respect to each other such that the first process can access volatile memory allocated to it but cannot access volatile memory allocated to the second process and vice versa.

8. The computer-readable medium of claim 4 , further comprising:

determining that the log buffer of the first process is within a threshold value of being full;

freeing log buffer space used by one or more successfully completed instances of the activity.

9. The computer-readable medium of claim 8 , wherein freeing log buffer space comprises receiving a determination that the log buffer contains diagnostic information of a sequence of processing operations that have successfully completed.

10. A non-transitory computer-readable medium comprising processor-executable instructions that, when executed, perform a method comprising:

receiving, from a first process by a second process in a computing environment, a communication including one or more attributes of the first process, wherein the one or more attributes include an activity ID of a processing activity and an instance value for the processing activity;

requesting that the computing environment register the second process, the activity ID, the instance value, and a reference to a log buffer of the second process, in response to receiving the communication;

performing one or more processing operations related to the processing activity, by the second process, in response to receiving the communication;

logging, in the log buffer of the second process, diagnostic information associated with the one or more processing operations that are performed by the second process on behalf of the first process, each processing operation associated with the activity ID and instance value.

11. The computer-readable medium of claim 10 , wherein the first and second processes are sandboxed with respect to each other.

12. The computer-readable medium of claim 10 , wherein logging comprises, for each processing operation performed, storing a timestamp, an identifier of the processing operation performed, and the instance value of the processing activity in the log buffer associated with the second process, and wherein the communication is an inter-process communication.

13. The computer-readable medium of claim 12 , further comprising:

determining that the log buffer for the second process is within a threshold value of being full;

freeing log buffer space used by one or more successfully completed instances of the processing activity.

14. The computer-readable medium of claim 13 , wherein freeing log buffer space comprises receiving, from the computing environment, an indication of a highest instance value for the activity ID for which all processing operations in the sequence of operations have successfully completed; and

freeing log buffer space for log buffer entries having an instance value less than or equal to the highest instance value for the processing activity for which all processing operations in the sequence of processing operations have successfully completed for both the first and second processes.

15. The computer-readable medium of claim 13 , wherein freeing log buffer space comprises permitting the freed log buffer space to be overwritten with log buffer entries having a later timestamp than the log buffer entries in the freed log buffer space.

16. A non-transitory computer-readable medium comprising processor-executable instructions that, when executed, perform a method comprising:

determining that a processing operation in a process has failed, the failed processing operation having an activity ID and an instance value;

extracting log buffer entries from a log buffer of the process, the log buffer associated with the activity ID and containing log buffer entries for the activity ID; and

transmitting the extracted log buffer entries having the activity ID to a diagnostic service.

17. The computer-readable medium of claim 16 , further comprising extracting activity log buffer entries from an activity log buffer of each process that performed a processing operation having the activity ID of the failed processing operation.

18. The computer-readable medium of claim 17 , wherein the processing operation is the failed processing operation.

19. The computer-readable medium of claim 16 , further comprising:

extracting, from an activity log buffer of the process, activity log entries of activities received by the process in which the processing operation failed, wherein activity log buffer entries comprise a timestamp and an activity ID that identifies a processing activity received by the process.

20. The computer-readable medium of claim 16 , wherein extracting log buffer entries comprises extracting only log buffer entries having the activity ID and a specified instance value of the processing activity.

21. The computer-readable medium of claim 16 , further comprising:

extracting log buffer entries from a log buffer of each process that performed a processing operation having the activity ID, wherein each log buffer is associated with the activity ID and contains log entries for the activity ID.

22. A computer-implemented method comprising:

receiving, from a first process by a second process in a computing environment, a communication including one or more attributes of the first process, wherein the one or more attributes include an activity ID of a processing activity and an instance value for the processing activity;

requesting that the computing environment register the second process, the activity ID, the instance value, and a reference to a log buffer of the second process, in response to receiving the communication;

performing one or more processing operations, by the second process, in response to receiving the communication;

logging, in the log buffer of the second process, diagnostic information associated with the one or more processing operations that are performed by the second process on behalf of the first process, each processing operation associated with the activity ID and instance value.

23. The method of claim 22 , wherein the first and second processes are sandboxed with respect to each other.

24. The method of claim 22 , wherein logging comprises, for each processing operation performed, storing a timestamp, an identifier of the processing operation performed, and the instance value of the processing activity in the log buffer associated with the second process, and wherein the communication is an inter-process communication.

25. The method of claim 22 , further comprising:

determining that the log buffer for the second process is within a threshold value of being full;

freeing log buffer space used by one or more successfully completed instances of the processing activity.

26. The method of claim 25 , wherein freeing log buffer space comprises receiving, from the computing environment, an indication of a highest instance value for the activity ID for which all processing operations in the sequence of operations have successfully completed; and

freeing log buffer space for log buffer entries having an instance value less than or equal to the highest instance value for the processing activity for which all processing operations in the sequence of processing operations have successfully completed for both the first and second processes.

27. The method of claim 25 , wherein freeing log buffer space comprises permitting the freed log buffer space to be overwritten with log buffer entries having a later timestamp than the log buffer entries in the freed log buffer space.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE NAMEADDRESSCITYSTATEPOSTAL CODE PREVIOUSLY RECORDED ON REEL 033909 FRAME 0554. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT.NAME: APPLE INC.ADDRESS: ONE APPLE PARK WAYCITY: CUPERTINOSTATE: CAPOSTAL CODE: 95014. Recorded Aug 23, 2018
From: CLEMENTS, ERIC RUSSELL; STEFFEN, DANIEL ANDREAS; SHAH, JAINAM ASHOKKUMAR; PATEL, VISHAL; SORRESSO, DAMIEN P
To: APPLE INC.
Reel/Frame 046921/0890 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 8, 2014
From: CLEMENTS, ERIC RUSSELL; STEFFEN, DANIEL ANDREAS; SHAH, JAINAM ASHOKKUMAR; PATEL, VISHAL; SORRESSO, DAMIEN P
To: APPLE INC
Reel/Frame 033909/0554 →
Continuity (2)
Provisional Application 62005935 · May 30, 2014
Related Publication 20150347265A1 · Dec 3, 2015