Add USDT to iocore/net, iocore/cache, http, http2#13344
Conversation
94f1cb5 to
5e3f303
Compare
There was a problem hiding this comment.
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. |
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.
There was a problem hiding this comment.
Approving. This is pure no-op instrumentation. The probe macros compile out unless the tree is built with -DENABLE_PROBES=ON, so there is no runtime change to default or CI/ASAN builds. The argument counts match the macro arity, and the nullable pointer arguments are guarded inline.
Add USDT probes to the following:
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.