trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject git commit: TS-937, TS-1117: Remove TS_HAS_PURIFY macro
Date Wed, 22 Feb 2012 22:25:30 GMT
Updated Branches:
  refs/heads/master e04aed041 -> cd6eb8f62


TS-937, TS-1117: Remove TS_HAS_PURIFY macro


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cd6eb8f6
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cd6eb8f6
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cd6eb8f6

Branch: refs/heads/master
Commit: cd6eb8f62272aad10bd3ac49bd4c6a20d36b566f
Parents: e04aed0
Author: Brian Geffon <briang@apache.org>
Authored: Wed Feb 22 14:25:11 2012 -0800
Committer: Brian Geffon <briang@apache.org>
Committed: Wed Feb 22 14:25:11 2012 -0800

----------------------------------------------------------------------
 CHANGES                               |    4 +++
 configure.ac                          |   13 -----------
 iocore/cluster/ClusterCache.cc        |   17 --------------
 iocore/cluster/ClusterHandler.cc      |    7 ------
 iocore/cluster/ClusterHandlerBase.cc  |    6 -----
 iocore/cluster/P_ClusterInline.h      |    6 -----
 iocore/eventsystem/I_IOBuffer.h       |    3 --
 iocore/eventsystem/I_Lock.h           |   33 ++++++---------------------
 iocore/eventsystem/I_ProxyAllocator.h |    2 +-
 iocore/hostdb/I_HostDBProcessor.h     |    4 ---
 lib/ts/ink_config.h.in                |    1 -
 proxy/hdrs/HdrHeap.cc                 |    3 --
 proxy/logging/LogAccess.cc            |    3 --
 13 files changed, 13 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2cc56a9..c348c29 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 3.1.3
 
+  *) [TS-1117] Remove TS_HAS_PURIFY MACRO
+
+  *) [TS-937] EThread::execute still processing cancelled event
+
   *) [TS-995] Name change for IP support (ink_inet.h).
 
 Changes with Apache Traffic Server 3.1.2

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 03b0b57..60396f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -195,19 +195,6 @@ AC_SUBST(has_tests)
 AM_CONDITIONAL([BUILD_TESTS], [test 0 -ne $has_tests])
 
 #
