From 16d1d8a09f2a44fe64c5b7ee6a1a471091101468 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Thu, 26 Nov 2009 15:03:23 +0800 Subject: [PATCH] --- yaml --- r: 169789 b: refs/heads/master c: 925684d6d589e40e41007edf47c69e729d911263 h: refs/heads/master i: 169787: cf27442a1760e50109626f5cff615fa162ac4988 v: v3 --- [refs] | 2 +- trunk/include/trace/events/module.h | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 923da7854f08..c262f3331726 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 091ad3658e3c76c5fb05f65bfb64a0246f8f31b5 +refs/heads/master: 925684d6d589e40e41007edf47c69e729d911263 diff --git a/trunk/include/trace/events/module.h b/trunk/include/trace/events/module.h index 84160fb18478..4b0f48ba16a6 100644 --- a/trunk/include/trace/events/module.h +++ b/trunk/include/trace/events/module.h @@ -51,7 +51,7 @@ TRACE_EVENT(module_free, TP_printk("%s", __get_str(name)) ); -TRACE_EVENT(module_get, +DECLARE_EVENT_CLASS(module_refcnt, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), @@ -73,26 +73,18 @@ TRACE_EVENT(module_get, __get_str(name), (void *)__entry->ip, __entry->refcnt) ); -TRACE_EVENT(module_put, +DEFINE_EVENT(module_refcnt, module_get, TP_PROTO(struct module *mod, unsigned long ip, int refcnt), - TP_ARGS(mod, ip, refcnt), + TP_ARGS(mod, ip, refcnt) +); - TP_STRUCT__entry( - __field( unsigned long, ip ) - __field( int, refcnt ) - __string( name, mod->name ) - ), +DEFINE_EVENT(module_refcnt, module_put, - TP_fast_assign( - __entry->ip = ip; - __entry->refcnt = refcnt; - __assign_str(name, mod->name); - ), + TP_PROTO(struct module *mod, unsigned long ip, int refcnt), - TP_printk("%s call_site=%pf refcnt=%d", - __get_str(name), (void *)__entry->ip, __entry->refcnt) + TP_ARGS(mod, ip, refcnt) ); TRACE_EVENT(module_request,