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
3 changes: 1 addition & 2 deletions proxy/http/Http1ClientSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ink_mutex debug_cs_list_mutex;

#endif /* USE_HTTP_DEBUG_LISTS */

ClassAllocator<Http1ClientSession> http1ClientSessionAllocator("http1ClientSessionAllocator");
ClassAllocator<Http1ClientSession, true> http1ClientSessionAllocator("http1ClientSessionAllocator");

Http1ClientSession::Http1ClientSession() : super(), trans(this) {}

Expand Down Expand Up @@ -120,7 +120,6 @@ Http1ClientSession::free()
_vc = nullptr;
}

this->~Http1ClientSession();
THREAD_FREE(this, http1ClientSessionAllocator, this_thread());
}

Expand Down
2 changes: 1 addition & 1 deletion proxy/http/Http1ClientSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ class Http1ClientSession : public ProxySession
Http1Transaction trans;
};

extern ClassAllocator<Http1ClientSession> http1ClientSessionAllocator;
extern ClassAllocator<Http1ClientSession, true> http1ClientSessionAllocator;
3 changes: 1 addition & 2 deletions proxy/http/Http1ServerSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "HttpSessionManager.h"
#include "HttpSM.h"

ClassAllocator<Http1ServerSession> httpServerSessionAllocator("httpServerSessionAllocator");
ClassAllocator<Http1ServerSession, true> httpServerSessionAllocator("httpServerSessionAllocator");

void
Http1ServerSession::destroy()
Expand All @@ -50,7 +50,6 @@ Http1ServerSession::destroy()
}

mutex.clear();
this->~Http1ServerSession();
if (httpSessionManager.get_pool_type() == TS_SERVER_SESSION_SHARING_POOL_THREAD) {
THREAD_FREE(this, httpServerSessionAllocator, this_thread());
} else {
Expand Down
2 changes: 1 addition & 1 deletion proxy/http/Http1ServerSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Http1ServerSession : public PoolableSession
IOBufferReader *buf_reader = nullptr;
};

extern ClassAllocator<Http1ServerSession> httpServerSessionAllocator;
extern ClassAllocator<Http1ServerSession, true> httpServerSessionAllocator;

////////////////////////////////////////////
// INLINE
Expand Down
1 change: 0 additions & 1 deletion proxy/http/HttpSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,6 @@ HttpSM::state_http_server_open(int event, void *data)
Http1ServerSession *session = (TS_SERVER_SESSION_SHARING_POOL_THREAD == httpSessionManager.get_pool_type()) ?
THREAD_ALLOC_INIT(httpServerSessionAllocator, mutex->thread_holding) :
httpServerSessionAllocator.alloc();
new (session) Http1ServerSession();
session->sharing_pool = static_cast<TSServerSessionSharingPoolType>(t_state.http_config_param->server_session_sharing_pool);
session->sharing_match = static_cast<TSServerSessionSharingMatchMask>(t_state.txn_conf->server_session_sharing_match);

Expand Down
1 change: 0 additions & 1 deletion proxy/http/HttpSessionAccept.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ HttpSessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferReade
}

Http1ClientSession *new_session = THREAD_ALLOC_INIT(http1ClientSessionAllocator, this_ethread());
new (new_session) Http1ClientSession();

new_session->accept_options = static_cast<Options *>(this);
new_session->acl = std::move(acl);
Expand Down
3 changes: 1 addition & 2 deletions proxy/http2/Http2ClientSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
this->session_handler = (handler); \
} while (0)

ClassAllocator<Http2ClientSession> http2ClientSessionAllocator("http2ClientSessionAllocator");
ClassAllocator<Http2ClientSession, true> http2ClientSessionAllocator("http2ClientSessionAllocator");

// memcpy the requested bytes from the IOBufferReader, returning how many were
// actually copied.
Expand Down Expand Up @@ -163,7 +163,6 @@ Http2ClientSession::free()

free_MIOBuffer(this->read_buffer);
free_MIOBuffer(this->write_buffer);
this->~Http2ClientSession();
THREAD_FREE(this, http2ClientSessionAllocator, this_ethread());
}

Expand Down
2 changes: 1 addition & 1 deletion proxy/http2/Http2ClientSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Http2ClientSession : public ProxySession
bool cur_frame_from_early_data = false;
};

extern ClassAllocator<Http2ClientSession> http2ClientSessionAllocator;
extern ClassAllocator<Http2ClientSession, true> http2ClientSessionAllocator;

///////////////////////////////////////////////
// INLINE
Expand Down
4 changes: 2 additions & 2 deletions proxy/http2/Http2ConnectionState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,8 @@ Http2ConnectionState::create_stream(Http2StreamId new_id, Http2Error &error)
}
}

Http2Stream *new_stream = THREAD_ALLOC_INIT(http2StreamAllocator, this_ethread());
new (new_stream) Http2Stream(ua_session, new_id, client_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE));
Http2Stream *new_stream = THREAD_ALLOC_INIT(http2StreamAllocator, this_ethread(), ua_session, new_id,
client_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE));

ink_assert(nullptr != new_stream);
ink_assert(!stream_list.in(new_stream));
Expand Down
5 changes: 2 additions & 3 deletions proxy/http2/Http2SessionAccept.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ Http2SessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferRead
}

Http2ClientSession *new_session = THREAD_ALLOC_INIT(http2ClientSessionAllocator, this_ethread());
new (new_session) Http2ClientSession();
new_session->acl = std::move(session_acl);
new_session->accept_options = &options;
new_session->acl = std::move(session_acl);
new_session->accept_options = &options;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra spaces?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-format added them to align with the previous line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like line 58 only needs one space before the = . Looks like a bug in clang-format then.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean line 56 by the previous line.


// Pin session to current ET_NET thread
new_session->setThreadAffinity(this_ethread());
Expand Down
2 changes: 1 addition & 1 deletion proxy/http2/Http2Stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define Http2StreamDebug(fmt, ...) \
SsnDebug(_proxy_ssn, "http2_stream", "[%" PRId64 "] [%u] " fmt, _proxy_ssn->connection_id(), this->get_id(), ##__VA_ARGS__);

ClassAllocator<Http2Stream> http2StreamAllocator("http2StreamAllocator");
ClassAllocator<Http2Stream, true> http2StreamAllocator("http2StreamAllocator");

Http2Stream::Http2Stream(ProxySession *session, Http2StreamId sid, ssize_t initial_rwnd)
: super(session), _id(sid), _client_rwnd(initial_rwnd)
Expand Down
2 changes: 1 addition & 1 deletion proxy/http2/Http2Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Http2Stream : public ProxyTransaction
Event *_write_vio_event = nullptr;
};

extern ClassAllocator<Http2Stream> http2StreamAllocator;
extern ClassAllocator<Http2Stream, true> http2StreamAllocator;

////////////////////////////////////////////////////
// INLINE
Expand Down