Mutex profiling based on waiting analytics
First Claim
1. A non-transitory computer-readable medium comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising:
- identifying a first thread executing an activity;
determining a set of one or more mutual-exclusion locks held by the first thread while the activity is being executed;
determining a total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity;
stochastically interrupting the first thread executing the activity to determine a set of one or more values representing costs associated with executing the activity;
generating a profile for the activity based at least in part on the set of one or more values representing costs associated with executing the activity;
determining a total cost associated with execution of the activity as a function of at least the set of one or more values representing at least one cost associated with the first thread executing the activity and the total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; and
implementing, based at least in part on the total cost associated with execution of the activity, a performance optimization by modifying code for executing the activity to reduce mutex wait times caused by execution of the activity.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are described herein for profiling mutual exclusion locks. In one or more embodiments, a performance profiler identifies a first thread executing an activity within a parallel processing environment. The performance profiler identifies a set of one or more mutual-exclusion locks held by the first thread while the activity is being executed and determines the total number of threads waiting for at least one of the set of mutual-exclusion locks held by the first thread. The performance profiler then determines a total cost associated with execution of the activity based at least on the total number of threads waiting for at least one of the set of mutual-exclusion locks held by the first thread during execution of the activity. In one or more embodiments, the total cost is obtained by multiplying a raw cost with the number of threads waiting.
-
Citations
19 Claims
-
1. A non-transitory computer-readable medium comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising:
-
identifying a first thread executing an activity; determining a set of one or more mutual-exclusion locks held by the first thread while the activity is being executed; determining a total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; stochastically interrupting the first thread executing the activity to determine a set of one or more values representing costs associated with executing the activity; generating a profile for the activity based at least in part on the set of one or more values representing costs associated with executing the activity; determining a total cost associated with execution of the activity as a function of at least the set of one or more values representing at least one cost associated with the first thread executing the activity and the total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; and implementing, based at least in part on the total cost associated with execution of the activity, a performance optimization by modifying code for executing the activity to reduce mutex wait times caused by execution of the activity. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A method comprising:
-
identifying a first thread executing an activity; determining a set of one or more mutual-exclusion locks held by the first thread while the activity is being executed; determining a total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; stochastically interrupting the first thread executing the activity to determine a set of one or more values representing costs associated with executing the activity; generating a profile for the activity based at least in part on the set of one or more values representing costs associated with executing the activity; determining a total cost associated with execution of the activity as a function of at least the set of one or more values representing at least one cost associated with the first thread executing the activity and the total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; and implementing, based at least in part on the total cost associated with execution of the activity, a performance optimization by modifying code for executing the activity to reduce mutex wait times caused by execution of the activity. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A system comprising:
-
one or more hardware processors; one or more non-transitory computer-readable media comprising instructions which, when executed by the one or more hardware processors, causes; identifying a first thread executing an activity; determining a set of one or more mutual-exclusion locks held by the first thread while the activity is being executed; determining a total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; stochastically interrupting the first thread executing the activity to determine a set of one or more values representing costs associated with executing the activity; generating a profile for the activity based at least in part on the set of one or more values representing costs associated with executing the activity; determining a total cost associated with execution of the activity as a function of at least the set of one or more values representing at least one cost associated with the first thread executing the activity and the total number of threads waiting for at least one of the set of one or more mutual-exclusion locks held by the first thread during execution of the activity; and implementing, based at least in part on the total cost associated with execution of the activity, a performance optimization by modifying code for executing the activity to reduce mutex wait times caused by execution of the activity.
-
Specification