JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris Dynamic Tracing Guide
search filter icon
search icon

Document Information

Preface

1.  Introduction

2.  Types, Operators, and Expressions

3.  Variables

4.  D Program Structure

5.  Pointers and Arrays

6.  Strings

7.  Structs and Unions

8.  Type and Constant Definitions

9.  Aggregations

10.  Actions and Subroutines

11.  Buffers and Buffering

12.  Output Formatting

13.  Speculative Tracing

14.  dtrace(1M) Utility

15.  Scripting

16.  Options and Tunables

17.  dtrace Provider

18.  lockstat Provider

19.  profile Provider

20.  fbt Provider

21.  syscall Provider

22.  sdt Provider

23.  sysinfo Provider

24.  vminfo Provider

25.  proc Provider

26.  sched Provider

27.  io Provider

28.  mib Provider

29.  fpuinfo Provider

30.  pid Provider

31.  plockstat Provider

Overview

Mutex Probes

Reader/Writer Lock Probes

Stability

32.  fasttrap Provider

33.  User Process Tracing

34.  Statically Defined Tracing for User Applications

35.  Security

36.  Anonymous Tracing

37.  Postmortem Tracing

38.  Performance Considerations

39.  Stability

40.  Translators

41.  Versioning

Glossary

Index

Mutex Probes

Mutexes enforce mutual exclusion to critical sections. When a thread attempts to acquire a mutex held by another thread using mutex_lock(3C) or pthread_mutex_lock(3C), it will determine if the owning thread is running on a different CPU. If it is, the acquiring thread will spin for a short while waiting for the mutex to become available. If the owner is not executing on another CPU, the acquiring thread will block.

The four plockstat probes pertaining to mutexes are listed in Table 31-1. For each probe, arg0 contains a pointer to the mutex_t or pthread_mutex_t structure (these are identical types) that represents the mutex.

Table 31-1 Mutex Probes

mutex-acquire
Hold event probe that fires immediately after a mutex is acquired. arg1 contains a boolean value that indicates whether the acquisition was recursive on a recursive mutex. arg2 indicates the number of iterations that the acquiring thread spent spinning on this mutex. arg2 will be non-zero only if the mutex-spin probe fired on this mutex acquisition.
mutex-block
Contention event probe that fires before a thread blocks on a held mutex. Both mutex-block and mutex-spin might fire for a single lock acquisition.
mutex-spin
Contention event probe that fires before a thread begins spinning on a held mutex. Both mutex-block and mutex-spin might fire for a single lock acquisition.
mutex-release
Hold event probe that fires immediately after an mutex is released. arg1 contains a boolean value that indicates whether the event corresponds to a recursive release on a recursive mutex.
mutex-error
Error event probe that fires when an error is encountered on a mutex operation. arg1 is the errno value for the error encountered.