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: Randy Dunlap
Subject:
Re: [PATCH 1/3] tracing: Reduce overhead of module tracepoints
Date: Wednesday, March 24, 2010 - 4:41 pm
On 03/23/10 19:57, Li Zefan 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. > > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Thanks.
quoted text
> --- > 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);
-- ~Randy --
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
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Gautham R Shenoy
[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend
Jeffrey V. Merkey
Re: Versioning file system
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Srivatsa Vaddagiri
Re: [PATCH 7/8] Clean up workqueue.c with respect to the freezer based cpu-hotplug
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Shawn O. Pearce
Re: Bugs in Gitosis
Miles Bader
Re: way to automatically add untracked files?
Harvey Harrison
Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
ipc/sem.c: move wake_up_process out of the spinlock section
Linux Kernel Mailing List
netfilter: nf_conntrack_sip: add T.38 FAX support
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Tony Abernethy
Re: The Atheros story in much fewer words
Damien Miller
Re: Patching a SSH 'Weakness'
Colocation donated by:
Syndicate