Debian Codegraph @

tapset/linux/nfs_proc.stpm

raw
1 // macros for nfs_proc.stp (the NFS procedure tapset)
2 // Copyright (C) 2013 Red Hat
3 //
4 // This file is part of systemtap, and is free software. You can
5 // redistribute it and/or modify it under the terms of the GNU General
6 // Public License (GPL); either version 2, or (at your option) any
7 // later version.
8
9 // Macros to return data from a 'struct nfs_read_data', 'struct
10 // nfs_write_data', or 'struct nfs_commit_data'. Even though the
11 // structures are laid out differently, since the names of the fields
12 // are the same, one set of macros can work for all types.
13
14 @define _nfs_data_server_ip(nfs_data)
15 %(
16 ( get_ip(@choose_defined(&@nfs_data->task, &@cast(@nfs_data, "nfs_commit_data", "kernel:nfs")->task)) )
17 %)
18
19 @define _nfs_data_prot(nfs_data)
20 %(
21 ( get_prot(&@nfs_data->task) )
22 %)
23
24 @define _nfs_data_args_count(nfs_data)
25 %(
26 ( @nfs_data->args->count )
27 %)
28
29 // The 'nfs_commitres' structure has no 'count' field.
30 @define _nfs_data_res_count(nfs_data)
31 %(
32 ( @choose_defined(@nfs_data->res->count, 0) )
33 %)
34
35 @define _nfs_data_valid(nfs_data)
36 %(
37 ( @nfs_data->res->fattr->valid )
38 %)
39
40 // The 'nfs_commit_data' structure has no 'timestamp' field.
41 @define _nfs_data_timestamp(nfs_data)
42 %(
43 ( %( CONFIG_NFS_V4 == "[ym]"
44 %? @choose_defined(@nfs_data->timestamp, 0)
45 %: 0 %) )
46 %)