lkml.org 
[lkml]   [2010]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Separate lock events with types
On Wed, Feb 24, 2010 at 06:02:46PM +0900, Hitoshi Mitake wrote:
> Sorry for my long silence...
>
> Thanks for Frederic's great work like trace_lock_class_init(),
> overhead of perf lock was reduced a lot.
> But still there is overhead which cannot be disregarded.
>
> So I'd like to suggest that separating lock trace events into each types of lock.
> e.g.
> trace_lock_acquire() -> spin_trace_lock_acquire(), rwlock_trace_lock_acquire()
> I think that mutex and spinlock are completely different things.
> And as I describe below, filtering at recording phase can reduce overhead of tracing.
>
> CAUTION:
> This patch is the proof of concept. The way this patch employes
> is different from one I described above. This patch adds if statement
> before trace_lock_*(). Implementation of separating events per types will be
> a big one, so this is an only trial edition for performance improvements.


Instead of having one different event for each type of locks,
I would rather suggest to add a "lock type" field in the (future)
lock_init_class class. This requires we implement event injection
properly before.

So if we store the lock type in the lockdep_map, we can just dump
the type on lock class initialization:

- on register_lock_class
- on event injection to catchup with lock that have already registered

That's what does my tree perf/inject (minus the lock type), but this
all require a redesign, in both ftrace and perf sides.

Thanks.



\
 
 \ /
  Last update: 2010-03-27 00:35    [W:1.204 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site