Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions iocore/eventsystem/I_Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class Thread
ProxyAllocator http1ClientSessionAllocator;
ProxyAllocator http2ClientSessionAllocator;
ProxyAllocator http2StreamAllocator;
ProxyAllocator httpSMAllocator;
ProxyAllocator quicClientSessionAllocator;
ProxyAllocator httpServerSessionAllocator;
ProxyAllocator hdrHeapAllocator;
Expand Down
4 changes: 3 additions & 1 deletion proxy/ProxyTransaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

#define HttpTxnDebug(fmt, ...) SsnDebug(this, "http_txn", fmt, __VA_ARGS__)

extern ClassAllocator<HttpSM> httpSMAllocator;

ProxyTransaction::ProxyTransaction(ProxySession *session) : VConnection(nullptr), _proxy_ssn(session) {}

ProxyTransaction::~ProxyTransaction()
Expand All @@ -43,7 +45,7 @@ ProxyTransaction::new_transaction(bool from_early_data)
// connection re-use

ink_release_assert(_proxy_ssn != nullptr);
_sm = HttpSM::allocate();
_sm = THREAD_ALLOC(httpSMAllocator, this_thread());
_sm->init(from_early_data);
HttpTxnDebug("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]", _proxy_ssn->connection_id(),
_proxy_ssn->get_transact_count(), _sm->sm_id);
Expand Down
2 changes: 1 addition & 1 deletion proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void
HttpSM::destroy()
{
cleanup();
httpSMAllocator.free(this);
THREAD_FREE(this, httpSMAllocator, this_thread());
}

void
Expand Down
7 changes: 0 additions & 7 deletions proxy/http/HttpSM.h
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,6 @@ HttpSM::get_cache_sm()
return cache_sm;
}

inline HttpSM *
HttpSM::allocate()
{
extern ClassAllocator<HttpSM> httpSMAllocator;
return httpSMAllocator.alloc();
}

inline int
HttpSM::write_response_header_into_buffer(HTTPHdr *h, MIOBuffer *b)
{
Expand Down
6 changes: 4 additions & 2 deletions src/traffic_server/InkAPITest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8696,11 +8696,13 @@ std::array<std::string_view, TS_CONFIG_LAST_ENTRY> SDK_Overridable_Configs = {
"proxy.config.hostdb.ip_resolve",
"proxy.config.http.connect.dead.policy"}};

extern ClassAllocator<HttpSM> httpSMAllocator;

REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
TSOverridableConfigKey key;
TSRecordDataType type;
HttpSM *s = HttpSM::allocate();
HttpSM *s = THREAD_ALLOC(httpSMAllocator, this_thread());
bool success = true;
TSHttpTxn txnp = reinterpret_cast<TSHttpTxn>(s);
InkRand generator(17);
Expand Down Expand Up @@ -8804,7 +8806,7 @@ REGRESSION_TEST(SDK_API_OVERRIDABLE_CONFIGS)(RegressionTest *test, int /* atype

REGRESSION_TEST(SDK_API_TXN_HTTP_INFO_GET)(RegressionTest *test, int /* atype ATS_UNUSED */, int *pstatus)
{
HttpSM *s = HttpSM::allocate();
HttpSM *s = THREAD_ALLOC(httpSMAllocator, this_thread());
bool success = true;
TSHttpTxn txnp = reinterpret_cast<TSHttpTxn>(s);
TSMgmtInt ival_read;
Expand Down