rxrpc: Fix handling of enums-to-string translation in tracing
Fix the way enum values are translated into strings in AF_RXRPC tracepoints. The problem with just doing a lookup in a normal flat array of strings or chars is that external tracing infrastructure can't find it. Rather, TRACE_DEFINE_ENUM must be used. Also sort the enums and string tables to make it easier to keep them in order so that a future patch to __print_symbolic() can be optimised to try a direct lookup into the table first before iterating over it. A couple of _proto() macro calls are removed because they refered to tables that got moved to the tracing infrastructure. The relevant data can be found by way of tracing. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
@@ -43,24 +43,6 @@ const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = {
|
||||
[RXRPC_CALL_NETWORK_ERROR] = "NetError",
|
||||
};
|
||||
|
||||
const char rxrpc_call_traces[rxrpc_call__nr_trace][4] = {
|
||||
[rxrpc_call_new_client] = "NWc",
|
||||
[rxrpc_call_new_service] = "NWs",
|
||||
[rxrpc_call_queued] = "QUE",
|
||||
[rxrpc_call_queued_ref] = "QUR",
|
||||
[rxrpc_call_connected] = "CON",
|
||||
[rxrpc_call_release] = "RLS",
|
||||
[rxrpc_call_seen] = "SEE",
|
||||
[rxrpc_call_got] = "GOT",
|
||||
[rxrpc_call_got_userid] = "Gus",
|
||||
[rxrpc_call_got_kernel] = "Gke",
|
||||
[rxrpc_call_put] = "PUT",
|
||||
[rxrpc_call_put_userid] = "Pus",
|
||||
[rxrpc_call_put_kernel] = "Pke",
|
||||
[rxrpc_call_put_noqueue] = "PNQ",
|
||||
[rxrpc_call_error] = "*E*",
|
||||
};
|
||||
|
||||
struct kmem_cache *rxrpc_call_jar;
|
||||
LIST_HEAD(rxrpc_calls);
|
||||
DEFINE_RWLOCK(rxrpc_call_lock);
|
||||
|
Reference in New Issue
Block a user