This is an automated email from the ASF dual-hosted git repository.
mochen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 3339ccbb75 Add USDT tracepoints for connection fd (#12436)
3339ccbb75 is described below
commit 3339ccbb75cbb07c72201f2b00a0995b73f0d471
Author: Mo Chen <[email protected]>
AuthorDate: Mon Aug 25 12:34:21 2025 -0500
Add USDT tracepoints for connection fd (#12436)
* Origin connection pool
* Session attachment
* Readiness polling
---
src/iocore/net/ReadWriteEventIO.cc | 3 ++-
src/proxy/http/HttpSM.cc | 2 ++
src/proxy/http/HttpSessionManager.cc | 6 ++++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/iocore/net/ReadWriteEventIO.cc
b/src/iocore/net/ReadWriteEventIO.cc
index e4346d9923..307a0257ea 100644
--- a/src/iocore/net/ReadWriteEventIO.cc
+++ b/src/iocore/net/ReadWriteEventIO.cc
@@ -24,7 +24,7 @@
#include "iocore/net/ReadWriteEventIO.h"
#include "iocore/net/NetHandler.h"
-
+#include "ts/ats_probe.h"
namespace
{
DbgCtl dbg_ctl_iocore_net_main{"iocore_net_main"};
@@ -52,6 +52,7 @@ ReadWriteEventIO::process_event(int flags)
{
// Remove triggered NetEvent from cop_list because it won't be timeout before
// next InactivityCop runs.
+ ATS_PROBE2(eventio_rw_process_event, _ne->get_fd(), flags);
if (_nh->cop_list.in(_ne)) {
_nh->cop_list.remove(_ne);
}
diff --git a/src/proxy/http/HttpSM.cc b/src/proxy/http/HttpSM.cc
index 4407105321..7c15aed232 100644
--- a/src/proxy/http/HttpSM.cc
+++ b/src/proxy/http/HttpSM.cc
@@ -392,6 +392,7 @@ HttpSM::attach_client_session(ProxyTransaction *txn)
if (!netvc) {
return;
}
+ ATS_PROBE2(http_attach_client_session, sm_id, netvc->get_socket());
_ua.set_txn(txn, milestones);
// Collect log & stats information. We've already verified that the netvc is
!nullptr above,
@@ -6629,6 +6630,7 @@ HttpSM::attach_server_session()
// Propagate the per client IP debugging
if (_ua.get_txn()) {
server_txn->get_netvc()->control_flags.set_flags(get_cont_flags().get_flags());
+ ATS_PROBE2(http_attach_server_session, this->sm_id,
server_txn->get_netvc()->get_socket());
} else { // If there is no _ua.get_txn() no sense in continuing to attach
the server session
return;
}
diff --git a/src/proxy/http/HttpSessionManager.cc
b/src/proxy/http/HttpSessionManager.cc
index 127332b8a4..cf54c5c81b 100644
--- a/src/proxy/http/HttpSessionManager.cc
+++ b/src/proxy/http/HttpSessionManager.cc
@@ -36,6 +36,7 @@
#include "proxy/http/HttpSM.h"
#include "proxy/http/HttpDebugNames.h"
#include "iocore/net/TLSSNISupport.h"
+#include "ts/ats_probe.h"
#include <iterator>
namespace
@@ -500,11 +501,13 @@ HttpSessionManager::_acquire_session(sockaddr const *ip,
CryptoHash const &hostn
if (to_return) {
if (sm->create_server_txn(to_return)) {
Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [acquire session] return session
from shared pool", to_return->connection_id());
+ ATS_PROBE2(http_ss_acquire_session, to_return->connection_id(),
to_return->get_netvc()->get_socket());
to_return->state = PoolableSession::PooledState::SSN_IN_USE;
retval = HSMresult_t::DONE;
} else {
Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [acquire session] failed to get
transaction on session from shared pool",
to_return->connection_id());
+ ATS_PROBE2(http_ss_acquire_session_failed, to_return->connection_id(),
to_return->get_netvc()->get_socket());
// Don't close the H2 origin. Otherwise you get use-after free with
the activity timeout cop
if (!to_return->is_multiplexing()) {
to_return->do_io_close();
@@ -534,13 +537,16 @@ HttpSessionManager::release_session(PoolableSession
*to_release)
if (locked) {
pool->releaseSession(to_release);
+ ATS_PROBE2(http_ss_release_session_global, to_release->connection_id(),
to_release->get_netvc()->get_socket());
} else if (this->get_pool_type() == TS_SERVER_SESSION_SHARING_POOL_HYBRID)
{
// Try again with the thread pool
to_release->sharing_pool = TS_SERVER_SESSION_SHARING_POOL_THREAD;
+ ATS_PROBE2(http_ss_release_session_thread, to_release->connection_id(),
to_release->get_netvc()->get_socket());
return release_session(to_release);
} else {
Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [release session] could not release
session due to lock contention",
to_release->connection_id());
+ ATS_PROBE2(http_ss_release_lock_contended, to_release->connection_id(),
to_release->get_netvc()->get_socket());
released_p = false;
}
}