Changeset 8892

Show
Ignore:
Timestamp:
06/17/11 15:26:27 (2 years ago)
Author:
walt
Message:

fixed stupid break

Location:
branches/Orange-Branch/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/src/apps/kernel/linux/pvfs2-client-core.c

    r8859 r8892  
    37403740 
    37413741    assert(opts); 
    3742     opts->perf_time_interval_secs = PERF_DEFAULT_TIME_INTERVAL_SECS; 
     3742    opts->perf_time_interval_secs = PERF_DEFAULT_UPDATE_INTERVAL / 1000; 
    37433743    opts->perf_history_size = PERF_DEFAULT_HISTORY_SIZE; 
    37443744 
  • branches/Orange-Branch/src/common/misc/pint-perf-counter.c

    r8891 r8892  
    4242 * enumeration in include/pvfs2-mgmt.h 
    4343 */ 
    44 static struct PINT_perf_key key_array[] = 
     44struct PINT_perf_key server_keys[] = 
    4545{ 
    4646    {"bytes read", PINT_PERF_READ, PINT_PERF_PRESERVE}, 
     
    8282 * \returns pointer to perf counter on success, NULL on failure 
    8383 */ 
    84 struct PINT_perf_counter *PINT_perf_initialize( int default_history_size, 
    85                                                 int default_interval) 
     84struct PINT_perf_counter *PINT_perf_initialize(struct PINT_perf_key *key_array) 
    8685{ 
    8786    struct PINT_perf_counter *pc = NULL; 
     
    123122 
    124123    /* running will be used to decide if we should start an update process */ 
    125     pc->history_size = default_history_size; 
     124    pc->history_size = PERF_DEFAULT_HISTORY_SIZE; 
    126125    pc->running = (pc->history_size > 1); 
    127     pc->interval = default_interval; 
     126    pc->interval = PERF_DEFAULT_UPDATE_INTERVAL; 
    128127 
    129128    /* create a simple linked list of samples, each with a value array */ 
     
    366365            } 
    367366            /* if history_size is now 1 stop the rollover SM */ 
     367            pc->running = (pc->history_size > 1); 
    368368        } 
    369369        else 
     
    397397            } 
    398398            /* if not running start rollover SM */ 
    399         } 
     399            pc->running = (pc->history_size > 1); 
     400        } 
     401        break; 
     402    case PINT_PERF_UPDATE_INTERVAL: 
     403        if (arg > 0) 
     404            pc->interval = arg; 
    400405        break; 
    401406    default: 
     
    430435    case PINT_PERF_KEY_COUNT: 
    431436        *arg = pc->key_count; 
     437        break; 
     438    case PINT_PERF_UPDATE_INTERVAL: 
     439        *arg = pc->interval; 
    432440        break; 
    433441    default: 
  • branches/Orange-Branch/src/common/misc/pint-perf-counter.h

    r8891 r8892  
    1313 
    1414enum { 
    15     PERF_DEFAULT_TIME_INTERVAL_MSECS = 1000, 
    16     PERF_DEFAULT_HISTORY_SIZE       = 1, 
     15    PERF_DEFAULT_UPDATE_INTERVAL = 1000, /* msecs */ 
     16    PERF_DEFAULT_HISTORY_SIZE    = 1, 
    1717}; 
    1818 
     
    3434enum PINT_perf_option 
    3535{ 
    36     PINT_PERF_HISTORY_SIZE = 1,  /**< sets/gets the history size */ 
    37     PINT_PERF_KEY_COUNT = 2      /**< gets the key coung (cannot be set) */ 
     36    PINT_PERF_HISTORY_SIZE = 1,   /**< sets/gets the history size */ 
     37    PINT_PERF_KEY_COUNT = 2,      /**< gets the key count (cannot be set) */ 
     38    PINT_PERF_UPDATE_INTERVAL = 3 /**< sets/gets the update interval */ 
    3839}; 
    3940 
     
    6768}; 
    6869 
     70 
    6971/** server-wide perf counter structure */ 
     72extern struct PINT_perf_key server_keys[]; 
     73 
    7074extern struct PINT_perf_counter *PINT_server_pc; 
    7175 
    72 struct PINT_perf_counter* PINT_perf_initialize( 
    73         int history_size, int update_interval); 
     76struct PINT_perf_counter* PINT_perf_initialize(struct PINT_perf_key *key); 
    7477 
    7578void PINT_perf_finalize( 
  • branches/Orange-Branch/src/server/pvfs2-server.c

    r8891 r8892  
    11281128#ifndef __PVFS2_DISABLE_PERF_COUNTERS__ 
    11291129                            /* hist size should be in server config too */ 
    1130     PINT_server_pc = PINT_perf_initialize(PINT_PERF_HISTORY_SIZE, 
     1130    PINT_server_pc = PINT_perf_initialize(server_keys); 
     1131    if(!PINT_server_pc) 
     1132    { 
     1133        gossip_err("Error initializing performance counters.\n"); 
     1134        return(ret); 
     1135    } 
     1136    ret = PINT_perf_set_info(PINT_server_pc, PINT_PERF_UPDATE_INTERVAL,  
    11311137                                        server_config.perf_update_interval); 
    1132     if(!PINT_server_pc) 
    1133     { 
    1134         gossip_err("Error initializing performance counters.\n"); 
     1138    if (ret < 0) 
     1139    { 
     1140        gossip_err("Error PINT_perf_set_info (update interval)\n"); 
    11351141        return(ret); 
    11361142    }