Skip to content

Add USDT to iocore/net, iocore/cache, http, http2#13344

Open
moonchen wants to merge 1 commit into
apache:masterfrom
moonchen:usdt-probes
Open

Add USDT to iocore/net, iocore/cache, http, http2#13344
moonchen wants to merge 1 commit into
apache:masterfrom
moonchen:usdt-probes

Conversation

@moonchen

@moonchen moonchen commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Add USDT probes to the following:

  • iocore/net: socket read/write, read/write disable, reenable, do_io_close, inactivity timeout, TLS read/write
  • iocore/cache: read-while-writer attach, produce, starve, writer close
  • proxy/http: tunnel producer/consumer/flow-control, add consumer, chunk decode, UA abort, transfer setup, background fill
  • proxy/http2: send-window/write-buffer block, data frame, window update, RST_STREAM sent/received

The existing probes only mark one-shot lifecycle milestones; these cover the steady-state body-transfer and flow-control phases. They compile to no-ops unless built with -DENABLE_PROBES=ON.

@moonchen moonchen force-pushed the usdt-probes branch 2 times, most recently from 94f1cb5 to 5e3f303 Compare June 28, 2026 22:42
@moonchen moonchen self-assigned this Jun 28, 2026
@moonchen moonchen marked this pull request as ready for review June 28, 2026 22:46
Copilot AI review requested due to automatic review settings June 28, 2026 22:46
@moonchen moonchen added this to the 11.0.0 milestone Jun 28, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands Apache Traffic Server’s USDT/SystemTap instrumentation beyond one-shot lifecycle probes by adding steady-state probes in hot-path data transfer and flow-control code across iocore (net/cache) and the HTTP/HTTP2 proxy layers. These probes are compiled out unless built with -DENABLE_PROBES=ON.

Changes:

  • Add USDT probes for HTTP/2 flow-control and frame send/receive events (WINDOW_UPDATE, DATA, RST_STREAM, blocked conditions).
  • Add USDT probes for HTTP tunnel and state-machine transfer/background-fill/abort/setup events.
  • Add USDT probes for network I/O (socket + TLS read/write), enable/disable/reenable, inactivity timeouts, and cache read-while-writer lifecycle.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/proxy/http2/Http2ConnectionState.cc Adds HTTP/2 probes for window updates, blocked sends, data frame sends, and RST_STREAM send/receive.
src/proxy/http/HttpTunnel.cc Adds probes for tunnel producer/consumer handlers, chunk decoding, flow-control, and consumer attachment.
src/proxy/http/HttpSM.cc Adds probes for transfer setup, background fill start/finish, UA abort, and server setup error.
src/iocore/net/UnixNetVConnection.cc Adds probes for socket read/write, reenable, and do_io_close.
src/iocore/net/UnixNet.cc Adds probe for inactivity timeout events (including default-timeout context).
src/iocore/net/SSLNetVConnection.cc Adds probes for TLS read/write paths.
src/iocore/net/P_UnixNet.h Adds probes for read/write disable transitions.
src/iocore/cache/CacheWrite.cc Adds probes for read-while-writer writer produce/close events.
src/iocore/cache/CacheRead.cc Adds probes for read-while-writer reader attach/starvation events.

Comment thread src/proxy/http/HttpTunnel.cc
Comment thread src/proxy/http/HttpTunnel.cc
Comment thread src/proxy/http/HttpTunnel.cc
Comment thread src/proxy/http2/Http2ConnectionState.cc Outdated
Comment thread src/iocore/cache/CacheRead.cc Outdated
Comment thread src/iocore/cache/CacheRead.cc Outdated
Comment thread src/iocore/cache/CacheWrite.cc Outdated
Comment thread src/iocore/cache/CacheWrite.cc Outdated
Comment thread src/iocore/net/SSLNetVConnection.cc Outdated
Add USDT probes to the following:

- iocore/net: socket read/write, read/write disable, reenable,
  do_io_close, inactivity timeout, TLS read
- iocore/cache: read-while-writer attach, produce, starve, writer close
- proxy/http: tunnel producer/consumer/flow-control, add consumer,
  chunk decode, UA abort, transfer setup, background fill
- proxy/http2: send-window/write-buffer block, data frame, window
  update, RST_STREAM sent/received

The existing probes only mark one-shot lifecycle milestones; these
cover the steady-state body-transfer and flow-control phases. They
compile to no-ops unless built with -DENABLE_PROBES=ON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants