Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Lock_Timing_Recorder Class Reference

List of all members.

Public Member Functions

 Lock_Timing_Recorder ()
 ~Lock_Timing_Recorder ()
void acquire_read_start (which_lock_t lock)
void acquire_read_done (which_lock_t lock, bool failed=false)
void acquire_write_start (which_lock_t lock)
void acquire_write_done (which_lock_t lock, bool failed=false)
void release_start (which_lock_t lock)
void release_done (which_lock_t lock)
void locked_reason (which_lock_t lock, const char *reason)

Static Public Member Functions

static void * new_file_check (void *arg)

Private Member Functions

void record_delta (struct timeval *last_time)
void start_new_file (struct timeval &current_time)
void lock_data (which_lock_t lock, struct timeval *&last_time_p, bool *&locked_p, char &lock_marker)
void write_delta_record (char record_marker, char lock_marker, struct timeval *last_time_p)

Private Attributes

Lock_Timing_Recorderlist_next
Basics::mutex mu
unsigned long my_thread_index
FILE * timing_record_stream
unsigned long file_end_time
char write_buffer [TIMING_RECORDER_BUF_SIZE]
unsigned int current_byte_count
bool stable_locked
bool volatileRoot_locked
bool userGroup_locked
timeval stable_time volatileRoot_time userGroup_time

Static Private Attributes

static Basics::mutex list_mu
static Lock_Timing_Recorderlist_head = 0

Constructor & Destructor Documentation

Lock_Timing_Recorder::Lock_Timing_Recorder  ) 
 

Definition at line 371 of file lock_timing.C.

References list_next, Basics::mutex::lock(), my_thread_index, Basics::mutex::unlock(), and userGroup_time.

Lock_Timing_Recorder::~Lock_Timing_Recorder  ) 
 

Definition at line 468 of file lock_timing.C.

References list_next, Basics::mutex::lock(), timing_record_stream, and Basics::mutex::unlock().


Member Function Documentation

void Lock_Timing_Recorder::acquire_read_done which_lock_t  lock,
bool  failed = false
 

Definition at line 676 of file lock_timing.C.

References current_byte_count, Basics::mutex::lock(), lock_data(), mu, Basics::mutex::unlock(), and write_delta_record().

Referenced by rwlock_acquire_read_done().

void Lock_Timing_Recorder::acquire_read_start which_lock_t  lock  ) 
 

Definition at line 611 of file lock_timing.C.

References current_byte_count, file_end_time, Basics::mutex::lock(), lock_data(), mu, start_new_file(), timing_record_stream, TIMING_RECORDER_BUF_SIZE, Basics::mutex::unlock(), and write_buffer.

Referenced by rwlock_acquire_read_start().

void Lock_Timing_Recorder::acquire_write_done which_lock_t  lock,
bool  failed = false
 

Definition at line 782 of file lock_timing.C.

References current_byte_count, Basics::mutex::lock(), lock_data(), mu, Basics::mutex::unlock(), and write_delta_record().

Referenced by rwlock_acquire_write_done().

void Lock_Timing_Recorder::acquire_write_start which_lock_t  lock  ) 
 

Definition at line 717 of file lock_timing.C.

References current_byte_count, file_end_time, Basics::mutex::lock(), lock_data(), mu, start_new_file(), timing_record_stream, TIMING_RECORDER_BUF_SIZE, Basics::mutex::unlock(), and write_buffer.

Referenced by rwlock_acquire_write_start().

void Lock_Timing_Recorder::lock_data which_lock_t  lock,
struct timeval *&  last_time_p,
bool *&  locked_p,
char &  lock_marker
[private]
 

Definition at line 494 of file lock_timing.C.

References stable, stable_locked, userGroup, userGroup_locked, userGroup_time, volatileRoot, and volatileRoot_locked.

Referenced by acquire_read_done(), acquire_read_start(), acquire_write_done(), acquire_write_start(), locked_reason(), release_done(), and release_start().

void Lock_Timing_Recorder::locked_reason which_lock_t  lock,
const char *  reason
 

Definition at line 914 of file lock_timing.C.

References current_byte_count, Basics::mutex::lock(), lock_data(), mu, TIMING_RECORDER_BUF_SIZE, Basics::mutex::unlock(), and write_buffer.

Referenced by rwlock_locked_reason().

void * Lock_Timing_Recorder::new_file_check void *  arg  )  [static]
 

Definition at line 962 of file lock_timing.C.

References file_end_time, list_next, Basics::mutex::lock(), mu, stable_locked, start_new_file(), timing_record_stream, Basics::mutex::unlock(), userGroup_locked, and volatileRoot_locked.

