Copilot commented on code in PR #12937:
URL: https://github.com/apache/trafficserver/pull/12937#discussion_r2885652466


##########
src/proxy/http/HttpSM.cc:
##########
@@ -7732,11 +7732,14 @@ HttpSM::kill_this()
 void
 HttpSM::update_stats()
 {
-  ATS_PROBE1(milestone_sm_finish, sm_id);
+  const HTTPStatus status_code =
+    t_state.hdr_info.client_response.valid() ? 
t_state.hdr_info.client_response.status_get() : HTTPStatus::NONE;
+
+  ATS_PROBE2(milestone_sm_finish, sm_id, static_cast<int>(status_code));

Review Comment:
   Changing `milestone_sm_finish` from `ATS_PROBE1` to `ATS_PROBE2` is a USDT 
interface change: existing bpftrace/perf scripts that assume only `arg0` 
(sm_id) will now see an additional `arg1` (HTTP status). The repo documentation 
example still treats `milestone_sm_finish` as having a single argument 
(doc/developer-guide/debugging/tracing.en.rst around the bpftrace example), so 
it should be updated to reflect the new signature and describe `arg1`.
   ```suggestion
     ATS_PROBE1(milestone_sm_finish, sm_id);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to