diff options
author | David Howells <dhowells@redhat.com> | 2017-01-05 05:38:33 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-01-05 05:38:33 -0500 |
commit | b54a134a7de461f804cf0e28331d0a43ee82fb13 (patch) | |
tree | 4cf4e55a9ee30e6d9b1ed4804cee3d467e09e56e /net/rxrpc/call_object.c | |
parent | 57ea884b0dcf1e59661955919976ef138ec9cdb0 (diff) |
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>
Diffstat (limited to 'net/rxrpc/call_object.c')
-rw-r--r-- | net/rxrpc/call_object.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 1ed18d8c9c9f..8b94db3c9b2e 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -43,24 +43,6 @@ const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = { | |||
43 | [RXRPC_CALL_NETWORK_ERROR] = "NetError", | 43 | [RXRPC_CALL_NETWORK_ERROR] = "NetError", |
44 | }; | 44 | }; |
45 | 45 | ||
46 | const char rxrpc_call_traces[rxrpc_call__nr_trace][4] = { | ||
47 | [rxrpc_call_new_client] = "NWc", | ||
48 | [rxrpc_call_new_service] = "NWs", | ||
49 | [rxrpc_call_queued] = "QUE", | ||
50 | [rxrpc_call_queued_ref] = "QUR", | ||
51 | [rxrpc_call_connected] = "CON", | ||
52 | [rxrpc_call_release] = "RLS", | ||
53 | [rxrpc_call_seen] = "SEE", | ||
54 | [rxrpc_call_got] = "GOT", | ||
55 | [rxrpc_call_got_userid] = "Gus", | ||
56 | [rxrpc_call_got_kernel] = "Gke", | ||
57 | [rxrpc_call_put] = "PUT", | ||
58 | [rxrpc_call_put_userid] = "Pus", | ||
59 | [rxrpc_call_put_kernel] = "Pke", | ||
60 | [rxrpc_call_put_noqueue] = "PNQ", | ||
61 | [rxrpc_call_error] = "*E*", | ||
62 | }; | ||
63 | |||
64 | struct kmem_cache *rxrpc_call_jar; | 46 | struct kmem_cache *rxrpc_call_jar; |
65 | LIST_HEAD(rxrpc_calls); | 47 | LIST_HEAD(rxrpc_calls); |
66 | DEFINE_RWLOCK(rxrpc_call_lock); | 48 | DEFINE_RWLOCK(rxrpc_call_lock); |