void Lock_Timing_Recorder::record_delta struct timeval *  last_time  )  [private]
 

Definition at line 562 of file lock_timing.C.

References current_byte_count, and write_buffer.

Referenced by write_delta_record().

void Lock_Timing_Recorder::release_done which_lock_t  lock  ) 
 

Definition at line 858 of file lock_timing.C.

References current_byte_count, Basics::mutex::lock(), lock_data(), mu, stable_locked, timing_record_stream, Basics::mutex::unlock(), userGroup_locked, volatileRoot_locked, write_buffer, and write_delta_record().

Referenced by rwlock_release_done().

void Lock_Timing_Recorder::release_start which_lock_t  lock  ) 
 

Definition at line 823 of file lock_timing.C.

References current_byte_count, Basics::mutex::lock(), lock_data(), mu, Basics::mutex::unlock(), and write_delta_record().

Referenced by rwlock_release_start().

void Lock_Timing_Recorder::start_new_file struct timeval &  current_time  )  [private]
 

Definition at line 408 of file lock_timing.C.

References FS::Exists(), file_end_time, Basics::mutex::lock(), my_thread_index, Basics::OBufStream::str(), timing_record_stream, and Basics::mutex::unlock().

Referenced by acquire_read_start(), acquire_write_start(), and new_file_check().

void Lock_Timing_Recorder::write_delta_record char  record_marker,
char  lock_marker,
struct timeval *  last_time_p
[private]
 

Definition at line 593 of file lock_timing.C.

References current_byte_count, record_delta(), TIMING_RECORDER_BUF_SIZE, and write_buffer.

Referenced by acquire_read_done(), acquire_write_done(), release_done(), and release_start().


Member Data Documentation

unsigned int Lock_Timing_Recorder::current_byte_count [private]
 

Definition at line 80 of file lock_timing.C.

Referenced by acquire_read_done(), acquire_read_start(), acquire_write_done(), acquire_write_start(), locked_reason(), record_delta(), release_done(), release_start(), and write_delta_record().

unsigned long Lock_Timing_Recorder::file_end_time [private]
 

Definition at line 74 of file lock_timing.C.

Referenced by acquire_read_start(), acquire_write_start(), new_file_check(), and start_new_file().

Lock_Timing_Recorder * Lock_Timing_Recorder::list_head = 0 [static, private]
 

Definition at line 132 of file lock_timing.C.

Basics::mutex Lock_Timing_Recorder::list_mu [static, private]
 

Definition at line 131 of file lock_timing.C.

Lock_Timing_Recorder* Lock_Timing_Recorder::list_next [private]
 

Definition at line 61 of file lock_timing.C.

Referenced by Lock_Timing_Recorder(), new_file_check(), and ~Lock_Timing_Recorder().

Basics::mutex Lock_Timing_Recorder::mu [private]
 

Definition at line 65 of file lock_timing.C.

Referenced by acquire_read_done(), acquire_read_start(), acquire_write_done(), acquire_write_start(), locked_reason(), new_file_check(), release_done(), and release_start().

unsigned long Lock_Timing_Recorder::my_thread_index [private]
 

Definition at line 68 of file lock_timing.C.

Referenced by Lock_Timing_Recorder(), and start_new_file().

bool Lock_Timing_Recorder::stable_locked [private]
 

Definition at line 83 of file lock_timing.C.

Referenced by lock_data(), new_file_check(), and release_done().

FILE* Lock_Timing_Recorder::timing_record_stream [private]
 

Definition at line 71 of file lock_timing.C.

Referenced by acquire_read_start(), acquire_write_start(), new_file_check(), release_done(), start_new_file(), and ~Lock_Timing_Recorder().

bool Lock_Timing_Recorder::userGroup_locked [private]
 

Definition at line 83 of file lock_timing.C.

Referenced by lock_data(), new_file_check(), and release_done().

struct timeval stable_time volatileRoot_time Lock_Timing_Recorder::userGroup_time [private]
 

Definition at line 89 of file lock_timing.C.

Referenced by lock_data(), and Lock_Timing_Recorder().

bool Lock_Timing_Recorder::volatileRoot_locked [private]
 

Definition at line 83 of file lock_timing.C.

Referenced by lock_data(), new_file_check(), and release_done().

char Lock_Timing_Recorder::write_buffer[TIMING_RECORDER_BUF_SIZE] [private]
 

Definition at line 77 of file lock_timing.C.

Referenced by acquire_read_start(), acquire_write_start(), locked_reason(), record_delta(), release_done(), and write_delta_record().


The documentation for this class was generated from the following file:
Generated on Mon May 8 00:49:11 2006 for Vesta by  doxygen 1.4.2