зеркало из https://github.com/mozilla/gecko-dev.git
Bug 845372 - remove some debug stats from Signaling code r=jesup
This commit is contained in:
Родитель
db3d32120d
Коммит
89180117cc
|
@ -56,7 +56,6 @@ typedef struct cpr_msg_queue_s
|
|||
const char *name;
|
||||
pthread_t thread;
|
||||
int32_t queueId;
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t sendErrors;
|
||||
|
@ -512,9 +511,6 @@ cprPegSendMessageStats (cpr_msg_queue_t *msgq, uint16_t numAttempts)
|
|||
* Collect statistics
|
||||
*/
|
||||
msgq->totalCount++;
|
||||
if (msgq->currentCount > msgq->maxCount) {
|
||||
msgq->maxCount = msgq->currentCount;
|
||||
}
|
||||
|
||||
if (numAttempts > msgq->highAttempts) {
|
||||
msgq->highAttempts = numAttempts;
|
||||
|
@ -584,80 +580,6 @@ cprPostMessage (cpr_msg_queue_t *msgq, void *msg, void **ppUserData)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* cprGetMessageQueueStats
|
||||
*
|
||||
* Get statistics for a given message queue
|
||||
*
|
||||
* @param msgQueue - message queue on which to gather stats
|
||||
* @param stats - pointer to struct to place statistics
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
STATIC void
|
||||
cprGetMessageQueueStats (cprMsgQueue_t msgQueue, cprMsgQueueStats_t *stats)
|
||||
{
|
||||
cpr_msg_queue_t *msgq;
|
||||
|
||||
if (msgQueue && stats) {
|
||||
msgq = (cpr_msg_queue_t *) msgQueue;
|
||||
|
||||
sstrncpy(stats->name, msgq->name ? msgq->name : "undefined",
|
||||
sizeof(stats->name));
|
||||
|
||||
stats->extendedDepth = msgq->maxExtendedQDepth;
|
||||
stats->maxCount = msgq->maxCount;
|
||||
stats->currentCount = msgq->currentCount;
|
||||
stats->totalCount = msgq->totalCount;
|
||||
stats->reTries = msgq->reTries;
|
||||
stats->sendErrors = msgq->sendErrors;
|
||||
stats->highAttempts = msgq->highAttempts;
|
||||
stats->selfQErrors = msgq->selfQErrors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Report statistics for all message queues
|
||||
*
|
||||
* @param argc - not used
|
||||
* @param argv - not used
|
||||
*
|
||||
* @return zero(0)
|
||||
*
|
||||
* @note Prototype is 'canned' so return of zero is necessary
|
||||
*/
|
||||
int32_t
|
||||
cprShowMessageQueueStats (int32_t argc, const char *argv[])
|
||||
{
|
||||
cpr_msg_queue_t *msgq;
|
||||
cprMsgQueueStats_t stats;
|
||||
|
||||
debugif_printf("CPR Message Queues\n");
|
||||
|
||||
pthread_mutex_lock(&msgQueueListMutex);
|
||||
msgq = msgQueueList;
|
||||
while (msgq != NULL) {
|
||||
memset(&stats, 0, sizeof(stats));
|
||||
cprGetMessageQueueStats(msgq, &stats);
|
||||
|
||||
debugif_printf("Name: %s\n", stats.name);
|
||||
debugif_printf(" extended depth: %d\n", stats.extendedDepth);
|
||||
debugif_printf(" max: %d\n", stats.maxCount);
|
||||
debugif_printf(" active: %d\n", stats.currentCount);
|
||||
debugif_printf(" total: %d\n", stats.totalCount);
|
||||
debugif_printf(" retries: %d\n", stats.reTries);
|
||||
debugif_printf(" high attempts: %d\n", stats.highAttempts);
|
||||
debugif_printf(" send errors: %d\n", stats.sendErrors);
|
||||
debugif_printf(" self queue errors: %d\n\n", stats.selfQErrors);
|
||||
|
||||
msgq = msgq->next;
|
||||
}
|
||||
pthread_mutex_unlock(&msgQueueListMutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* cprGetDepth
|
||||
*
|
||||
|
|
|
@ -28,7 +28,6 @@ struct msgbuffer {
|
|||
/* For gathering statistics regarding message queues */
|
||||
typedef struct {
|
||||
char name[16];
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t rcvTimeouts;
|
||||
|
|
|
@ -206,7 +206,6 @@ cprPostInit (void)
|
|||
*/
|
||||
|
||||
debug_bind_keyword("cpr-info", &cprInfo);
|
||||
//bind_show_keyword("cpr-msgq", cprShowMessageQueueStats);
|
||||
|
||||
return CPR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@ typedef struct cpr_msg_queue_s
|
|||
const char *name;
|
||||
pthread_t thread;
|
||||
int32_t queueId;
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t sendErrors;
|
||||
|
@ -516,9 +515,6 @@ cprPegSendMessageStats (cpr_msg_queue_t *msgq, uint16_t numAttempts)
|
|||
* Collect statistics
|
||||
*/
|
||||
msgq->totalCount++;
|
||||
if (msgq->currentCount > msgq->maxCount) {
|
||||
msgq->maxCount = msgq->currentCount;
|
||||
}
|
||||
|
||||
if (numAttempts > msgq->highAttempts) {
|
||||
msgq->highAttempts = numAttempts;
|
||||
|
@ -588,80 +584,6 @@ cprPostMessage (cpr_msg_queue_t *msgq, void *msg, void **ppUserData)
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* cprGetMessageQueueStats
|
||||
*
|
||||
* Get statistics for a given message queue
|
||||
*
|
||||
* @param msgQueue - message queue on which to gather stats
|
||||
* @param stats - pointer to struct to place statistics
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
STATIC void
|
||||
cprGetMessageQueueStats (cprMsgQueue_t msgQueue, cprMsgQueueStats_t *stats)
|
||||
{
|
||||
cpr_msg_queue_t *msgq;
|
||||
|
||||
if (msgQueue && stats) {
|
||||
msgq = (cpr_msg_queue_t *) msgQueue;
|
||||
|
||||
sstrncpy(stats->name, msgq->name ? msgq->name : "undefined",
|
||||
sizeof(stats->name));
|
||||
|
||||
stats->extendedDepth = msgq->maxExtendedQDepth;
|
||||
stats->maxCount = msgq->maxCount;
|
||||
stats->currentCount = msgq->currentCount;
|
||||
stats->totalCount = msgq->totalCount;
|
||||
stats->reTries = msgq->reTries;
|
||||
stats->sendErrors = msgq->sendErrors;
|
||||
stats->highAttempts = msgq->highAttempts;
|
||||
stats->selfQErrors = msgq->selfQErrors;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Report statistics for all message queues
|
||||
*
|
||||
* @param argc - not used
|
||||
* @param argv - not used
|
||||
*
|
||||
* @return zero(0)
|
||||
*
|
||||
* @note Prototype is 'canned' so return of zero is necessary
|
||||
*/
|
||||
int32_t
|
||||
cprShowMessageQueueStats (int32_t argc, const char *argv[])
|
||||
{
|
||||
cpr_msg_queue_t *msgq;
|
||||
cprMsgQueueStats_t stats;
|
||||
|
||||
debugif_printf("CPR Message Queues\n");
|
||||
|
||||
pthread_mutex_lock(&msgQueueListMutex);
|
||||
msgq = msgQueueList;
|
||||
while (msgq != NULL) {
|
||||
memset(&stats, 0, sizeof(stats));
|
||||
cprGetMessageQueueStats(msgq, &stats);
|
||||
|
||||
debugif_printf("Name: %s\n", stats.name);
|
||||
debugif_printf(" extended depth: %d\n", stats.extendedDepth);
|
||||
debugif_printf(" max: %d\n", stats.maxCount);
|
||||
debugif_printf(" active: %d\n", stats.currentCount);
|
||||
debugif_printf(" total: %d\n", stats.totalCount);
|
||||
debugif_printf(" retries: %d\n", stats.reTries);
|
||||
debugif_printf(" high attempts: %d\n", stats.highAttempts);
|
||||
debugif_printf(" send errors: %d\n", stats.sendErrors);
|
||||
debugif_printf(" self queue errors: %d\n\n", stats.selfQErrors);
|
||||
|
||||
msgq = msgq->next;
|
||||
}
|
||||
pthread_mutex_unlock(&msgQueueListMutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* cprGetDepth
|
||||
*
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
/* For gathering statistics regarding message queues */
|
||||
typedef struct {
|
||||
char name[16];
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t rcvTimeouts;
|
||||
|
@ -37,16 +36,6 @@ typedef struct {
|
|||
*/
|
||||
extern pthread_mutex_t msgQueueListMutex;
|
||||
|
||||
/**
|
||||
* cprShowMessageQueueStats
|
||||
*
|
||||
* Display statistics for all message queues
|
||||
*
|
||||
* Comments: Function only applicable to CNU
|
||||
*/
|
||||
int32_t
|
||||
cprShowMessageQueueStats(int32_t argc, const char *argv[]);
|
||||
|
||||
/**
|
||||
* cprGetDepth
|
||||
*
|
||||
|
|
|
@ -87,7 +87,6 @@ typedef struct cpr_msg_queue_s
|
|||
const char *name;
|
||||
pthread_t thread;
|
||||
int32_t queueId;
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t sendErrors;
|
||||
|
@ -731,9 +730,6 @@ cprPegSendMessageStats (cpr_msg_queue_t *msgq, uint16_t numAttempts)
|
|||
* Collect statistics
|
||||
*/
|
||||
msgq->totalCount++;
|
||||
if (msgq->currentCount > msgq->maxCount) {
|
||||
msgq->maxCount = msgq->currentCount;
|
||||
}
|
||||
|
||||
if (numAttempts > msgq->highAttempts) {
|
||||
msgq->highAttempts = numAttempts;
|
||||
|
|
|
@ -28,7 +28,6 @@ struct msgbuffer {
|
|||
/* For gathering statistics regarding message queues */
|
||||
typedef struct {
|
||||
char name[16];
|
||||
uint16_t maxCount;
|
||||
uint16_t currentCount;
|
||||
uint32_t totalCount;
|
||||
uint32_t rcvTimeouts;
|
||||
|
|
|
@ -226,13 +226,6 @@ void OnTerminateCall()
|
|||
//network\source\dns_utils.c
|
||||
//====================================================================================================
|
||||
|
||||
int32_t
|
||||
cprShowMessageQueueStats (int32_t argc, const char *argv[])
|
||||
{
|
||||
debugif_printf("CPR Message Queues\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
cpr_debug_memory_cli (int32_t argc, const char *argv[])
|
||||
|
|
Загрузка…
Ссылка в новой задаче