Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

TS-1685 Remove TS_MICRO and fellas

  • Loading branch information...
commit b4d411e07953fd3a7f9bea60f4c822360658a1aa 1 parent 7485e0b
@zwoop zwoop authored
Showing with 13 additions and 335 deletions.
  1. +0 −4 iocore/cluster/ClusterMachine.cc
  2. +0 −2  iocore/cluster/P_ClusterMachine.h
  3. +0 −12 iocore/eventsystem/I_IOBuffer.h
  4. +0 −2  iocore/eventsystem/UnixEventProcessor.cc
  5. +0 −2  iocore/hostdb/include/Machine.h
  6. +0 −2  iocore/net/Net.cc
  7. +3 −12 iocore/net/UnixNetProcessor.cc
  8. +0 −16 lib/ts/ink_config.h.in
  9. +1 −46 lib/ts/ink_queue.cc
  10. +1 −45 lib/ts/ink_queue.h
  11. +0 −20 proxy/CacheControl.cc
  12. +0 −4 proxy/ControlMatcher.cc
  13. +0 −6 proxy/ControlMatcher.h
  14. +1 −16 proxy/DynamicStats.h
  15. +3 −27 proxy/Main.cc
  16. +2 −3 proxy/http/HttpBodyFactory.cc
  17. +0 −9 proxy/http/HttpPages.cc
  18. +0 −3  proxy/http/HttpPages.h
  19. +0 −5 proxy/http/HttpSessionManager.h
  20. +1 −17 proxy/http/HttpTransact.cc
  21. +0 −7 proxy/logging/Log.h
  22. +0 −2  proxy/logging/LogAccess.h
  23. +0 −2  proxy/logging/LogAccessHttp.h
  24. +1 −3 proxy/logging/LogAccessICP.cc
  25. +0 −4 proxy/logging/LogBuffer.h
  26. +0 −23 proxy/logging/LogCollationClientSM.cc
  27. +0 −4 proxy/logging/LogCollationClientSM.h
  28. +0 −4 proxy/logging/LogFile.h
  29. +0 −2  proxy/logging/LogFormat.cc
  30. +0 −8 proxy/logging/LogHost.cc
  31. +0 −19 proxy/logging/LogObject.cc
  32. +0 −4 proxy/logging/LogObject.h
View
4 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
View
2  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();
View
12 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 //
View
2  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
View
2  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
View
2  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,
View
15 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();
View
16 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@
View
47 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;
View
46 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 */
View
20 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
View
4 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>;
View
6 proxy/ControlMatcher.h
@@ -173,9 +173,7 @@ template<class Data, class Result> class UrlMatcher {
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 @@ template<class Data, class Result> class RegexMatcher {
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 @@ template<class Data, class Result> class HostMatcher {
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
View
17 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
View
30 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
View
5 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);
}
View
9 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
View
3  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 @@ class HttpPagesHandler:public BaseStatPagesHandler
int64_t sm_id;
};
-#endif //INK_NO_STAT_PAGES
-
void http_pages_init();
#endif
View
5 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
{
View
18 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
View
7 proxy/logging/Log.h
@@ -353,7 +353,6 @@ class Log
// 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 @@ class Log
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
View
2  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
View
2  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 @@ class LogAccessHttp:public LogAccess
};
#endif
-#endif //INK_NO_LOG
View
4 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
View
4 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
View
23 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
View
4 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 @@ class LogCollationClientSM:public LogCollationBase, public Continuation
// 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);
View
4 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();
View
2  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
View
8 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)
View
19 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;
}
View
4 proxy/logging/LogObject.h
@@ -221,9 +221,7 @@ class LogObject
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 @@ class LogObjectManager
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);
Please sign in to comment.
Something went wrong with that request. Please try again.