-# Purify
-#
-AC_MSG_CHECKING([whether to enable purify])
-AC_ARG_ENABLE([purify],
-  [AS_HELP_STRING([--enable-purify],[enable support for Purify])],
-  [],
-  [enable_purify=no]
-)
-AC_MSG_RESULT([$enable_purify])
-TS_ARG_ENABLE_VAR([has], [purify])
-AC_SUBST(has_purify)
-
-#
 # libev
 #
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/cluster/ClusterCache.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterCache.cc b/iocore/cluster/ClusterCache.cc
index 8b20b70..4515106 100644
--- a/iocore/cluster/ClusterCache.cc
+++ b/iocore/cluster/ClusterCache.cc
@@ -433,10 +433,6 @@ CacheContinuation::do_op(Continuation * c, ClusterMachine * mp, void
*args,
   // Determine the type of the "Over The Wire" (OTW) message header and
   //   initialize it.
   //
-#if TS_HAS_PURIFY
-  if (data)
-    memset(data, 0, op_to_sizeof_fixedlen_msg(opcode));
-#endif
   Debug("cache_msg",
         "do_op opcode=%d seqno=%d Machine=%p data=%p datalen=%d mio=%p",
         opcode, (c ? cc->seq_number : CACHE_NO_RESPONSE), mp, data, data_len, b);
@@ -464,9 +460,6 @@ CacheContinuation::do_op(Continuation * c, ClusterMachine * mp, void *args,
       if (!data) {
         data_len = op_to_sizeof_fixedlen_msg(opcode);
         data = (char *) ALLOCA_DOUBLE(data_len);
-#if TS_HAS_PURIFY
-        memset(data, 0, data_len);
-#endif
       }
       msg = (char *) data;
       CacheOpMsg_short *m = (CacheOpMsg_short *) msg;
@@ -2511,9 +2504,6 @@ CacheContinuation::do_remote_lookup(Continuation * cont, CacheKey *
key,
   ClusterMachine *past_probes[CONFIGURATION_HISTORY_PROBE_DEPTH] = { 0 };
   int mlen = op_to_sizeof_fixedlen_msg(CACHE_LOOKUP_OP) + ((hostname && hostname_len)
? hostname_len : 0);
   CacheLookupMsg *msg = (CacheLookupMsg *) ALLOCA_DOUBLE(mlen);
-#if TS_HAS_PURIFY
-  memset((char *) msg, 0, mlen);
-#endif
   msg->init();
 
 
@@ -2691,11 +2681,7 @@ CacheContinuation::replyLookupEvent(int event, void *d)
   if (vers == CacheOpReplyMsg::CACHE_OP_REPLY_MESSAGE_VERSION) {
     CacheOpReplyMsg *msg;
     int flen = CacheOpReplyMsg::sizeof_fixedlen_msg();
-#if TS_HAS_PURIFY
-    msg = (CacheOpReplyMsg *)ats_malloc(flen);
-#else
     msg = (CacheOpReplyMsg *) ALLOCA_DOUBLE(flen);
-#endif
     msg->init();
     CLUSTER_DECREMENT_DYN_STAT(CLUSTER_CACHE_OUTSTANDING_STAT);
     int len = flen - sizeof(msg->token);
@@ -2707,9 +2693,6 @@ CacheContinuation::replyLookupEvent(int event, void *d)
       log_cache_op_sndmsg(seq_number, event, "cache_result");
 #endif
       clusterProcessor.invoke_remote(from, CACHE_OP_RESULT_CLUSTER_FUNCTION, msg, len);
-#if TS_HAS_PURIFY
-      ats_free(msg);
-#endif
     }
   } else {
     //////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/cluster/ClusterHandler.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterHandler.cc b/iocore/cluster/ClusterHandler.cc
index aff8621..9260ac3 100644
--- a/iocore/cluster/ClusterHandler.cc
+++ b/iocore/cluster/ClusterHandler.cc
@@ -1852,18 +1852,11 @@ ClusterHandler::add_small_controlmsg_descriptors()
     c->free_data();
     c->mutex = NULL;
     p += c->len;
-#if TS_HAS_PURIFY
-    char *endp = p;
-#endif
     ink_hrtime now = ink_get_hrtime();
     CLUSTER_SUM_DYN_STAT(CLUSTER_CTRL_MSGS_SEND_TIME_STAT, now - c->submit_time);
     LOG_EVENT_TIME(c->submit_time, cluster_send_time_dist, cluster_send_events);
     c->freeall();
     p = (char *) DOUBLE_ALIGN(p);
-#if TS_HAS_PURIFY
-    if (endp < p)
-      memset(endp, 0, (p - endp));
-#endif
   }
   write.msg.control_bytes = p - (char *) &write.msg.descriptor[write.msg.count];
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/cluster/ClusterHandlerBase.cc
----------------------------------------------------------------------
diff --git a/iocore/cluster/ClusterHandlerBase.cc b/iocore/cluster/ClusterHandlerBase.cc
index 6b7f14e..b745d30 100644
--- a/iocore/cluster/ClusterHandlerBase.cc
+++ b/iocore/cluster/ClusterHandlerBase.cc
@@ -85,9 +85,6 @@ ClusterControl::real_alloc_data(int read_access, bool align_int32_on_non_int64_b
     } else {
       data = ((char *) real_data) + DATA_HDR;
     }
-#if TS_HAS_PURIFY
-    memset((char *) real_data, 0, BUFFER_SIZE_FOR_INDEX(size_index));
-#endif
   } else {
     int size = sizeof(int64_t) * (((len + DATA_HDR + sizeof(int32_t) + sizeof(int64_t) -
1) / sizeof(int64_t)) + 1);
     size_index = -1;
@@ -101,9 +98,6 @@ ClusterControl::real_alloc_data(int read_access, bool align_int32_on_non_int64_b
       data = (char *) DOUBLE_ALIGN(real_data) + DATA_HDR;
     }
     CLUSTER_INCREMENT_DYN_STAT(CLUSTER_ALLOC_DATA_NEWS_STAT);
-#if TS_HAS_PURIFY
-    memset((char *) real_data, 0, size);
-#endif
   }
 
   // IOBufferBlock adjustments

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/cluster/P_ClusterInline.h
----------------------------------------------------------------------
diff --git a/iocore/cluster/P_ClusterInline.h b/iocore/cluster/P_ClusterInline.h
index a97593b..d62d54b 100644
--- a/iocore/cluster/P_ClusterInline.h
+++ b/iocore/cluster/P_ClusterInline.h
@@ -100,9 +100,6 @@ Cluster_read(ClusterMachine * owner_machine, int opcode,
 
       // Perform data Marshal operation
       msg = (char *) ALLOCA_DOUBLE(flen + len);
-#if TS_HAS_PURIFY
-      memset((char *) msg, 0, flen);
-#endif
       data = msg + flen;
 
       cur_len = len;
@@ -136,9 +133,6 @@ Cluster_read(ClusterMachine * owner_machine, int opcode,
           goto err_exit;
 
         msg = (char *) ALLOCA_DOUBLE(flen + len);
-#if TS_HAS_PURIFY
-        memset((char *) msg, 0, flen);
-#endif
         data = msg + flen;
         memcpy(data, hostname, host_len);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/eventsystem/I_IOBuffer.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_IOBuffer.h b/iocore/eventsystem/I_IOBuffer.h
index baf555e..4ce82cd 100644
--- a/iocore/eventsystem/I_IOBuffer.h
+++ b/iocore/eventsystem/I_IOBuffer.h
@@ -54,10 +54,7 @@ inkcoreapi extern int64_t max_iobuffer_size;
 extern int64_t default_small_iobuffer_size;
 extern int64_t default_large_iobuffer_size; // matched to size of OS buffers
 
-#if !TS_HAS_PURIFY
-// Define this macro to enable buffer usage tracking.
 #define TRACK_BUFFER_USER
-#endif
 
 enum AllocType
 { NO_ALLOC, FAST_ALLOCATED, XMALLOCED, MEMALIGNED,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/eventsystem/I_Lock.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_Lock.h b/iocore/eventsystem/I_Lock.h
index 393855d..715ea29 100644
--- a/iocore/eventsystem/I_Lock.h
+++ b/iocore/eventsystem/I_Lock.h
@@ -29,7 +29,6 @@
 
 #define MAX_LOCK_TIME	HRTIME_MSECONDS(200)
 #define THREAD_MUTEX_THREAD_HOLDING	(-1024*1024)
-#define HANDLER_NAME(_c) _c?_c->handler_name:(char*)NULL
 
 class EThread;
 typedef EThread *EThreadPtr;
@@ -732,7 +731,6 @@ MutexTryLock _l(__FILE__,__LINE__,(char*)NULL,_m,_t)
 #    define MUTEX_TRY_LOCK_SPIN(_l,_m,_t,_sc) \
 MutexTryLock _l(__FILE__,__LINE__,(char*)NULL,_m,_t,_sc)
 
-#    if TS_HAS_PURIFY
 
 /**
   Attempts to acquire the lock to the ProxyMutex.
@@ -748,12 +746,9 @@ MutexTryLock _l(__FILE__,__LINE__,(char*)NULL,_m,_t,_sc)
   @param _c Continuation whose mutex will be attempted to lock.
 
 */
-#      define MUTEX_TRY_LOCK_FOR(_l,_m,_t,_c) \
-MutexTryLock _l(__FILE__,__LINE__,(char *)NULL,_m,_t)
-#    else // !TS_HAS_PURIFY
-#      define MUTEX_TRY_LOCK_FOR(_l,_m,_t,_c) \
-MutexTryLock _l(__FILE__,__LINE__,HANDLER_NAME(_c),_m,_t)
-#    endif // TS_HAS_PURIFY
+
+#    define MUTEX_TRY_LOCK_FOR(_l,_m,_t,_c) \
+MutexTryLock _l(__FILE__,__LINE__,NULL,_m,_t)
 #  else //DEBUG
 #    define MUTEX_TRY_LOCK(_l,_m,_t) MutexTryLock _l(_m,_t)
 #    define MUTEX_TRY_LOCK_SPIN(_l,_m,_t,_sc) MutexTryLock _l(_m,_t,_sc)
@@ -779,17 +774,10 @@ MutexTryLock _l(__FILE__,__LINE__,HANDLER_NAME(_c),_m,_t)
 #ifdef DEBUG
 #  define MUTEX_TAKE_TRY_LOCK(_m,_t) \
 Mutex_trylock(__FILE__,__LINE__,(char*)NULL,_m,_t)
-#  if TS_HAS_PURIFY
-#    define MUTEX_TAKE_TRY_LOCK_FOR(_m,_t,_c) \
-Mutex_trylock(__FILE__,__LINE__,(char *)NULL,_m,_t)
-#    define MUTEX_TAKE_TRY_LOCK_FOR_SPIN(_m,_t,_c,_sc) \
-Mutex_trylock_spin(__FILE__,__LINE__,(char *)NULL,_m,_t,_sc)
-#  else
-#    define MUTEX_TAKE_TRY_LOCK_FOR(_m,_t,_c) \
+#  define MUTEX_TAKE_TRY_LOCK_FOR(_m,_t,_c) \
 Mutex_trylock(__FILE__,__LINE__,(char*)NULL,_m,_t)
-#    define MUTEX_TAKE_TRY_LOCK_FOR_SPIN(_m,_t,_c,_sc) \
-Mutex_trylock_spin(__FILE__,__LINE__,HANDLER_NAME(_c),_m,_t,_sc)
-#  endif
+#  define MUTEX_TAKE_TRY_LOCK_FOR_SPIN(_m,_t,_c,_sc) \
+Mutex_trylock_spin(__FILE__,__LINE__,NULL,_m,_t,_sc)
 #else
 #  define MUTEX_TAKE_TRY_LOCK(_m,_t) Mutex_trylock(_m,_t)
 #  define MUTEX_TAKE_TRY_LOCK_FOR(_m,_t,_c) Mutex_trylock(_m,_t)
@@ -802,13 +790,8 @@ Mutex_trylock_spin(_m,_t,_sc)
 Mutex_lock(__FILE__,__LINE__,(char*)NULL,_m,_t)
 #  define MUTEX_SET_AND_TAKE_LOCK(_s,_m,_t)\
 _s.set_and_take(__FILE__,__LINE__,(char*)NULL,_m,_t)
-#  if TS_HAS_PURIFY
-#    define MUTEX_TAKE_LOCK_FOR(_m,_t,_c) \
-Mutex_lock(__FILE__,__LINE__,(char *)NULL,_m,_t)
-#  else
-#    define MUTEX_TAKE_LOCK_FOR(_m,_t,_c) \
-Mutex_lock(__FILE__,__LINE__,HANDLER_NAME(_c),_m,_t)
-#  endif // TS_HAS_PURIFY
+#  define MUTEX_TAKE_LOCK_FOR(_m,_t,_c) \
+Mutex_lock(__FILE__,__LINE__,NULL,_m,_t)
 #else
 #  define MUTEX_TAKE_LOCK(_m,_t) Mutex_lock(_m,_t)
 #  define MUTEX_SET_AND_TAKE_LOCK(_s,_m,_t)_s.set_and_take(_m,_t)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/eventsystem/I_ProxyAllocator.h
----------------------------------------------------------------------
diff --git a/iocore/eventsystem/I_ProxyAllocator.h b/iocore/eventsystem/I_ProxyAllocator.h
index 7fb08f8..a2ebcee 100644
--- a/iocore/eventsystem/I_ProxyAllocator.h
+++ b/iocore/eventsystem/I_ProxyAllocator.h
@@ -81,7 +81,7 @@ thread_freeup(ClassAllocator<C> &a, ProxyAllocator & l)
   ink_assert(!l.allocated);
 }
 
-#if !TS_HAS_PURIFY && !defined(_IOCORE_WIN32) && defined(TS_USE_FREELIST)
+#if !defined(_IOCORE_WIN32) && defined(TS_USE_FREELIST)
 #define THREAD_ALLOC(_a, _t) thread_alloc(::_a, _t->_a)
 #define THREAD_ALLOC_INIT(_a, _t) thread_alloc_init(::_a, _t->_a)
 #define THREAD_FREE_TO(_p, _a, _t, _m) do { \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/iocore/hostdb/I_HostDBProcessor.h
----------------------------------------------------------------------
diff --git a/iocore/hostdb/I_HostDBProcessor.h b/iocore/hostdb/I_HostDBProcessor.h
index 34b3ab6..031f237 100644
--- a/iocore/hostdb/I_HostDBProcessor.h
+++ b/iocore/hostdb/I_HostDBProcessor.h
@@ -329,12 +329,8 @@ HostDBInfo()
   , reverse_dns(0)
   , md5_low_low(0)
   , md5_low(0), md5_high(0) {
-#if TS_HAS_PURIFY
-    memset(&app, 0, sizeof(app));
-#else
     app.allotment.application1 = 0;
     app.allotment.application2 = 0;
-#endif
     ats_ip_invalidate(ip());
 
     return;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/lib/ts/ink_config.h.in
----------------------------------------------------------------------
diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in
index 7725896..fc26694 100644
--- a/lib/ts/ink_config.h.in
+++ b/lib/ts/ink_config.h.in
@@ -126,7 +126,6 @@
 #define TS_IS_MICRO_BUILD              @is_micro_build@
 #define TS_HAS_STANDALONE_IOCORE       @has_standalone_iocore@
 #define TS_HAS_INKAPI                  @has_inkapi@
-#define TS_HAS_PURIFY                  @has_purify@
 #define TS_HAS_DEMANGLE                @has_demangle@
 #define TS_HAS_TESTS                   @has_tests@
 #define TS_HAS_WCCP                    @has_wccp@

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/proxy/hdrs/HdrHeap.cc
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HdrHeap.cc b/proxy/hdrs/HdrHeap.cc
index 1f98344..a2f5b5e 100644
--- a/proxy/hdrs/HdrHeap.cc
+++ b/proxy/hdrs/HdrHeap.cc
@@ -172,9 +172,6 @@ new_HdrStrHeap(int requested_size)
 
   ink_assert(sh->m_free_size > 0);
 
-#if TS_HAS_PURIFY
-  memset(sh->m_free_start, '#', sh->m_free_size);
-#endif
 
   return sh;
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cd6eb8f6/proxy/logging/LogAccess.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogAccess.cc b/proxy/logging/LogAccess.cc
index 2bf3e70..d013a21 100644
--- a/proxy/logging/LogAccess.cc
+++ b/proxy/logging/LogAccess.cc
@@ -710,9 +710,6 @@ LogAccess::marshal_record(char *record, char *buf)
   ink_debug_assert(num_chars <= max_chars);
   memcpy(buf, out_buf, num_chars);
 
-#if TS_HAS_PURIFY
-  memset(buf + num_chars + 1, '$', max_chars - num_chars - 1);
-#endif
 
   return max_chars;
 }


Mime
View raw message