lkml.org 
[lkml]   [2012]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][GIT PULL][v3.3] tracing: Add header wrappers event_headers_start.h and event_headers_end.h
From
Date
On Wed, 2012-01-18 at 13:07 +0100, Ingo Molnar wrote:

> I'd argue that __raise_softirq_irqoff() should not be inline -
> that would solve a whole host of issues. Event tracing is
> enabled in most distros so there's no real overhead argument to
> be made here either - so it's probably a bit faster in fact to
> have this uninlined. What do you think?

Sure, I have no problem moving that out of the header. I don't think
raising a softirq is in that critical a path that it can't be a function
call.

There's only one trace/events header left which is in module.h. Perhaps
we can move __module_get() and try_module_get() out of the header. We
could just move the "if" part out.

extern void inc_module(struct module *module, unsigned long ip);

static inline void __module_get(struct module *module)
{
if (module) {
preempt_disable();
inc_module(module, _THIS_IP_);
preempt_enable();
}
}

static inline void try_module_get(struct module *module)
{
int ret = 1;

if (module) {
preempt_disable();

if (likely(module_is_live(module)))
inc_module(module, _THIS_IP_);
else
ret = 0;

preempt_enable();
}
return ret;
}

---

void inc_module(struct module *module, unsigned long ip)
{
__this_cpu_inc(module->refptr->incs);
trace_module_get(module, ip);
}


-- Steve




\
 
 \ /
  Last update: 2012-01-18 18:59    [W:0.332 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site