MCPcopy Create free account
hub / github.com/apache/trafficserver / ink_event_system_init

Function ink_event_system_init

src/iocore/eventsystem/EventSystem.cc:35–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "records/RecCore.h"
34
35void
36ink_event_system_init(ts::ModuleVersion v)
37{
38 ink_release_assert(v.check(EVENT_SYSTEM_MODULE_INTERNAL_VERSION));
39 int iobuffer_advice = 0;
40
41 // For backwards compatibility make sure to allow thread_freelist_size
42 // This needs to change in 6.0
43 REC_EstablishStaticConfigInt32(thread_freelist_high_watermark, "proxy.config.allocator.thread_freelist_size");
44
45 REC_EstablishStaticConfigInt32(thread_freelist_low_watermark, "proxy.config.allocator.thread_freelist_low_watermark");
46
47 int chunk_sizes[DEFAULT_BUFFER_SIZES] = {0};
48 char *chunk_sizes_string = REC_ConfigReadString("proxy.config.allocator.iobuf_chunk_sizes");
49 if (chunk_sizes_string && !parse_buffer_chunk_sizes(chunk_sizes_string, chunk_sizes)) {
50 // If we can't parse the string then we can't be sure of the chunk sizes so just exit
51 Fatal("Failed to parse proxy.config.allocator.iobuf_chunk_sizes");
52 }
53 ats_free(chunk_sizes_string);
54
55 bool use_hugepages = ats_hugepage_enabled();
56
57#ifdef MADV_DONTDUMP // This should only exist on Linux 3.4 and higher.
58 RecBool dont_dump_enabled = true;
59 RecGetRecordBool("proxy.config.allocator.dontdump_iobuffers", &dont_dump_enabled, false);
60
61 if (dont_dump_enabled) {
62 iobuffer_advice |= MADV_DONTDUMP;
63 }
64#endif
65
66 init_buffer_allocators(iobuffer_advice, chunk_sizes, use_hugepages);
67}

Callers 15

testRunStartingMethod · 0.85
mainFunction · 0.85
testRunStartingMethod · 0.85
testRunStartingMethod · 0.85
mainFunction · 0.85
udp_echo_serverFunction · 0.85
mainFunction · 0.85
testRunStartingMethod · 0.85
testRunStartingMethod · 0.85
mainFunction · 0.85
testRunStartingMethod · 0.85
testFunction · 0.85

Calls 7

REC_ConfigReadStringFunction · 0.85
parse_buffer_chunk_sizesFunction · 0.85
ats_freeFunction · 0.85
ats_hugepage_enabledFunction · 0.85
RecGetRecordBoolFunction · 0.85
init_buffer_allocatorsFunction · 0.85
checkMethod · 0.45

Tested by 15

mainFunction · 0.68
testRunStartingMethod · 0.68
testRunStartingMethod · 0.68
mainFunction · 0.68
udp_echo_serverFunction · 0.68
mainFunction · 0.68
testRunStartingMethod · 0.68
testRunStartingMethod · 0.68
mainFunction · 0.68
testRunStartingMethod · 0.68
testFunction · 0.68
testRunStartingMethod · 0.68