mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
SUNRPC: Trace server-side rpcbind registration events
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
@@ -1581,6 +1581,86 @@ DEFINE_CACHE_EVENT(cache_entry_update);
|
||||
DEFINE_CACHE_EVENT(cache_entry_make_negative);
|
||||
DEFINE_CACHE_EVENT(cache_entry_no_listener);
|
||||
|
||||
DECLARE_EVENT_CLASS(register_class,
|
||||
TP_PROTO(
|
||||
const char *program,
|
||||
const u32 version,
|
||||
const int family,
|
||||
const unsigned short protocol,
|
||||
const unsigned short port,
|
||||
int error
|
||||
),
|
||||
|
||||
TP_ARGS(program, version, family, protocol, port, error),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, version)
|
||||
__field(unsigned long, family)
|
||||
__field(unsigned short, protocol)
|
||||
__field(unsigned short, port)
|
||||
__field(int, error)
|
||||
__string(program, program)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->version = version;
|
||||
__entry->family = family;
|
||||
__entry->protocol = protocol;
|
||||
__entry->port = port;
|
||||
__entry->error = error;
|
||||
__assign_str(program, program);
|
||||
),
|
||||
|
||||
TP_printk("program=%sv%u proto=%s port=%u family=%s error=%d",
|
||||
__get_str(program), __entry->version,
|
||||
__entry->protocol == IPPROTO_UDP ? "udp" : "tcp",
|
||||
__entry->port, rpc_show_address_family(__entry->family),
|
||||
__entry->error
|
||||
)
|
||||
);
|
||||
|
||||
#define DEFINE_REGISTER_EVENT(name) \
|
||||
DEFINE_EVENT(register_class, svc_##name, \
|
||||
TP_PROTO( \
|
||||
const char *program, \
|
||||
const u32 version, \
|
||||
const int family, \
|
||||
const unsigned short protocol, \
|
||||
const unsigned short port, \
|
||||
int error \
|
||||
), \
|
||||
TP_ARGS(program, version, family, protocol, \
|
||||
port, error))
|
||||
|
||||
DEFINE_REGISTER_EVENT(register);
|
||||
DEFINE_REGISTER_EVENT(noregister);
|
||||
|
||||
TRACE_EVENT(svc_unregister,
|
||||
TP_PROTO(
|
||||
const char *program,
|
||||
const u32 version,
|
||||
int error
|
||||
),
|
||||
|
||||
TP_ARGS(program, version, error),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(u32, version)
|
||||
__field(int, error)
|
||||
__string(program, program)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->version = version;
|
||||
__entry->error = error;
|
||||
__assign_str(program, program);
|
||||
),
|
||||
|
||||
TP_printk("program=%sv%u error=%d",
|
||||
__get_str(program), __entry->version, __entry->error
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_SUNRPC_H */
|
||||
|
||||
#include <trace/define_trace.h>
|
||||
|
Reference in New Issue
Block a user