MCPcopy Create free account
hub / github.com/apache/trafficserver / dump_state_on_assert

Method dump_state_on_assert

src/proxy/http/HttpSM.cc:7809–7836  ·  view source on GitHub ↗

void HttpSM::dump_state_on_assert Debugging routine to dump the state machine's history and other state on an assertion failure We use Diags::Status instead of stderr since Diags works both on UNIX & NT

Source from the content-addressed store, hash-verified

7807// Diags works both on UNIX & NT
7808//
7809void
7810HttpSM::dump_state_on_assert()
7811{
7812 Error("[%" PRId64 "] ------- begin http state dump -------", sm_id);
7813
7814 if (history.overflowed()) {
7815 Error(" History Wrap around. history size: %d", history.size());
7816 }
7817 // Loop through the history and dump it
7818 for (unsigned int i = 0; i < history.size(); i++) {
7819 char buf[256];
7820 int r = history[i].reentrancy;
7821 int e = history[i].event;
7822 Error("%d %d %s", e, r, history[i].location.str(buf, sizeof(buf)));
7823 }
7824
7825 // Dump the via string
7826 Error("Via String: [%s]\n", t_state.via_string);
7827
7828 // Dump header info
7829 dump_state_hdr(&t_state.hdr_info.client_request, "Client Request");
7830 dump_state_hdr(&t_state.hdr_info.server_request, "Server Request");
7831 dump_state_hdr(&t_state.hdr_info.server_response, "Server Response");
7832 dump_state_hdr(&t_state.hdr_info.transform_response, "Transform Response");
7833 dump_state_hdr(&t_state.hdr_info.client_response, "Client Response");
7834
7835 Error("[%" PRId64 "] ------- end http state dump ---------", sm_id);
7836}
7837
7838void
7839HttpSM::dump_state_hdr(HTTPHdr *h, const char *s)

Callers

nothing calls this directly

Calls 4

overflowedMethod · 0.80
ErrorClass · 0.50
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected