login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
March
»
24
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Mathieu Desnoyers
Subject:
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
Date: Wednesday, March 24, 2010 - 3:24 am
* Li Zefan (
lizf@cn.fujitsu.com
) wrote:
quoted text
> Remove the @refcnt argument, because it has side-effects, and > arguments with side-effects are not skipped by the jump over > disabled instrumentation, so it adds overhead even when the > tracepoints are disabled.
Thanks Li. Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
quoted text
> > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> > --- > include/linux/module.h | 6 ++---- > include/trace/events/module.h | 14 +++++++------- > kernel/module.c | 3 +-- > 3 files changed, 10 insertions(+), 13 deletions(-) > > diff --git a/include/linux/module.h b/include/linux/module.h > index 5e869ff..393ec39 100644 > --- a/include/linux/module.h > +++ b/include/linux/module.h > @@ -460,8 +460,7 @@ static inline void __module_get(struct module *module) > if (module) { > preempt_disable(); > __this_cpu_inc(module->refptr->count); > - trace_module_get(module, _THIS_IP_, > - __this_cpu_read(module->refptr->count)); > + trace_module_get(module, _THIS_IP_); > preempt_enable(); > } > } > @@ -475,8 +474,7 @@ static inline int try_module_get(struct module *module) > > if (likely(module_is_live(module))) { > __this_cpu_inc(module->refptr->count); > - trace_module_get(module, _THIS_IP_, > - __this_cpu_read(module->refptr->count)); > + trace_module_get(module, _THIS_IP_); > } > else > ret = 0; > diff --git a/include/trace/events/module.h b/include/trace/events/module.h > index 4b0f48b..a585f81 100644 > --- a/include/trace/events/module.h > +++ b/include/trace/events/module.h > @@ -53,9 +53,9 @@ TRACE_EVENT(module_free, > > DECLARE_EVENT_CLASS(module_refcnt, > > - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), > + TP_PROTO(struct module *mod, unsigned long ip), > > - TP_ARGS(mod, ip, refcnt), > + TP_ARGS(mod, ip), > > TP_STRUCT__entry( > __field( unsigned long, ip ) > @@ -65,7 +65,7 @@ DECLARE_EVENT_CLASS(module_refcnt, > > TP_fast_assign( > __entry->ip = ip; > - __entry->refcnt = refcnt; > + __entry->refcnt = __this_cpu_read(mod->refptr->count); > __assign_str(name, mod->name); > ), > > @@ -75,16 +75,16 @@ DECLARE_EVENT_CLASS(module_refcnt, > > DEFINE_EVENT(module_refcnt, module_get, > > - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), > + TP_PROTO(struct module *mod, unsigned long ip), > > - TP_ARGS(mod, ip, refcnt) > + TP_ARGS(mod, ip) > ); > > DEFINE_EVENT(module_refcnt, module_put, > > - TP_PROTO(struct module *mod, unsigned long ip, int refcnt), > + TP_PROTO(struct module *mod, unsigned long ip), > > - TP_ARGS(mod, ip, refcnt) > + TP_ARGS(mod, ip) > ); > > TRACE_EVENT(module_request, > diff --git a/kernel/module.c b/kernel/module.c > index c968d36..21591ad 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -800,8 +800,7 @@ void module_put(struct module *module) > preempt_disable(); > __this_cpu_dec(module->refptr->count); > > - trace_module_put(module, _RET_IP_, > - __this_cpu_read(module->refptr->count)); > + trace_module_put(module, _RET_IP_); > /* Maybe they're waiting for us to drop reference? */ > if (unlikely(!module_is_live(module))) > wake_up_process(module->waiter); > -- > 1.6.3 >
-- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc.
http://www.efficios.com
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/3] tracing: Reduce overhead of module tracepoints
, Li Zefan
, (Tue Mar 23, 7:57 pm)
[PATCH 2/3] tracing: Convert some signal events to DEFINE_ ...
, Li Zefan
, (Tue Mar 23, 7:58 pm)
[PATCH 3/3] tracing: Update comments
, Li Zefan
, (Tue Mar 23, 7:58 pm)
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
, Steven Rostedt
, (Tue Mar 23, 8:05 pm)
Re: [PATCH 3/3] tracing: Update comments
, Steven Rostedt
, (Tue Mar 23, 8:07 pm)
Re: [PATCH 2/3] tracing: Convert some signal events to DEF ...
, Steven Rostedt
, (Tue Mar 23, 8:07 pm)
Re: [PATCH 2/3] tracing: Convert some signal events to DEF ...
, Masami Hiramatsu
, (Tue Mar 23, 8:17 pm)
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
, Mathieu Desnoyers
, (Wed Mar 24, 3:24 am)
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
, Randy Dunlap
, (Wed Mar 24, 4:41 pm)
[tip:tracing/urgent] tracing: Remove side effect from modu ...
, tip-bot for Li Zefan
, (Fri Mar 26, 7:03 pm)
Re: [tip:tracing/urgent] tracing: Remove side effect from ...
, Mathieu Desnoyers
, (Fri Mar 26, 9:10 pm)
Re: [tip:tracing/urgent] tracing: Remove side effect from ...
, Steven Rostedt
, (Fri Mar 26, 9:23 pm)
[tip:tracing/core] tracing: Convert some signal events to ...
, tip-bot for Li Zefan
, (Fri Apr 2, 12:03 pm)
[tip:tracing/core] tracing: Update comments
, tip-bot for Li Zefan
, (Fri Apr 2, 12:04 pm)
[tip:tracing/core] tracing: Remove side effect from module ...
, tip-bot for Li Zefan
, (Fri Apr 2, 12:04 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate