You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2010/11/17 03:53:35 UTC

svn commit: r1035909 - in /trafficserver/traffic/trunk: configure.ac proxy/StatSystemV2.cc proxy/StatSystemV2.h

Author: igalic
Date: Wed Nov 17 02:53:35 2010
New Revision: 1035909

URL: http://svn.apache.org/viewvc?rev=1035909&view=rev
Log:
purging INK64 left overs, although it might be better to purge StatSystemV2 instead.

Modified:
    trafficserver/traffic/trunk/configure.ac
    trafficserver/traffic/trunk/proxy/StatSystemV2.cc
    trafficserver/traffic/trunk/proxy/StatSystemV2.h

Modified: trafficserver/traffic/trunk/configure.ac
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/configure.ac?rev=1035909&r1=1035908&r2=1035909&view=diff
==============================================================================
--- trafficserver/traffic/trunk/configure.ac (original)
+++ trafficserver/traffic/trunk/configure.ac Wed Nov 17 02:53:35 2010
@@ -528,24 +528,27 @@ case $host_os in
     else # gcc
       common_opt="-pipe -Wall -Werror"
       debug_opt="-ggdb3 $common_opt"
-      release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+      release_opt="-g $common_opt -O3 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
+      TS_ADDTO(LDFLAGS, [-feliminate-unused-debug-symbols])
     fi
     ;;
   darwin*)
     common_opt="-pipe -Wall -Werror"
     debug_opt="-ggdb3 $common_opt"
-    release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+    release_opt="-g $common_opt -O3 -fno-strict-aliasing"
     cxx_opt="-Wno-invalid-offsetof"
     TS_ADDTO(CPPFLAGS, [-I/opt/local/include])
     TS_ADDTO(LDFLAGS, [-L/opt/local/lib])
+    TS_ADDTO(LDFLAGS, [-feliminate-unused-debug-symbols])
     ;;
   freebsd*)
     common_opt="-pipe -Wall -Werror"
     debug_opt="-ggdb3 $common_opt"
-    release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+    release_opt="-g $common_opt -O3 -fno-strict-aliasing"
     cxx_opt="-Wno-invalid-offsetof"
     TS_ADDTO(LDFLAGS, [-L/usr/local/lib])
+    TS_ADDTO(LDFLAGS, [-feliminate-unused-debug-symbols])
     ;;
   solaris*)
     if test "x${base_cc}" = "xcc"; then
@@ -562,8 +565,9 @@ case $host_os in
     else # gcc
       common_opt="-pipe -Wall -Werror"
       debug_opt="-ggdb3 $common_opt"
-      release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+      release_opt="-g $common_opt -O3 -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
+      TS_ADDTO(LDFLAGS, [-feliminate-unused-debug-symbols])
     fi
     TS_ADDTO(LDFLAGS, [-L/lib])
     TS_ADDTO(LDFLAGS, [-L/usr/local/lib])
@@ -571,8 +575,9 @@ case $host_os in
   *)
     common_opt="-pipe -Wall -Werror"
     debug_opt="-ggdb3 $common_opt"
-    release_opt="-g $common_opt -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing"
+    release_opt="-g $common_opt -O3 -fno-strict-aliasing"
     cxx_opt="-Wno-invalid-offsetof"
+    TS_ADDTO(LDFLAGS, [-feliminate-unused-debug-symbols])
     ;;
 esac
 

Modified: trafficserver/traffic/trunk/proxy/StatSystemV2.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatSystemV2.cc?rev=1035909&r1=1035908&r2=1035909&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatSystemV2.cc (original)
+++ trafficserver/traffic/trunk/proxy/StatSystemV2.cc Wed Nov 17 02:53:35 2010
@@ -30,12 +30,12 @@
 extern class EventProcessor eventProcessor;
 
 std::map<std::string, uint32_t> StatSystemV2::stat_name_to_num;
-std::vector< std::pair<std::string, INK64> > StatSystemV2::global_stats;
+std::vector< std::pair<std::string, int64> > StatSystemV2::global_stats;
 uint32_t StatSystemV2::MAX_STATS_ALLOWED = 500000;
 uint32_t StatSystemV2::NUM_STATS_ESTIMATE = 5000;
 static TSMutex statsMutex = NULL;
 
