Dep/ACE: Upgrade ACE -library to 5.8.3
--HG-- branch : trunk
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/**
|
||||
* @file Metrics_Cache_T.h
|
||||
*
|
||||
* $Id: Metrics_Cache_T.h 80826 2008-03-04 14:51:23Z wotte $
|
||||
* $Id: Metrics_Cache_T.h 92090 2010-09-29 14:10:45Z johnnyw $
|
||||
*
|
||||
* @author Chris Gill <[email protected]>
|
||||
*/
|
||||
@@ -64,43 +64,43 @@ public:
|
||||
WORK_RESUME = 3
|
||||
};
|
||||
|
||||
// Default constructor: plugs in the above event descriptions.
|
||||
/// Default constructor: plugs in the above event descriptions.
|
||||
ACE_Metrics_Timeprobe (u_int id = 0,
|
||||
const char *name = 0,
|
||||
u_long size = METRICS_DEFAULT_TIMEPROBE_TABLE_SIZE);
|
||||
|
||||
// Constructor with allocator: plugs in the above event descriptions.
|
||||
/// Constructor with allocator: plugs in the above event descriptions.
|
||||
ACE_Metrics_Timeprobe (ALLOCATOR *allocatorPtr,
|
||||
u_int id = 0,
|
||||
const char *name = 0,
|
||||
u_long size = METRICS_DEFAULT_TIMEPROBE_TABLE_SIZE);
|
||||
|
||||
// Destructor.
|
||||
/// Destructor.
|
||||
virtual ~ACE_Metrics_Timeprobe ();
|
||||
|
||||
// Returns true if a timeprobe event matches the passed id.
|
||||
/// Returns true if a timeprobe event matches the passed id.
|
||||
int is_event (const ACE_METRICS_TIMEPROBE_DATA_TYPE &t,
|
||||
ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR>::event_id id);
|
||||
|
||||
// Accessor and mutator for probe name.
|
||||
/// Accessor and mutator for probe name.
|
||||
const char * probe_name (void);
|
||||
void probe_name (char * name);
|
||||
|
||||
// Accessor for probe id.
|
||||
/// Accessor for probe id.
|
||||
u_int probe_id (void);
|
||||
|
||||
// Mutator for probe id.
|
||||
/// Mutator for probe id.
|
||||
void probe_id (u_int id);
|
||||
|
||||
// Flush the ACE metrics timeprobe into shared memory.
|
||||
/// Flush the ACE metrics timeprobe into shared memory.
|
||||
void flush_ACE_Metrics_Timeprobe ();
|
||||
|
||||
protected:
|
||||
|
||||
// Identifier for the timeprobe.
|
||||
/// Identifier for the timeprobe.
|
||||
u_int id_;
|
||||
|
||||
// Name of the timeprobe.
|
||||
/// Name of the timeprobe.
|
||||
char* name_;
|
||||
|
||||
private:
|
||||
@@ -125,98 +125,98 @@ public:
|
||||
|
||||
typedef ACE_Metrics_Cache <ACE_LOCK, ALLOCATOR> ACE_METRICS_CACHE_TYPE;
|
||||
|
||||
// Default constructor.
|
||||
/// Default constructor.
|
||||
ACE_Metrics_Cache (u_long table_size
|
||||
= METRICS_DEFAULT_TIMEPROBE_TABLE_SIZE,
|
||||
u_long number_of_probes
|
||||
= METRICS_DEFAULT_TIMEPROBE_COUNT,
|
||||
ALLOCATOR * allocatorPtr = (ALLOCATOR*)ALLOCATOR::instance());
|
||||
|
||||
// Destructor.
|
||||
/// Destructor.
|
||||
~ACE_Metrics_Cache ();
|
||||
|
||||
// = Dispatching metrics.
|
||||
|
||||
// Report start, stop, suspend, and resume times of a dispatch
|
||||
// enqueue: stores data metrics on the supplier side.
|
||||
/// Report start, stop, suspend, and resume times of a dispatch
|
||||
/// enqueue: stores data metrics on the supplier side.
|
||||
void report_enqueue_start (u_long i);
|
||||
void report_enqueue_stop (u_long i);
|
||||
void report_enqueue_suspend (u_long i);
|
||||
void report_enqueue_resume (u_long i);
|
||||
|
||||
// Report start, stop, suspend, and resume times of a dispatch
|
||||
// dequeue: stores data metrics on the supplier side..
|
||||
/// Report start, stop, suspend, and resume times of a dispatch
|
||||
/// dequeue: stores data metrics on the supplier side..
|
||||
void report_dequeue_start (u_long i);
|
||||
void report_dequeue_stop (u_long i);
|
||||
void report_dequeue_suspend (u_long i);
|
||||
void report_dequeue_resume (u_long i);
|
||||
|
||||
// Reset the metrics data on the consumer side.
|
||||
/// Reset the metrics data on the consumer side.
|
||||
void reset_base_statistics ();
|
||||
|
||||
// Flips the supplier and consumer sides.
|
||||
/// Flips the supplier and consumer sides.
|
||||
void flip_supplier_and_consumer ();
|
||||
|
||||
// Flush the ACE metrics cache into shared memory.
|
||||
/// Flush the ACE metrics cache into shared memory.
|
||||
void flush_ACE_Metrics_Cache ();
|
||||
|
||||
// Set the enable state for metrics collection.
|
||||
/// Set the enable state for metrics collection.
|
||||
void metrics_enabled(int enabled);
|
||||
|
||||
// Return the enable state for metrics collection.
|
||||
/// Return the enable state for metrics collection.
|
||||
int metrics_enabled(void) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Obtain an allocator pointer correctly thunked for the current
|
||||
// address space. If there is no allocator stored in the instance,
|
||||
// the singleton allocator in the current process is used.
|
||||
/// Obtain an allocator pointer correctly thunked for the current
|
||||
/// address space. If there is no allocator stored in the instance,
|
||||
/// the singleton allocator in the current process is used.
|
||||
ALLOCATOR * allocator (void);
|
||||
|
||||
// = Implementation members.
|
||||
|
||||
// Number of probes in each supplier/consumer set.
|
||||
/// Number of probes in each supplier/consumer set.
|
||||
u_long probe_set_size_;
|
||||
|
||||
// Probe data counts for each supplier/consumer set.
|
||||
/// Probe data counts for each supplier/consumer set.
|
||||
u_long * enqueue_count_ [2];
|
||||
u_long * dequeue_count_ [2];
|
||||
|
||||
// Probes for each supplier/consumer set.
|
||||
/// Probes for each supplier/consumer set.
|
||||
ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> ** enqueue_probes_ [2];
|
||||
ACE_Metrics_Timeprobe<ACE_LOCK, ALLOCATOR> ** dequeue_probes_ [2];
|
||||
|
||||
// Names for the probes.
|
||||
/// Names for the probes.
|
||||
char ** enqueue_names_;
|
||||
char ** dequeue_names_;
|
||||
|
||||
// Index from which probe events are being consumed.
|
||||
// for WSOA, it's the data being sent to the logger
|
||||
/// Index from which probe events are being consumed.
|
||||
/// for WSOA, it's the data being sent to the logger
|
||||
int consumer_index_;
|
||||
|
||||
// Index to which probe events are being supplied.
|
||||
// for WSOA, it's the data being recorded from the probes
|
||||
/// Index to which probe events are being supplied.
|
||||
/// for WSOA, it's the data being recorded from the probes
|
||||
int supplier_index_;
|
||||
|
||||
// Size of the timestamp table in each probe.
|
||||
/// Size of the timestamp table in each probe.
|
||||
u_long table_size_;
|
||||
|
||||
// Interval start and stop timestamps.
|
||||
/// Interval start and stop timestamps.
|
||||
ACE_Time_Value interval_start_;
|
||||
|
||||
// Interval start and stop timestamps.
|
||||
/// Interval start and stop timestamps.
|
||||
ACE_Time_Value interval_end_;
|
||||
|
||||
// Flag to indicate whether or not start time of interval has been
|
||||
// initialized since the last reset.
|
||||
/// Flag to indicate whether or not start time of interval has been
|
||||
/// initialized since the last reset.
|
||||
int interval_initialized_;
|
||||
|
||||
// Indicator of whether metrics is enabled.
|
||||
/// Indicator of whether metrics is enabled.
|
||||
int metrics_enabled_;
|
||||
|
||||
private:
|
||||
|
||||
// Allocation strategy object.
|
||||
/// Allocation strategy object.
|
||||
ALLOCATOR* allocator_;
|
||||
|
||||
// Declare but do not define.
|
||||
|
||||
Reference in New Issue
Block a user