oracle home
Oracle
®
Solaris Studio 12.4: Thread Analyzer User's Guide
Exit Print View
Search Term
Search Scope:
This Document
Entire Library
» ...
Documentation Home
»
Oracle Solaris Studio 12.4 Information Library
»
Oracle
®
Solaris Studio 12.4: ...
»
Data Race Tutorial
»
Diagnosing the Cause of a Data Race
Updated: December 2014
Oracle
®
Solaris Studio 12.4: Thread Analyzer User's Guide
Document Information
Using This Documentation
Product Documentation Library
Access to Oracle Support
Feedback
Chapter 1 What is Thread Analyzer and What Does It Do?
Getting Started With Thread Analyzer
What is a Data Race?
What is a Deadlock?
Thread Analyzer Usage Model
Usage Model for Detecting Data Races
Instrument the Code for Data Race Detection
Source-level Instrumentation
Binary-level Instrumentation
Create an Experiment on the Instrumented Application
Examine the Experiment for Data Races
Usage Model for Detecting Deadlocks
Create an Experiment for Detecting Deadlocks
Examine the Experiment for Deadlocks
Usage Model for Detecting Data Races and Deadlocks
Thread Analyzer Interface
Chapter 2 Data Race Tutorial
Data Race Tutorial Source Files
Getting the Data Race Tutorial Source Files
Source Code for prime_omp.c
Source Code for prime_pthr.c
Effect of Data Races in prime_omp.c and prime_pthr.c
How to Use Thread Analyzer to Find Data Races
Instrument the Code
To Instrument Source Code
To Instrument Binary Code
Create a Data-Race-Detection Experiment
Examine the Data-Race-Detection Experiment
Using Thread Analyzer to View the Data Race Experiment
Using er_print to View the Data Race Experiment
Understanding the Experiment Results
Data Races in prime_omp.c
Data Races in prime_pthr.c
Call Stack Traces of Data Races
Diagnosing the Cause of a Data Race
Check Whether or Not the Data Race is a False Positive
Check Whether or Not the Data Race is Benign
Fix the Bug, Not the Data Race
Fixing Bugs in prime_omp.c
Fixing Bugs in prime_pthr.c
False Positives
User-Defined Synchronizations
Memory That is Recycled by Different Threads
Benign Data Races
A Program for Finding Primes
A Program that Verifies Array-Value Types
A Program Using Double-Checked Locking
Chapter 3 Deadlock Tutorial
About Deadlocks
Getting the Deadlock Tutorial Source Files
Source Code Listing for din_philo.c
The Dining Philosophers Scenario
How the Philosophers Can Deadlock
Introducing a Sleep Time for Philosopher 1
How to Use Thread Analyzer to Find Deadlocks
Compile the Source Code
Create a Deadlock-Detection Experiment
Examine the Deadlock-Detection Experiment
Using Thread Analyzer to View the Deadlock-Detection Experiment
Using er_print to View the Deadlock-Detection Experiment
Understanding the Deadlock Experiment Results
Examining Runs That Deadlock
Examining Runs That Complete Despite Deadlock Potential
Fixing the Deadlocks and Understanding False Positives
Regulating the Philosophers With Tokens
A False Positive Report
An Alternative System of Tokens
Appendix A APIs Recognized by Thread Analyzer
Thread Analyzer User APIs
Other Recognized APIs
POSIX Thread APIs
Oracle Solaris Thread APIs
Memory Allocation APIs
Memory Operations APIs
String Operations APIs
Realtime Library APIs
Atomic Operations (atomic_ops) APIs
OpenMP APIs
Appendix B Tips for Using Thread Analyzer
Compiling the Application
Instrumenting the Application for Data Race Detection
Running the Application With collect
Reporting of Data Races
Language:
English
Diagnosing the Cause of a Data Race
This section provides a basic strategy to diagnosing the cause of data races.
Previous
Next