-void StatSystemV2::incrementGlobal(uint32_t stat_num, INK64 stat_val)
+void StatSystemV2::incrementGlobal(uint32_t stat_num, int64 stat_val)
 {
     if(stat_num >= global_stats.size()) {
         Debug("http", "Cannot incrementing stat %u as it is greater than global_stats size", stat_num);
@@ -45,7 +45,7 @@ void StatSystemV2::incrementGlobal(uint3
     global_stats[stat_num].second += stat_val;
 }
 
-bool StatSystemV2::increment(uint32_t stat_num, INK64 stat_val)
+bool StatSystemV2::increment(uint32_t stat_num, int64 stat_val)
 {
     if(stat_num >= MAX_STATS_ALLOWED) {
         return false;
@@ -64,7 +64,7 @@ bool StatSystemV2::increment(uint32_t st
     return true;
 }
 
-bool StatSystemV2::increment(const char *stat_name, INK64 stat_val)
+bool StatSystemV2::increment(const char *stat_name, int64 stat_val)
 {
     uint32_t stat_num;
     if(!getStatNum(stat_name, stat_num)) {
@@ -73,7 +73,7 @@ bool StatSystemV2::increment(const char 
     return increment(stat_num, stat_val);
 }
 
-bool StatSystemV2::get(uint32_t stat_num, INK64 *stat_val)
+bool StatSystemV2::get(uint32_t stat_num, int64 *stat_val)
 {
     // Get stat lock
     if (TSMutexLock(statsMutex) != INK_SUCCESS) {
@@ -91,7 +91,7 @@ bool StatSystemV2::get(uint32_t stat_num
     return true;
 }
 
-bool StatSystemV2::get(const char *stat_name, INK64 *stat_val)
+bool StatSystemV2::get(const char *stat_name, int64 *stat_val)
 {
     // Get value of stat with name == stat_name
     // Returns value from the global stats map. does not walk threads 
@@ -102,7 +102,7 @@ bool StatSystemV2::get(const char *stat_
     return get(stat_num, stat_val);
 }
 
-bool StatSystemV2::get_current(uint32_t stat_num, INK64 *stat_val)
+bool StatSystemV2::get_current(uint32_t stat_num, int64 *stat_val)
 {
     // Returns current value of stat. Walks all threads
     
@@ -122,7 +122,7 @@ bool StatSystemV2::get_current(uint32_t 
     return true;
 }
 
-bool StatSystemV2::get_current(const char *stat_name, INK64 *stat_val)
+bool StatSystemV2::get_current(const char *stat_name, int64 *stat_val)
 {
     uint32_t stat_num;
     if(!getStatNum(stat_name, stat_num)) {
@@ -201,7 +201,7 @@ void StatSystemV2::init()
 
 void StatSystemV2::clear()
 {
-    for(std::vector< std::pair<std::string, INK64> >::iterator it = StatSystemV2::global_stats.begin();
+    for(std::vector< std::pair<std::string, int64> >::iterator it = StatSystemV2::global_stats.begin();
             it != StatSystemV2::global_stats.end(); it++) {
         it->second = 0;
     }
@@ -220,7 +220,7 @@ void StatSystemV2::collect()
         // Lock thread stats to prevent resizing on increment
         TSMutexLock(t->thread_stats_mutex);
         int j = 0;
-        for(std::vector<INK64>::iterator it = t->thread_stats.begin();
+        for(std::vector<int64>::iterator it = t->thread_stats.begin();
             it != t->thread_stats.end(); it++, j++) {
             if(*it != 0) {
                 incrementGlobal(j, *it);
@@ -289,7 +289,7 @@ void StatCollectorContinuation::print_st
 
   printbuf << "TIME " << _startTime <<"\n";
   if (TSMutexLock(statsMutex) == INK_SUCCESS) {
-      for(std::vector< std::pair<std::string, INK64> >::const_iterator it = StatSystemV2::global_stats.begin();
+      for(std::vector< std::pair<std::string, int64> >::const_iterator it = StatSystemV2::global_stats.begin();
           it != StatSystemV2::global_stats.end(); it++) {
           if(it->second != 0 ) {
               printbuf << "STAT " << it->first << " " << it->second << "\n";
@@ -302,7 +302,7 @@ void StatCollectorContinuation::print_st
 
 void StatCollectorContinuation::print_stat(const char *stat_name, std::stringstream &printbuf, bool current) {
     // Print only non zero stats
-    INK64 stat_val = 0;
+    int64 stat_val = 0;
     bool stat_get_status;
     if(current) {
         stat_get_status = StatSystemV2::get_current(stat_name, &stat_val);
@@ -334,7 +334,7 @@ StatCollectorContinuation::get_stats_wit
     }
 
     // Get all stats which start with stat_prefix
-    for(std::vector< std::pair<std::string, INK64> >::const_iterator it = StatSystemV2::global_stats.begin();
+    for(std::vector< std::pair<std::string, int64> >::const_iterator it = StatSystemV2::global_stats.begin();
         it != StatSystemV2::global_stats.end(); it++) {
         size_t found = it->first.find(stat_prefix);
         if(found == 0) {

Modified: trafficserver/traffic/trunk/proxy/StatSystemV2.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/StatSystemV2.h?rev=1035909&r1=1035908&r2=1035909&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/StatSystemV2.h (original)
+++ trafficserver/traffic/trunk/proxy/StatSystemV2.h Wed Nov 17 02:53:35 2010
@@ -43,12 +43,12 @@ class Event;
 class StatSystemV2
 {
 public:
-    static bool increment(uint32_t stat_num, INK64 stat_val = 1);
-    static bool increment(const char *stat_name, INK64 stat_val = 1);
-    static bool get(uint32_t stat_num, INK64 *stat_val);
-    static bool get(const char *stat_name, INK64 *stat_val);
-    static bool get_current(uint32_t stat_num, INK64 *stat_val);
-    static bool get_current(const char *stat_name, INK64 *stat_val);
+    static bool increment(uint32_t stat_num, int64 stat_val = 1);
+    static bool increment(const char *stat_name, int64 stat_val = 1);
+    static bool get(uint32_t stat_num, int64 *stat_val);
+    static bool get(const char *stat_name, int64 *stat_val);
+    static bool get_current(uint32_t stat_num, int64 *stat_val);
+    static bool get_current(const char *stat_name, int64 *stat_val);
     
     static bool registerStat(const char *stat_name, uint32_t *stat_num);
     static void setMaxStatsAllowed(uint32_t max_stats_allowed);
@@ -58,13 +58,13 @@ public:
 private:
     // These must be called after acquiring a lock
     // Since these are private, only methods in StatCollectorContinuation can call them
-    static void incrementGlobal(uint32_t stat_num, INK64 stat_val = 1);
+    static void incrementGlobal(uint32_t stat_num, int64 stat_val = 1);
     static void clear();
     static void collect();
 
     static bool getStatNum(const char *stat_name, uint32_t &stat_num);
     static std::map<std::string, uint32_t> stat_name_to_num;
-    static std::vector< std::pair<std::string, INK64> > global_stats;
+    static std::vector< std::pair<std::string, int64> > global_stats;
     static uint32_t MAX_STATS_ALLOWED;
     static uint32_t NUM_STATS_ESTIMATE;