|
36 | 36 | #include "proxy/http/HttpSM.h" |
37 | 37 | #include "proxy/http/HttpDebugNames.h" |
38 | 38 | #include "iocore/net/TLSSNISupport.h" |
| 39 | +#include "ts/ats_probe.h" |
39 | 40 | #include <iterator> |
40 | 41 |
|
41 | 42 | namespace |
@@ -500,11 +501,13 @@ HttpSessionManager::_acquire_session(sockaddr const *ip, CryptoHash const &hostn |
500 | 501 | if (to_return) { |
501 | 502 | if (sm->create_server_txn(to_return)) { |
502 | 503 | Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [acquire session] return session from shared pool", to_return->connection_id()); |
| 504 | + ATS_PROBE2(http_ss_acquire_session, to_return->connection_id(), to_return->get_netvc()->get_socket()); |
503 | 505 | to_return->state = PoolableSession::PooledState::SSN_IN_USE; |
504 | 506 | retval = HSMresult_t::DONE; |
505 | 507 | } else { |
506 | 508 | Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [acquire session] failed to get transaction on session from shared pool", |
507 | 509 | to_return->connection_id()); |
| 510 | + ATS_PROBE2(http_ss_acquire_session_failed, to_return->connection_id(), to_return->get_netvc()->get_socket()); |
508 | 511 | // Don't close the H2 origin. Otherwise you get use-after free with the activity timeout cop |
509 | 512 | if (!to_return->is_multiplexing()) { |
510 | 513 | to_return->do_io_close(); |
@@ -534,13 +537,16 @@ HttpSessionManager::release_session(PoolableSession *to_release) |
534 | 537 |
|
535 | 538 | if (locked) { |
536 | 539 | pool->releaseSession(to_release); |
| 540 | + ATS_PROBE2(http_ss_release_session_global, to_release->connection_id(), to_release->get_netvc()->get_socket()); |
537 | 541 | } else if (this->get_pool_type() == TS_SERVER_SESSION_SHARING_POOL_HYBRID) { |
538 | 542 | // Try again with the thread pool |
539 | 543 | to_release->sharing_pool = TS_SERVER_SESSION_SHARING_POOL_THREAD; |
| 544 | + ATS_PROBE2(http_ss_release_session_thread, to_release->connection_id(), to_release->get_netvc()->get_socket()); |
540 | 545 | return release_session(to_release); |
541 | 546 | } else { |
542 | 547 | Dbg(dbg_ctl_http_ss, "[%" PRId64 "] [release session] could not release session due to lock contention", |
543 | 548 | to_release->connection_id()); |
| 549 | + ATS_PROBE2(http_ss_release_lock_contended, to_release->connection_id(), to_release->get_netvc()->get_socket()); |
544 | 550 | released_p = false; |
545 | 551 | } |
546 | 552 | } |
|
0 commit comments