lkml.org 
[lkml]   [2009]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ring-buffer: add counters for commit overrun and nmi dropped entries

On Thu, 30 Apr 2009, Andrew Morton wrote:

> On Thu, 30 Apr 2009 23:11:52 -0400 (EDT) Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > > hm. Four functions in a row, all of which differ in but a single line.
> > >
> > > unsigned long
> > > ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu)
> > > {
> > > return some_common_function(buffer, cpu)->commit_overrun;
> > > }
> > >
> > > ?
> >
> > But that actually takes thought. I like my cut and paste ;-)
>
> Well, we all like your cut-n-paste, Steve.

It helps with my commit count.

>
> Should you decide to retire the paste pot, and if you can bear to move
> `struct ring_buffer' into a header, these four functions could be made
> static inlines, with pleasant runtime results.

Well, the only users of these functions are those that output to user
land. The latency format and the stat file. static inlines wont help much
with performance there.

But I do think it is cleaner to consolidate them.

Thanks,

-- Steve



\
 
 \ /
  Last update: 2009-05-01 05:37    [W:0.057 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site