diff options
author | David Howells <dhowells@redhat.com> | 2017-01-05 05:38:34 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-01-09 04:18:13 -0500 |
commit | 8e8d7f13b6d5a93b3d2cf9a4ceaaf923809fd5ac (patch) | |
tree | 8d5b1fd4da0dfec6cbaea9a846419fb8b7a1ac15 /fs/afs/cmservice.c | |
parent | 4289e60cb056ccae4311197d8a4a798aca0f8e55 (diff) |
afs: Add some tracepoints
Add three tracepoints to the AFS filesystem:
(1) The afs_recv_data tracepoint logs data segments that are extracted
from the data received from the peer through afs_extract_data().
(2) The afs_notify_call tracepoint logs notification from AF_RXRPC of data
coming in to an asynchronous call.
(3) The afs_cb_call tracepoint logs incoming calls that have had their
operation ID extracted and mapped into a supported cache manager
service call.
To make (3) work, the name strings in the afs_call_type struct objects have
to be annotated with __tracepoint_string. This is done with the CM_NAME()
macro.
Further, the AFS call state enum needs a name so that it can be used to
declare parameter types.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/cmservice.c')
-rw-r--r-- | fs/afs/cmservice.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index d764236072b1..a2e1e02005f6 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c | |||
@@ -25,11 +25,16 @@ static int afs_deliver_cb_probe_uuid(struct afs_call *); | |||
25 | static int afs_deliver_cb_tell_me_about_yourself(struct afs_call *); | 25 | static int afs_deliver_cb_tell_me_about_yourself(struct afs_call *); |
26 | static void afs_cm_destructor(struct afs_call *); | 26 | static void afs_cm_destructor(struct afs_call *); |
27 | 27 | ||
28 | #define CM_NAME(name) \ | ||
29 | const char afs_SRXCB##name##_name[] __tracepoint_string = \ | ||
30 | "CB." #name | ||
31 | |||
28 | /* | 32 | /* |
29 | * CB.CallBack operation type | 33 | * CB.CallBack operation type |
30 | */ | 34 | */ |
35 | static CM_NAME(CallBack); | ||
31 | static const struct afs_call_type afs_SRXCBCallBack = { | 36 | static const struct afs_call_type afs_SRXCBCallBack = { |
32 | .name = "CB.CallBack", | 37 | .name = afs_SRXCBCallBack_name, |
33 | .deliver = afs_deliver_cb_callback, | 38 | .deliver = afs_deliver_cb_callback, |
34 | .abort_to_error = afs_abort_to_error, | 39 | .abort_to_error = afs_abort_to_error, |
35 | .destructor = afs_cm_destructor, | 40 | .destructor = afs_cm_destructor, |
@@ -38,8 +43,9 @@ static const struct afs_call_type afs_SRXCBCallBack = { | |||
38 | /* | 43 | /* |
39 | * CB.InitCallBackState operation type | 44 | * CB.InitCallBackState operation type |
40 | */ | 45 | */ |
46 | static CM_NAME(InitCallBackState); | ||
41 | static const struct afs_call_type afs_SRXCBInitCallBackState = { | 47 | static const struct afs_call_type afs_SRXCBInitCallBackState = { |
42 | .name = "CB.InitCallBackState", | 48 | .name = afs_SRXCBInitCallBackState_name, |
43 | .deliver = afs_deliver_cb_init_call_back_state, | 49 | .deliver = afs_deliver_cb_init_call_back_state, |
44 | .abort_to_error = afs_abort_to_error, | 50 | .abort_to_error = afs_abort_to_error, |
45 | .destructor = afs_cm_destructor, | 51 | .destructor = afs_cm_destructor, |
@@ -48,8 +54,9 @@ static const struct afs_call_type afs_SRXCBInitCallBackState = { | |||
48 | /* | 54 | /* |
49 | * CB.InitCallBackState3 operation type | 55 | * CB.InitCallBackState3 operation type |
50 | */ | 56 | */ |
57 | static CM_NAME(InitCallBackState3); | ||
51 | static const struct afs_call_type afs_SRXCBInitCallBackState3 = { | 58 | static const struct afs_call_type afs_SRXCBInitCallBackState3 = { |
52 | .name = "CB.InitCallBackState3", | 59 | .name = afs_SRXCBInitCallBackState3_name, |
53 | .deliver = afs_deliver_cb_init_call_back_state3, | 60 | .deliver = afs_deliver_cb_init_call_back_state3, |
54 | .abort_to_error = afs_abort_to_error, | 61 | .abort_to_error = afs_abort_to_error, |
55 | .destructor = afs_cm_destructor, | 62 | .destructor = afs_cm_destructor, |
@@ -58,8 +65,9 @@ static const struct afs_call_type afs_SRXCBInitCallBackState3 = { | |||
58 | /* | 65 | /* |
59 | * CB.Probe operation type | 66 | * CB.Probe operation type |
60 | */ | 67 | */ |
68 | static CM_NAME(Probe); | ||
61 | static const struct afs_call_type afs_SRXCBProbe = { | 69 | static const struct afs_call_type afs_SRXCBProbe = { |
62 | .name = "CB.Probe", | 70 | .name = afs_SRXCBProbe_name, |
63 | .deliver = afs_deliver_cb_probe, | 71 | .deliver = afs_deliver_cb_probe, |
64 | .abort_to_error = afs_abort_to_error, | 72 | .abort_to_error = afs_abort_to_error, |
65 | .destructor = afs_cm_destructor, | 73 | .destructor = afs_cm_destructor, |
@@ -68,8 +76,9 @@ static const struct afs_call_type afs_SRXCBProbe = { | |||
68 | /* | 76 | /* |
69 | * CB.ProbeUuid operation type | 77 | * CB.ProbeUuid operation type |
70 | */ | 78 | */ |
79 | static CM_NAME(ProbeUuid); | ||
71 | static const struct afs_call_type afs_SRXCBProbeUuid = { | 80 | static const struct afs_call_type afs_SRXCBProbeUuid = { |
72 | .name = "CB.ProbeUuid", | 81 | .name = afs_SRXCBProbeUuid_name, |
73 | .deliver = afs_deliver_cb_probe_uuid, | 82 | .deliver = afs_deliver_cb_probe_uuid, |
74 | .abort_to_error = afs_abort_to_error, | 83 | .abort_to_error = afs_abort_to_error, |
75 | .destructor = afs_cm_destructor, | 84 | .destructor = afs_cm_destructor, |
@@ -78,8 +87,9 @@ static const struct afs_call_type afs_SRXCBProbeUuid = { | |||
78 | /* | 87 | /* |
79 | * CB.TellMeAboutYourself operation type | 88 | * CB.TellMeAboutYourself operation type |
80 | */ | 89 | */ |
90 | static CM_NAME(TellMeAboutYourself); | ||
81 | static const struct afs_call_type afs_SRXCBTellMeAboutYourself = { | 91 | static const struct afs_call_type afs_SRXCBTellMeAboutYourself = { |
82 | .name = "CB.TellMeAboutYourself", | 92 | .name = afs_SRXCBTellMeAboutYourself_name, |
83 | .deliver = afs_deliver_cb_tell_me_about_yourself, | 93 | .deliver = afs_deliver_cb_tell_me_about_yourself, |
84 | .abort_to_error = afs_abort_to_error, | 94 | .abort_to_error = afs_abort_to_error, |
85 | .destructor = afs_cm_destructor, | 95 | .destructor = afs_cm_destructor, |