TS-1685 Remove TS_MICRO and fellas
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b4d411e0 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b4d411e0 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b4d411e0 Branch: refs/heads/3.3.x Commit: b4d411e07953fd3a7f9bea60f4c822360658a1aa Parents: 7485e0b Author: Leif Hedstrom <[email protected]> Authored: Tue Jul 30 07:15:17 2013 +0200 Committer: Leif Hedstrom <[email protected]> Committed: Thu Aug 1 22:51:23 2013 +0200 ---------------------------------------------------------------------- iocore/cluster/ClusterMachine.cc | 4 --- iocore/cluster/P_ClusterMachine.h | 2 -- iocore/eventsystem/I_IOBuffer.h | 12 ------- iocore/eventsystem/UnixEventProcessor.cc | 2 -- iocore/hostdb/include/Machine.h | 2 -- iocore/net/Net.cc | 2 -- iocore/net/UnixNetProcessor.cc | 15 ++------- lib/ts/ink_config.h.in | 16 --------- lib/ts/ink_queue.cc | 47 +-------------------------- lib/ts/ink_queue.h | 46 +------------------------- proxy/CacheControl.cc | 20 ------------ proxy/ControlMatcher.cc | 4 --- proxy/ControlMatcher.h | 6 ---- proxy/DynamicStats.h | 17 +--------- proxy/Main.cc | 30 ++--------------- proxy/http/HttpBodyFactory.cc | 5 ++- proxy/http/HttpPages.cc | 9 ----- proxy/http/HttpPages.h | 3 -- proxy/http/HttpSessionManager.h | 5 --- proxy/http/HttpTransact.cc | 18 +--------- proxy/logging/Log.h | 7 ---- proxy/logging/LogAccess.h | 2 -- proxy/logging/LogAccessHttp.h | 2 -- proxy/logging/LogAccessICP.cc | 4 +-- proxy/logging/LogBuffer.h | 4 --- proxy/logging/LogCollationClientSM.cc | 23 ------------- proxy/logging/LogCollationClientSM.h | 4 --- proxy/logging/LogFile.h | 4 --- proxy/logging/LogFormat.cc | 2 -- proxy/logging/LogHost.cc | 8 ----- proxy/logging/LogObject.cc | 19 ----------- proxy/logging/LogObject.h | 4 --- 32 files changed, 13 insertions(+), 335 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/cluster/ClusterMachine.cc ---------------------------------------------------------------------- diff --git a/iocore/cluster/ClusterMachine.cc b/iocore/cluster/ClusterMachine.cc index c41bbe8..afc4c11 100644 --- a/iocore/cluster/ClusterMachine.cc +++ b/iocore/cluster/ClusterMachine.cc @@ -79,9 +79,7 @@ ClusterMachine::ClusterMachine(char *ahostname, unsigned int aip, int aport) { EThread *thread = this_ethread(); ProxyMutex *mutex = thread->mutex; -#ifndef INK_NO_CLUSTER CLUSTER_INCREMENT_DYN_STAT(CLUSTER_MACHINES_ALLOCATED_STAT); -#endif if (!aip) { char localhost[1024]; if (!ahostname) { @@ -172,7 +170,6 @@ ClusterMachine::~ClusterMachine() ats_free(clusterHandlers); } -#ifndef INK_NO_CLUSTER struct MachineTimeoutContinuation; typedef int (MachineTimeoutContinuation::*McTimeoutContHandler) (int, void *); struct MachineTimeoutContinuation: public Continuation @@ -290,4 +287,3 @@ read_MachineList(char *filename, int afd) } return (afd != -1) ? (MachineList *) NULL : l; } -#endif // INK_NO_CLUSTER http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/cluster/P_ClusterMachine.h ---------------------------------------------------------------------- diff --git a/iocore/cluster/P_ClusterMachine.h b/iocore/cluster/P_ClusterMachine.h index 85cf7d4..848a2b2 100644 --- a/iocore/cluster/P_ClusterMachine.h +++ b/iocore/cluster/P_ClusterMachine.h @@ -110,12 +110,10 @@ void free_MachineList(MachineList * l); struct clusterConfigFile { -#ifndef INK_NO_CLUSTER char *parseFile(int fd) { return (char *) read_MachineList(NULL, fd); } -#endif }; inkcoreapi ClusterMachine *this_cluster_machine(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/eventsystem/I_IOBuffer.h ---------------------------------------------------------------------- diff --git a/iocore/eventsystem/I_IOBuffer.h b/iocore/eventsystem/I_IOBuffer.h index 730895c..c27ba93 100644 --- a/iocore/eventsystem/I_IOBuffer.h +++ b/iocore/eventsystem/I_IOBuffer.h @@ -68,7 +68,6 @@ enum AllocType CONSTANT }; -#ifndef TS_MICRO #if TS_USE_RECLAIMABLE_FREELIST #define DEFAULT_BUFFER_NUMBER 64 #else @@ -78,17 +77,6 @@ enum AllocType #define MAX_MIOBUFFER_READERS 5 #define DEFAULT_BUFFER_ALIGNMENT 8192 // should be disk/page size #define DEFAULT_BUFFER_BASE_SIZE 128 -#else -#define DEFAULT_BUFFER_NUMBER 4 -#if TS_USE_RECLAIMABLE_FREELIST -#define DEFAULT_HUGE_BUFFER_NUMBER 4 -#else -#define DEFAULT_HUGE_BUFFER_NUMBER 32 -#endif -#define MAX_MIOBUFFER_READERS 3 -#define DEFAULT_BUFFER_BASE_SIZE 128 -#define DEFAULT_BUFFER_ALIGNMENT 8 // should be disk/page size -#endif //////////////////////////////////////////////// // These are defines so that code that used 2 // http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/eventsystem/UnixEventProcessor.cc ---------------------------------------------------------------------- diff --git a/iocore/eventsystem/UnixEventProcessor.cc b/iocore/eventsystem/UnixEventProcessor.cc index 5f4d646..776eb64 100644 --- a/iocore/eventsystem/UnixEventProcessor.cc +++ b/iocore/eventsystem/UnixEventProcessor.cc @@ -124,8 +124,6 @@ EventProcessor::spawn_event_threads(int n_threads, const char* et_name, size_t s } -#define INK_NO_CLUSTER - class EventProcessor eventProcessor; int http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/hostdb/include/Machine.h ---------------------------------------------------------------------- diff --git a/iocore/hostdb/include/Machine.h b/iocore/hostdb/include/Machine.h index 2c49995..c377ca4 100644 --- a/iocore/hostdb/include/Machine.h +++ b/iocore/hostdb/include/Machine.h @@ -110,12 +110,10 @@ void free_MachineList(MachineList * l); #ifdef FIXME_CONFIG struct clusterConfigFile: configFile { -#ifndef INK_NO_CLUSTER char *parseFile(int fd) { return (char *) read_MachineList(NULL, fd); } -#endif }; #endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/net/Net.cc ---------------------------------------------------------------------- diff --git a/iocore/net/Net.cc b/iocore/net/Net.cc index 0014bf4..2ae2c99 100644 --- a/iocore/net/Net.cc +++ b/iocore/net/Net.cc @@ -98,7 +98,6 @@ register_net_stats() RECD_INT, RECP_NULL, (int) net_calls_to_write_nodata_stat, RecRawStatSyncSum); NET_CLEAR_DYN_STAT(net_calls_to_write_nodata_stat); -#ifndef INK_NO_SOCKS RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.socks.connections_successful", RECD_INT, RECP_NULL, (int) socks_connections_successful_stat, RecRawStatSyncSum); @@ -108,7 +107,6 @@ register_net_stats() RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.socks.connections_currently_open", RECD_INT, RECP_NON_PERSISTENT, (int) socks_connections_currently_open_stat, RecRawStatSyncSum); NET_CLEAR_DYN_STAT(socks_connections_currently_open_stat); -#endif RecRegisterRawStat(net_rsb, RECT_PROCESS, "proxy.process.net.inactivity_cop_lock_acquire_failure", RECD_INT, RECP_NULL, (int) inactivity_cop_lock_acquire_failure_stat, http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/iocore/net/UnixNetProcessor.cc ---------------------------------------------------------------------- diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc index 090a549..ef8534a 100644 --- a/iocore/net/UnixNetProcessor.cc +++ b/iocore/net/UnixNetProcessor.cc @@ -201,7 +201,6 @@ UnixNetProcessor::connect_re_internal( // virtual function used to upgrade etype to ET_SSL for SSLNetProcessor. upgradeEtype(opt->etype); -#ifndef INK_NO_SOCKS bool using_socks = (socks_conf_stuff->socks_needed && opt->socks_support != NO_SOCKS #ifdef SOCKS_WITH_TS && (opt->socks_version != SOCKS_DEFAULT_VERSION || @@ -213,7 +212,7 @@ UnixNetProcessor::connect_re_internal( #endif ); SocksEntry *socksEntry = NULL; -#endif + NET_SUM_GLOBAL_DYN_STAT(net_connections_currently_open_stat, 1); vc->id = net_next_connection_number(); vc->submit_time = ink_get_hrtime(); @@ -221,7 +220,7 @@ UnixNetProcessor::connect_re_internal( ats_ip_copy(&vc->server_addr, target); vc->mutex = cont->mutex; Action *result = &vc->action_; -#ifndef INK_NO_SOCKS + if (using_socks) { char buff[INET6_ADDRPORTSTRLEN]; Debug("Socks", "Using Socks ip: %s\n", ats_ip_nptop(target, buff, sizeof(buff))); @@ -241,9 +240,6 @@ UnixNetProcessor::connect_re_internal( Debug("Socks", "Not Using Socks %d \n", socks_conf_stuff->socks_needed); vc->action_ = cont; } -#else - vc->action_ = cont; -#endif /*INK_NO_SOCKS */ if (t->is_event_type(opt->etype)) { MUTEX_TRY_LOCK(lock, cont->mutex, t); @@ -252,21 +248,17 @@ UnixNetProcessor::connect_re_internal( if (lock2) { int ret; ret = vc->connectUp(t); -#ifndef INK_NO_SOCKS if ((using_socks) && (ret == CONNECT_SUCCESS)) return &socksEntry->action_; else -#endif return ACTION_RESULT_DONE; } } } eventProcessor.schedule_imm(vc, opt->etype); -#ifndef INK_NO_SOCKS if (using_socks) { return &socksEntry->action_; } else -#endif return result; } @@ -422,7 +414,6 @@ UnixNetProcessor::start(int, size_t) change_net_connections_throttle(NULL, RECD_INT, d, NULL); // Socks -#ifndef INK_NO_SOCKS if (!netProcessor.socks_conf_stuff) { socks_conf_stuff = NEW(new socks_conf_struct); loadSocksConfiguration(socks_conf_stuff); @@ -434,7 +425,7 @@ UnixNetProcessor::start(int, size_t) socks_conf_stuff = netProcessor.socks_conf_stuff; } } -#endif /*INK_NO_SOCKS */ + // commented by vijay - bug 2489945 /*if (use_accept_thread) // 0 { NetAccept * na = createNetAccept(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/lib/ts/ink_config.h.in ---------------------------------------------------------------------- diff --git a/lib/ts/ink_config.h.in b/lib/ts/ink_config.h.in index 989b23a..784702d 100644 --- a/lib/ts/ink_config.h.in +++ b/lib/ts/ink_config.h.in @@ -80,26 +80,10 @@ #define TS_HAS_128BIT_CAS @has_128bit_cas@ /* API */ -#define TS_IS_MICRO_BUILD @is_micro_build@ #define TS_HAS_STANDALONE_IOCORE @has_standalone_iocore@ #define TS_HAS_TESTS @has_tests@ #define TS_HAS_WCCP @has_wccp@ -/* XXX: Should make those individually selectable ? */ -/* TODO: Use TS prefix instead no prefix or INK */ -#if TS_IS_MICRO_BUILD -# define TS_MICRO 1 -# define INK_NO_ACL 1 -# define INK_NO_CLUSTER 1 -# define TS_USE_DIAGS 0 -# define INK_NO_HOSTDB 1 -# define INK_NO_ICP 1 -# define INK_NO_LOG 1 -# define INK_NO_SOCKS 1 -# define INK_NO_STAT_PAGES 1 -# define INK_USE_MUTEX_FOR_ATOMICLISTS 1 -#endif - #define TS_MAX_THREADS_IN_EACH_THREAD_TYPE @max_threads_per_type@ #define TS_MAX_NUMBER_EVENT_THREADS @max_event_threads@ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/lib/ts/ink_queue.cc ---------------------------------------------------------------------- diff --git a/lib/ts/ink_queue.cc b/lib/ts/ink_queue.cc index 173b030..2bf1ee3 100644 --- a/lib/ts/ink_queue.cc +++ b/lib/ts/ink_queue.cc @@ -369,21 +369,13 @@ ink_freelists_dump(FILE * f) void ink_atomiclist_init(InkAtomicList * l, const char *name, uint32_t offset_to_next) { -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) - ink_mutex_init(&(l->inkatomiclist_mutex), name); -#endif l->name = name; l->offset = offset_to_next; SET_FREELIST_POINTER_VERSION(l->head, FROM_PTR(0), 0); } -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) -void * -ink_atomiclist_pop_wrap(InkAtomicList * l) -#else /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ void * ink_atomiclist_pop(InkAtomicList * l) -#endif /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ { head_p item; head_p next; @@ -394,17 +386,11 @@ ink_atomiclist_pop(InkAtomicList * l) return NULL; SET_FREELIST_POINTER_VERSION(next, *ADDRESS_OF_NEXT(TO_PTR(FREELIST_POINTER(item)), l->offset), FREELIST_VERSION(item) + 1); -#if !defined(INK_USE_MUTEX_FOR_ATOMICLISTS) #if TS_HAS_128BIT_CAS result = ink_atomic_cas((__int128_t*) & l->head.data, item.data, next.data); #else result = ink_atomic_cas((int64_t *) & l->head.data, item.data, next.data); #endif -#else - l->head.data = next.data; - result = 1; -#endif - } while (result == 0); { @@ -414,13 +400,8 @@ ink_atomiclist_pop(InkAtomicList * l) } } -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) -void * -ink_atomiclist_popall_wrap(InkAtomicList * l) -#else /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ void * ink_atomiclist_popall(InkAtomicList * l) -#endif /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ { head_p item; head_p next; @@ -430,17 +411,11 @@ ink_atomiclist_popall(InkAtomicList * l) if (TO_PTR(FREELIST_POINTER(item)) == NULL) return NULL; SET_FREELIST_POINTER_VERSION(next, FROM_PTR(NULL), FREELIST_VERSION(item) + 1); -#if !defined(INK_USE_MUTEX_FOR_ATOMICLISTS) #if TS_HAS_128BIT_CAS result = ink_atomic_cas((__int128_t*) & l->head.data, item.data, next.data); #else result = ink_atomic_cas((int64_t *) & l->head.data, item.data, next.data); #endif -#else - l->head.data = next.data; - result = 1; -#endif - } while (result == 0); { @@ -456,13 +431,8 @@ ink_atomiclist_popall(InkAtomicList * l) } } -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) -void * -ink_atomiclist_push_wrap(InkAtomicList * l, void *item) -#else /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ void * ink_atomiclist_push(InkAtomicList * l, void *item) -#endif /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ { volatile_void_p *adr_of_next = (volatile_void_p *) ADDRESS_OF_NEXT(item, l->offset); head_p head; @@ -476,30 +446,19 @@ ink_atomiclist_push(InkAtomicList * l, void *item) ink_assert(item != TO_PTR(h)); SET_FREELIST_POINTER_VERSION(item_pair, FROM_PTR(item), FREELIST_VERSION(head)); INK_MEMORY_BARRIER; -#if !defined(INK_USE_MUTEX_FOR_ATOMICLISTS) #if TS_HAS_128BIT_CAS result = ink_atomic_cas((__int128_t*) & l->head, head.data, item_pair.data); #else result = ink_atomic_cas((int64_t *) & l->head, head.data, item_pair.data); #endif -#else - l->head.data = item_pair.data; - result = 1; -#endif - } while (result == 0); return TO_PTR(h); } -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) -void * -ink_atomiclist_remove_wrap(InkAtomicList * l, void *item) -#else /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ void * ink_atomiclist_remove(InkAtomicList * l, void *item) -#endif /* !INK_USE_MUTEX_FOR_ATOMICLISTS */ { head_p head; void *prev = NULL; @@ -514,16 +473,12 @@ ink_atomiclist_remove(InkAtomicList * l, void *item) while (TO_PTR(FREELIST_POINTER(head)) == item) { head_p next; SET_FREELIST_POINTER_VERSION(next, item_next, FREELIST_VERSION(head) + 1); -#if !defined(INK_USE_MUTEX_FOR_ATOMICLISTS) #if TS_HAS_128BIT_CAS result = ink_atomic_cas((__int128_t*) & l->head.data, head.data, next.data); #else result = ink_atomic_cas((int64_t *) & l->head.data, head.data, next.data); #endif -#else - l->head.data = next.data; - result = 1; -#endif + if (result) { *addr_next = NULL; return item; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/lib/ts/ink_queue.h ---------------------------------------------------------------------- diff --git a/lib/ts/ink_queue.h b/lib/ts/ink_queue.h index ec24ec3..6004575 100644 --- a/lib/ts/ink_queue.h +++ b/lib/ts/ink_queue.h @@ -190,9 +190,6 @@ extern "C" typedef struct { -#if defined(INK_USE_MUTEX_FOR_ATOMICLISTS) - ink_mutex inkatomiclist_mutex; -#endif volatile head_p head; const char *name; uint32_t offset; @@ -206,7 +203,6 @@ extern "C" #endif inkcoreapi void ink_atomiclist_init(InkAtomicList * l, const char *name, uint32_t offset_to_next); -#if !defined(INK_USE_MUTEX_FOR_ATOMICLISTS) inkcoreapi void *ink_atomiclist_push(InkAtomicList * l, void *item); void *ink_atomiclist_pop(InkAtomicList * l); inkcoreapi void *ink_atomiclist_popall(InkAtomicList * l); @@ -217,47 +213,7 @@ extern "C" * WARNING WARNING WARNING WARNING WARNING WARNING WARNING */ void *ink_atomiclist_remove(InkAtomicList * l, void *item); -#else /* INK_USE_MUTEX_FOR_ATOMICLISTS */ - void *ink_atomiclist_push_wrap(InkAtomicList * l, void *item); - static inline void *ink_atomiclist_push(InkAtomicList * l, void *item) - { - void *ret_value = NULL; - ink_mutex_acquire(&(l->inkatomiclist_mutex)); - ret_value = ink_atomiclist_push_wrap(l, item); - ink_mutex_release(&(l->inkatomiclist_mutex)); - return ret_value; - } - - void *ink_atomiclist_pop_wrap(InkAtomicList * l); - static inline void *ink_atomiclist_pop(InkAtomicList * l) - { - void *ret_value = NULL; - ink_mutex_acquire(&(l->inkatomiclist_mutex)); - ret_value = ink_atomiclist_pop_wrap(l); - ink_mutex_release(&(l->inkatomiclist_mutex)); - return ret_value; - } - - void *ink_atomiclist_popall_wrap(InkAtomicList * l); - static inline void *ink_atomiclist_popall(InkAtomicList * l) - { - void *ret_value = NULL; - ink_mutex_acquire(&(l->inkatomiclist_mutex)); - ret_value = ink_atomiclist_popall_wrap(l); - ink_mutex_release(&(l->inkatomiclist_mutex)); - return ret_value; - } - - void *ink_atomiclist_remove_wrap(InkAtomicList * l, void *item); - static inline void *ink_atomiclist_remove(InkAtomicList * l, void *item) - { - void *ret_value = NULL; - ink_mutex_acquire(&(l->inkatomiclist_mutex)); - ret_value = ink_atomiclist_remove_wrap(l, item); - ink_mutex_release(&(l->inkatomiclist_mutex)); - return ret_value; - } -#endif /* INK_USE_MUTEX_FOR_ATOMICLISTS */ + #ifdef __cplusplus } #endif /* __cplusplus */ http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/CacheControl.cc ---------------------------------------------------------------------- diff --git a/proxy/CacheControl.cc b/proxy/CacheControl.cc index 91913b2..3031531 100644 --- a/proxy/CacheControl.cc +++ b/proxy/CacheControl.cc @@ -49,7 +49,6 @@ #include "StatSystem.h" #include "P_Cache.h" -#ifndef INK_NO_ACL static const char modulePrefix[] = "[CacheControl]"; # define TWEAK_CACHE_RESPONSES_TO_COOKIES "cache-responses-to-cookies" @@ -501,22 +500,3 @@ CacheControlRecord::UpdateMatch(CacheControlResult * result, RequestData * rdata this->line_num, crtc_debug); } } -#else -#include "CacheControl.h" - -void -CacheControlRecord::Print() -{ -} - -char * -CacheControlRecord::Init(matcher_line * line_info) -{ - return NULL; -} - -void -CacheControlRecord::UpdateMatch(CacheControlResult * result, RequestData * rdata) -{ -} -#endif // INK_NO_ACL http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/ControlMatcher.cc ---------------------------------------------------------------------- diff --git a/proxy/ControlMatcher.cc b/proxy/ControlMatcher.cc index 8bd98a6..6680d69 100644 --- a/proxy/ControlMatcher.cc +++ b/proxy/ControlMatcher.cc @@ -1013,22 +1013,18 @@ template class UrlMatcher<ParentRecord, ParentResult>; template class IpMatcher<ParentRecord, ParentResult>; template class HostRegexMatcher<ParentRecord, ParentResult>; -#ifndef INK_NO_HOSTDB template class ControlMatcher<SplitDNSRecord, SplitDNSResult>; template class HostMatcher<SplitDNSRecord, SplitDNSResult>; template class RegexMatcher<SplitDNSRecord, SplitDNSResult>; template class UrlMatcher<SplitDNSRecord, SplitDNSResult>; template class IpMatcher<SplitDNSRecord, SplitDNSResult>; template class HostRegexMatcher<SplitDNSRecord, SplitDNSResult>; -#endif -#ifndef INK_NO_ACL template class ControlMatcher<CacheControlRecord, CacheControlResult>; template class HostMatcher<CacheControlRecord, CacheControlResult>; template class RegexMatcher<CacheControlRecord, CacheControlResult>; template class UrlMatcher<CacheControlRecord, CacheControlResult>; template class IpMatcher<CacheControlRecord, CacheControlResult>; -#endif template class ControlMatcher<CongestionControlRecord, CongestionControlRule>; template class HostMatcher<CongestionControlRecord, CongestionControlRule>; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/ControlMatcher.h ---------------------------------------------------------------------- diff --git a/proxy/ControlMatcher.h b/proxy/ControlMatcher.h index 8063e58..c6f1c1b 100644 --- a/proxy/ControlMatcher.h +++ b/proxy/ControlMatcher.h @@ -173,9 +173,7 @@ public: int getNumElements() { return num_el; } Data *getDataArray() { return data_array; } -#ifndef TS_MICRO protected: -#endif InkHashTable *url_ht; char **url_str; // array of url strings int *url_value; // array of posion of url strings @@ -199,9 +197,7 @@ public: int getNumElements() { return num_el; } Data *getDataArray() { return data_array; } -#ifndef TS_MICRO protected: -#endif pcre** re_array; // array of compiled regexs char **re_str; // array of uncompiled regex strings Data *data_array; // data array. Corresponds to re_array @@ -230,9 +226,7 @@ public: Data *getDataArray() { return data_array; } HostLookup *getHLookup() { return host_lookup; } -#ifndef TS_MICRO private: -#endif static void PrintFunc(void *opaque_data); HostLookup *host_lookup; // Data structure to do the lookups Data *data_array; // array of all data items http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/DynamicStats.h ---------------------------------------------------------------------- diff --git a/proxy/DynamicStats.h b/proxy/DynamicStats.h index ef527c1..056de9d 100644 --- a/proxy/DynamicStats.h +++ b/proxy/DynamicStats.h @@ -99,20 +99,5 @@ _D(cluster_write_lock_misses_stat) _D(cpu_metric_load_percent_stat) _D(cpu_metric_net_loops_per_second_stat) _D(cpu_metric_fds_ready_per_loop_stat) - // - // Dynamic Scheduled Update Stats - // -#ifdef TS_MICRO - // - // Prefetch Stuffer Stats - // -_D(stuffer_total_promises) -_D(stuffer_total_objects) -_D(stuffer_total_bytes_received) -_D(stuffer_open_read_blocks) -_D(stuffer_ram_cache_hits) -_D(stuffer_ram_cache_misses) -_D(stuffer_url_lookup_misses) -_D(stuffer_total_objects_pushed) -#endif + _FOOTER http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/Main.cc ---------------------------------------------------------------------- diff --git a/proxy/Main.cc b/proxy/Main.cc index 438242e..590e4de 100644 --- a/proxy/Main.cc +++ b/proxy/Main.cc @@ -401,18 +401,15 @@ shutdown_system() #define CMD_IN_PROGRESS 2 // task not completed. don't exit static int -cmd_list(char *cmd) +cmd_list(char * /* cmd ATS_UNUSED */) { - (void) cmd; printf("LIST\n\n"); // show hostdb size -#ifndef INK_NO_HOSTDB int h_size = 120000; TS_ReadConfigInteger(h_size, "proxy.config.hostdb.size"); printf("Host Database size:\t%d\n", h_size); -#endif // show cache config information.... @@ -529,9 +526,7 @@ cmd_check_internal(char * /* cmd ATS_UNUSED */, bool fix = false) printf("%s\n\n", n); int res = 0; -#ifndef INK_NO_HOSTDB hostdb_current_interval = (ink_get_based_hrtime() / HRTIME_MINUTE); -#endif //#ifndef INK_NO_ACC // acc.clear_cache(); @@ -543,7 +538,6 @@ cmd_check_internal(char * /* cmd ATS_UNUSED */, bool fix = false) printf("%s, %s failed\n", err, n); return CMD_FAILED; } -#ifndef INK_NO_HOSTDB printf("Host Database\n"); HostDBCache hd; if (hd.start(fix) < 0) { @@ -552,7 +546,6 @@ cmd_check_internal(char * /* cmd ATS_UNUSED */, bool fix = false) } res = hd.check("hostdb.config", fix) < 0 || res; hd.reset(); -#endif if (cacheProcessor.start() < 0) { printf("\nbad cache configuration, %s failed\n", n); @@ -604,7 +597,6 @@ cmd_clear(char *cmd) return CMD_FAILED; } } -#ifndef INK_NO_HOSTDB if (c_hdb || c_all) { Note("Clearing Host Database"); if (hostDBProcessor.cache()->start(PROCESSOR_RECONFIGURE) < 0) { @@ -615,7 +607,6 @@ cmd_clear(char *cmd) if (c_hdb) return CMD_OK; } -#endif //#ifndef INK_NO_ACC // if (c_adb || c_all) { @@ -1549,9 +1540,7 @@ main(int /* argc ATS_UNUSED */, char **argv) _exit(1); // in error } } else { -#ifndef INK_NO_ACL initCacheControl(); -#endif initCongestionControl(); IpAllow::startup(); ParentConfig::startup(); @@ -1572,20 +1561,13 @@ main(int /* argc ATS_UNUSED */, char **argv) sslNetProcessor.start(getNumSSLThreads(), stacksize); -#ifndef INK_NO_HOSTDB dnsProcessor.start(0, stacksize); if (hostDBProcessor.start() < 0) SignalWarning(MGMT_SIGNAL_SYSTEM_ERROR, "bad hostdb or storage configuration, hostdb disabled"); -#endif - -#ifndef INK_NO_CLUSTER clusterProcessor.init(); -#endif -#ifndef INK_NO_LOG // initialize logging (after event and net processor) Log::init(remote_management_flag ? 0 : Log::NO_REMOTE_MANAGEMENT); -#endif // Init plugins as soon as logging is ready. plugin_init(system_config_directory); // plugin.config @@ -1639,10 +1621,9 @@ main(int /* argc ATS_UNUSED */, char **argv) TS_ReadConfigInteger(http_enabled, "proxy.config.http.enabled"); if (http_enabled) { -#ifndef INK_NO_ICP int icp_enabled = 0; TS_ReadConfigInteger(icp_enabled, "proxy.config.icp.enabled"); -#endif + // call the ready hooks before we start accepting connections. APIHook* hook = lifecycle_hooks->get(TS_LIFECYCLE_PORTS_INITIALIZED_HOOK); while (hook) { @@ -1660,10 +1641,8 @@ main(int /* argc ATS_UNUSED */, char **argv) } else { start_HttpProxyServer(); // PORTS_READY_HOOK called from in here } -#ifndef INK_NO_ICP if (icp_enabled) icpProcessor.start(); -#endif } // "Task" processor, possibly with its own set of task threads @@ -1674,11 +1653,10 @@ main(int /* argc ATS_UNUSED */, char **argv) if (back_door_port != NO_FD) start_HttpProxyServerBackDoor(back_door_port, num_accept_threads > 0 ? 1 : 0); // One accept thread is enough -#ifndef INK_NO_SOCKS if (netProcessor.socks_conf_stuff->accept_enabled) { start_SocksProxy(netProcessor.socks_conf_stuff->accept_port); } -#endif + /////////////////////////////////////////// // Initialize Scheduled Update subsystem /////////////////////////////////////////// @@ -1694,9 +1672,7 @@ main(int /* argc ATS_UNUSED */, char **argv) #if TS_HAS_TESTS TransformTest::run(); -#ifndef INK_NO_HOSTDB run_HostDBTest(); -#endif // run_SimpleHttp(); run_RegressionTest(); #endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/http/HttpBodyFactory.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpBodyFactory.cc b/proxy/http/HttpBodyFactory.cc index 8ab5c7c..bdd0448 100644 --- a/proxy/http/HttpBodyFactory.cc +++ b/proxy/http/HttpBodyFactory.cc @@ -1005,7 +1005,7 @@ char * HttpBodyTemplate::build_instantiated_buffer(HttpTransact::State * context, int64_t *buflen_return) { char *buffer = NULL; -#ifndef INK_NO_LOG + Debug("body_factory_instantiation", " before instantiation: [%s]", template_buffer); LogAccessHttp la(context->state_machine); @@ -1016,8 +1016,7 @@ HttpBodyTemplate::build_instantiated_buffer(HttpTransact::State * context, int64 *buflen_return = ((buffer == NULL) ? 0 : strlen(buffer)); Debug("body_factory_instantiation", " after instantiation: [%s]", buffer); - Debug("body_factory", " returning %" PRId64" byte instantiated buffer", *buflen_return); -#endif + return (buffer); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/http/HttpPages.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpPages.cc b/proxy/http/HttpPages.cc index 699fc45..ad4f65e 100644 --- a/proxy/http/HttpPages.cc +++ b/proxy/http/HttpPages.cc @@ -30,7 +30,6 @@ ****************************************************************************/ -#ifndef INK_NO_STAT_PAGES #include "HttpPages.h" #include "HttpSM.h" #include "HttpDebugNames.h" @@ -479,11 +478,3 @@ http_pages_init() } } -#else //INK_NO_STAT_PAGES -void -http_pages_init() -{ - return; -} - -#endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/http/HttpPages.h ---------------------------------------------------------------------- diff --git a/proxy/http/HttpPages.h b/proxy/http/HttpPages.h index e6b2bf8..6ee7ef5 100644 --- a/proxy/http/HttpPages.h +++ b/proxy/http/HttpPages.h @@ -34,7 +34,6 @@ #ifndef _HTTP_PAGES_H_ #define _HTTP_PAGES_H_ -#ifndef INK_NO_STAT_PAGES #include "libts.h" #include "P_EventSystem.h" #include "DynArray.h" @@ -87,8 +86,6 @@ private: int64_t sm_id; }; -#endif //INK_NO_STAT_PAGES - void http_pages_init(); #endif http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/http/HttpSessionManager.h ---------------------------------------------------------------------- diff --git a/proxy/http/HttpSessionManager.h b/proxy/http/HttpSessionManager.h index ba4361e..de59bac 100644 --- a/proxy/http/HttpSessionManager.h +++ b/proxy/http/HttpSessionManager.h @@ -43,13 +43,8 @@ class HttpSM; void initialize_thread_for_http_sessions(EThread *thread, int thread_index); -#ifndef TS_MICRO #define HSM_LEVEL1_BUCKETS 127 #define HSM_LEVEL2_BUCKETS 63 -#else -#define HSM_LEVEL1_BUCKETS 7 -#define HSM_LEVEL2_BUCKETS 3 -#endif class SessionBucket: public Continuation { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 42e0b38..4dfaaf7 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2534,7 +2534,6 @@ HttpTransact::HandleCacheOpenReadHit(State* s) DebugTxn("http_seq", "[HttpTransact::HandleCacheOpenReadHit] " "Revalidate document with server"); -#ifndef INK_NO_ICP if (s->http_config_param->icp_enabled && icp_dynamic_enabled && s->http_config_param->stale_icp_enabled && needs_authenticate == false && needs_cache_auth == false && !s->hdr_info.client_request.is_pragma_no_cache_set() && @@ -2554,7 +2553,6 @@ HttpTransact::HandleCacheOpenReadHit(State* s) update_current_info(&s->current, &s->icp_info, HttpTransact::ICP_SUGGESTED_HOST, 1); } -#endif //INK_NO_ICP if (s->stale_icp_lookup == false) { find_server_and_update_current_info(s); @@ -2985,7 +2983,6 @@ HttpTransact::HandleCacheOpenReadMiss(State* s) } -#ifndef INK_NO_ICP /////////////////////////////////////////////////////////////////////////////// // Name : HandleICPLookup // Description: @@ -3059,7 +3056,6 @@ HttpTransact::HandleICPLookup(State* s) return; } -#endif //INK_NO_ICP /////////////////////////////////////////////////////////////////////////////// @@ -3170,11 +3166,9 @@ HttpTransact::HandleResponse(State* s) } switch (s->current.request_to) { -#ifndef INK_NO_ICP case ICP_SUGGESTED_HOST: handle_response_from_icp_suggested_host(s); break; -#endif case PARENT_PROXY: handle_response_from_parent(s); break; @@ -3275,7 +3269,6 @@ HttpTransact::HandleStatPage(State* s) s->next_action = PROXY_INTERNAL_CACHE_NOOP; } -#ifndef INK_NO_ICP /////////////////////////////////////////////////////////////////////////////// // Name : handle_response_from_icp_suggested_host // Description: response came from the host suggested by the icp lookup @@ -3333,7 +3326,6 @@ HttpTransact::handle_response_from_icp_suggested_host(State* s) break; } } -#endif //INK_NO_ICP /////////////////////////////////////////////////////////////////////////////// @@ -3760,7 +3752,6 @@ HttpTransact::handle_forward_server_connection_open(State* s) return; } -#ifndef INK_NO_HOSTDB else if (s->hdr_info.server_response.version_get() == HTTPVersion(1, 0)) { if (s->current.server->http_version == HTTPVersion(0, 9)) { // update_hostdb_to_indicate_server_version_is_1_0 @@ -3781,9 +3772,7 @@ HttpTransact::handle_forward_server_connection_open(State* s) } else { // dont update the hostdb. let us try again with what we currently think. } - } -#endif - else { + } else { // dont update the hostdb. let us try again with what we currently think. } @@ -5283,10 +5272,6 @@ HttpTransact::did_forward_server_send_0_9_response(State* s) bool HttpTransact::handle_internal_request(State* /* s ATS_UNUSED */, HTTPHdr* incoming_hdr) { -#ifdef INK_NO_STAT_PAGES - return false; -#else - URL *url; ink_assert(incoming_hdr->type_get() == HTTP_TYPE_REQUEST); @@ -5307,7 +5292,6 @@ HttpTransact::handle_internal_request(State* /* s ATS_UNUSED */, HTTPHdr* incomi } return true; -#endif //INK_NO_STAT_PAGES } bool http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/Log.h ---------------------------------------------------------------------- diff --git a/proxy/logging/Log.h b/proxy/logging/Log.h index 3dd8ce4..c6b4af7 100644 --- a/proxy/logging/Log.h +++ b/proxy/logging/Log.h @@ -353,7 +353,6 @@ public: // main interface static void init(int configFlags = 0); static void init_fields(); -#ifndef INK_NO_LOG inkcoreapi static bool transaction_logging_enabled() { return (logging_mode == FULL_LOGGING || logging_mode == LOG_TRANSACTIONS_ONLY); @@ -366,12 +365,6 @@ public: inkcoreapi static int access(LogAccess * lad); inkcoreapi static int error(const char *format, ...); -#else - static int error(char *format, ...) - { - return LOG_OK; - } -#endif inkcoreapi static int va_error(char *format, va_list ap); // public data members http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogAccess.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogAccess.h b/proxy/logging/LogAccess.h index 1f574e7..c54cf93 100644 --- a/proxy/logging/LogAccess.h +++ b/proxy/logging/LogAccess.h @@ -26,7 +26,6 @@ ***************************************************************************/ -#if !defined (INK_NO_LOG) #ifndef LOG_ACCESS_H #define LOG_ACCESS_H #include "libts.h" @@ -360,4 +359,3 @@ LogAccess::marshal_int(char *dest, int64_t source) char *resolve_logfield_string(LogAccess * context, const char *format_str); #endif -#endif // INK_NO_LOG http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogAccessHttp.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogAccessHttp.h b/proxy/logging/LogAccessHttp.h index 52212b2..0568e4e 100644 --- a/proxy/logging/LogAccessHttp.h +++ b/proxy/logging/LogAccessHttp.h @@ -26,7 +26,6 @@ #ifndef LOG_ACCESS_HTTP_H #define LOG_ACCESS_HTTP_H -#if !defined (INK_NO_LOG) #include "Arena.h" #include "HTTP.h" #include "LogAccess.h" @@ -170,4 +169,3 @@ private: }; #endif -#endif //INK_NO_LOG http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogAccessICP.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogAccessICP.cc b/proxy/logging/LogAccessICP.cc index 0b66375..ebdd0df 100644 --- a/proxy/logging/LogAccessICP.cc +++ b/proxy/logging/LogAccessICP.cc @@ -31,7 +31,6 @@ ***************************************************************************/ -#ifndef TS_MICRO #include "libts.h" #include "Error.h" #include "HTTP.h" @@ -45,7 +44,7 @@ -------------------------------------------------------------------------*/ LogAccessICP::LogAccessICP(ICPlog * icp_log) -:m_icp_log(icp_log) + : m_icp_log(icp_log) { ink_assert(m_icp_log != NULL); } @@ -279,4 +278,3 @@ LogAccessICP::marshal_transfer_time_s(char *buf) } return INK_MIN_ALIGN; } -#endif // TS_MICRO http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogBuffer.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogBuffer.h b/proxy/logging/LogBuffer.h index fc33374..31ee951 100644 --- a/proxy/logging/LogBuffer.h +++ b/proxy/logging/LogBuffer.h @@ -22,7 +22,6 @@ */ -#if !defined (INK_NO_LOG) #ifndef LOG_BUFFER_H #define LOG_BUFFER_H @@ -313,7 +312,4 @@ inline LogBufferIterator::~LogBufferIterator() { } - - #endif -#endif //INK_NO_LOG http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogCollationClientSM.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogCollationClientSM.cc b/proxy/logging/LogCollationClientSM.cc index 426a84d..6ce02b4 100644 --- a/proxy/logging/LogCollationClientSM.cc +++ b/proxy/logging/LogCollationClientSM.cc @@ -122,10 +122,8 @@ LogCollationClientSM::client_handler(int event, void *data) switch (m_client_state) { case LOG_COLL_CLIENT_AUTH: return client_auth(event, (VIO *) data); -#ifndef INK_NO_HOSTDB case LOG_COLL_CLIENT_DNS: return client_dns(event, (HostDBInfo *) data); -#endif case LOG_COLL_CLIENT_DONE: return client_done(event, data); case LOG_COLL_CLIENT_FAIL: @@ -287,12 +285,10 @@ LogCollationClientSM::client_auth(int event, VIO * /* vio ATS_UNUSED */) } } -#ifndef INK_NO_HOSTDB //------------------------------------------------------------------------- // LogCollationClientSM::client_dns // next: client_open || client_done //------------------------------------------------------------------------- - int LogCollationClientSM::client_dns(int event, HostDBInfo * hostdb_info) { @@ -324,7 +320,6 @@ LogCollationClientSM::client_dns(int event, HostDBInfo * hostdb_info) } } -#endif // INK_NO_HOSTDB //------------------------------------------------------------------------- // LogCollationClientSM::client_done @@ -351,10 +346,8 @@ LogCollationClientSM::client_done(int event, void * /* data ATS_UNUSED */) m_host_vc->do_io_close(0); m_host_vc = 0; } -#ifndef TS_MICRO // flush unsent logs to orphan flush_to_orphan(); -#endif // cancel any pending events/actions if (m_pending_action != NULL) { @@ -509,21 +502,7 @@ LogCollationClientSM::client_init(int event, void * /* data ATS_UNUSED */) // if we don't have an ip already, switch to client_dns if (! m_log_host->ip_addr().isValid()) { -#ifndef INK_NO_HOSTDB return client_dns(LOG_COLL_EVENT_SWITCH, NULL); -#else - if (m_log_host->m_name == 0) - return client_done(LOG_COLL_EVENT_SWITCH, NULL); - - IpEndpoint ip4, ip6; - // Previous version called gethostbyname and just dereferenced - // the return. I don't know what should be done if this fails. - m_log_host->m_ip.invalidate(); - ats_ip_getbestaddrinfo(m_log_host->m_name, &ip4, &ip6); - m_log_host->m_ip.assign(ip4.isValid() ? &ip4 : &ip6); - m_log_host->m_ip.toString(m_log_host->ipstr, sizeof(m_log_host->m_ipstr)); - return client_open(LOG_COLL_EVENT_SWITCH, NULL); -#endif } else { return client_open(LOG_COLL_EVENT_SWITCH, NULL); } @@ -719,7 +698,6 @@ LogCollationClientSM::client_send(int event, VIO * /* vio ATS_UNUSED */) //------------------------------------------------------------------------- //------------------------------------------------------------------------- -#ifndef TS_MICRO //------------------------------------------------------------------------- // LogCollationClientSM::flush_to_orphan //------------------------------------------------------------------------- @@ -748,4 +726,3 @@ LogCollationClientSM::flush_to_orphan() Debug("log-coll", "[%d]client::client_send - m_flow = ALLOW", m_id); m_flow = LOG_COLL_FLOW_ALLOW; } -#endif // TS_MICRO http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogCollationClientSM.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogCollationClientSM.h b/proxy/logging/LogCollationClientSM.h index 9428bf5..594e61c 100644 --- a/proxy/logging/LogCollationClientSM.h +++ b/proxy/logging/LogCollationClientSM.h @@ -27,9 +27,7 @@ //------------------------------------------------------------------------- // includes //------------------------------------------------------------------------- -#ifndef INK_NO_HOSTDB #include "P_HostDB.h" -#endif #include "P_Net.h" #include "LogCollationBase.h" @@ -81,9 +79,7 @@ private: // client states int client_auth(int event, VIO * vio); -#ifndef INK_NO_HOSTDB int client_dns(int event, HostDBInfo * hostdb_info); -#endif int client_done(int event, void *data); int client_fail(int event, void *data); int client_idle(int event, void *data); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogFile.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogFile.h b/proxy/logging/LogFile.h index f3d6912..09c6660 100644 --- a/proxy/logging/LogFile.h +++ b/proxy/logging/LogFile.h @@ -127,11 +127,7 @@ class LogFile:public LogBufferSink { public: LogFile(const char *name, const char *header, LogFileFormat format, uint64_t signature, -#ifndef TS_MICRO size_t ascii_buffer_size = 4 * 9216, size_t max_line_size = 9216, -#else - size_t ascii_buffer_size = 1024, size_t max_line_size = 1024, -#endif size_t overspill_report_count = 1000); LogFile(const LogFile &); ~LogFile(); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogFormat.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogFormat.cc b/proxy/logging/LogFormat.cc index e95872c..cace523 100644 --- a/proxy/logging/LogFormat.cc +++ b/proxy/logging/LogFormat.cc @@ -325,7 +325,6 @@ LogFormat::~LogFormat() m_valid = false; } -#ifndef TS_MICRO /*------------------------------------------------------------------------- LogFormat::format_from_specification @@ -473,7 +472,6 @@ LogFormat::format_from_specification(char *spec, char **file_name, char **file_h return format; } -#endif // TS_MICRO /*------------------------------------------------------------------------- LogFormat::parse_symbol_string http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogHost.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogHost.cc b/proxy/logging/LogHost.cc index 3f7bef9..7804f68 100644 --- a/proxy/logging/LogHost.cc +++ b/proxy/logging/LogHost.cc @@ -330,17 +330,11 @@ LogHost::write (LogBuffer *lb) // send log_buffer; orphan if necessary int bytes_sent = m_log_collation_client_sm->send(lb_copy); if (bytes_sent <= 0) { -#ifndef TS_MICRO orphan_write_and_delete(lb_copy); #if defined(LOG_BUFFER_TRACKING) Debug("log-buftrak", "[%d]LogHost::write - orphan write complete", lb_copy->header()->id); #endif // defined(LOG_BUFFER_TRACKING) -#else - Note("Starting dropping log buffer due to overloading"); - delete lb_copy; - lb_copy = 0; -#endif // TS_MICRO } return bytes_sent; @@ -348,7 +342,6 @@ LogHost::write (LogBuffer *lb) #endif // !defined(IOCORE_LOG_COLLATION) } -#ifndef TS_MICRO int LogHost::orphan_write(LogBuffer * lb) { @@ -369,7 +362,6 @@ LogHost::orphan_write_and_delete(LogBuffer * lb) lb = 0; return bytes; } -#endif // TS_MICRO void LogHost::display(FILE * fd) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogObject.cc ---------------------------------------------------------------------- diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc index fcde79d..fd12e64 100644 --- a/proxy/logging/LogObject.cc +++ b/proxy/logging/LogObject.cc @@ -106,7 +106,6 @@ LogObject::LogObject(LogFormat *format, const char *log_dir, // compute_signature is a static function m_signature = compute_signature(m_format, m_basename, m_flags); -#ifndef TS_MICRO // by default, create a LogFile for this object, if a loghost is // later specified, then we will delete the LogFile object // @@ -115,7 +114,6 @@ LogObject::LogObject(LogFormat *format, const char *log_dir, Log::config->ascii_buffer_size, Log::config->max_line_size, Log::config->overspill_report_count)); -#endif // TS_MICRO LogBuffer *b = NEW (new LogBuffer (this, Log::config->log_buffer_size)); ink_assert(b); @@ -139,15 +137,11 @@ LogObject::LogObject(LogObject& rhs) { m_format = new LogFormat(*(rhs.m_format)); -#ifndef TS_MICRO if (rhs.m_logFile) { m_logFile = NEW (new LogFile(*(rhs.m_logFile))); } else { -#endif m_logFile = NULL; -#ifndef TS_MICRO } -#endif LogFilter *filter; for (filter = rhs.m_filter_list.first(); filter; @@ -357,21 +351,16 @@ LogObject::display(FILE * fd) fprintf(fd, "LogObject [%p]: format = %s (%p)\nbasename = %s\n" "flags = %u\n" "signature = %" PRIu64 "\n", this, m_format->name(), m_format, m_basename, m_flags, m_signature); -#ifndef TS_MICRO if (is_collation_client()) { m_host_list.display(fd); } else { -#endif // TS_MICRO fprintf(fd, "full path = %s\n", get_full_filename()); -#ifndef TS_MICRO } -#endif // TS_MICRO m_filter_list.display(fd); fprintf(fd, "++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); } -#ifndef TS_MICRO void LogObject::displayAsXML(FILE * fd, bool extended) { @@ -399,7 +388,6 @@ LogObject::displayAsXML(FILE * fd, bool extended) fprintf(fd, "</LogObject>\n"); } -#endif // TS_MICRO LogBuffer * @@ -996,7 +984,6 @@ LogObjectManager::_solve_filename_conflicts(LogObject * log_object, int maxConfl { int retVal = NO_FILENAME_CONFLICTS; -#ifndef TS_MICRO char *filename = log_object->get_full_filename(); if (access(filename, F_OK)) { @@ -1092,12 +1079,10 @@ LogObjectManager::_solve_filename_conflicts(LogObject * log_object, int maxConfl } } } -#endif // TS_MICRO return retVal; } -#ifndef TS_MICRO bool LogObjectManager::_has_internal_filename_conflict(char *filename, LogObject ** objects, int numObjects) { @@ -1116,15 +1101,12 @@ LogObjectManager::_has_internal_filename_conflict(char *filename, LogObject ** o } return false; } -#endif // TS_MICRO int LogObjectManager::_solve_internal_filename_conflicts(LogObject *log_object, int maxConflicts, int fileNum) { int retVal = NO_FILENAME_CONFLICTS; - -#ifndef TS_MICRO char *filename = log_object->get_full_filename(); if (_has_internal_filename_conflict(filename, _objects, _numObjects) || @@ -1144,7 +1126,6 @@ LogObjectManager::_solve_internal_filename_conflicts(LogObject *log_object, int retVal = CANNOT_SOLVE_FILENAME_CONFLICTS; } } -#endif // TS_MICRO return retVal; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b4d411e0/proxy/logging/LogObject.h ---------------------------------------------------------------------- diff --git a/proxy/logging/LogObject.h b/proxy/logging/LogObject.h index 924e9b0..8e96c72 100644 --- a/proxy/logging/LogObject.h +++ b/proxy/logging/LogObject.h @@ -221,9 +221,7 @@ private: void generate_filenames(const char *log_dir, const char *basename, LogFileFormat file_format); void _setup_rolling(int rolling_enabled, int rolling_interval_sec, int rolling_offset_hr, int rolling_size_mb); -#ifndef TS_MICRO int _roll_files(long interval_start, long interval_end); -#endif LogBuffer *_checkout_write(size_t * write_offset, size_t write_size); @@ -311,9 +309,7 @@ public: private: int _manage_object(LogObject * log_object, bool is_api_object, int maxConflicts); -#ifndef TS_MICRO static bool _has_internal_filename_conflict(char *filename, LogObject ** objects, int numObjects); -#endif // TS_MICRO int _solve_filename_conflicts(LogObject * log_obj, int maxConflicts); int _solve_internal_filename_conflicts(LogObject * log_obj, int maxConflicts, int fileNum = 0); void _add_object(LogObject * object);
