lkml.org 
[lkml]   [2010]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf-probe: no need to initialize the entire temporary buffers in synthesize_perf_probe_point()
Em Fri, Dec 24, 2010 at 01:46:09PM +0900, Masami Hiramatsu escreveu:
> (2010/12/24 0:27), Franck Bui-Huu wrote:
> > This patches only put a single null byte at the beginning of each
> > temporary buffers line[], offs[], file[] instead of filling their
> > full contents with null bytes.

> Hmm, sorry but NAK it.

> IMHO, with modern chips, the original code has no problem from the
> viewpoint of memory access (all are cached and no need to access just
> one byte) nor a bottleneck.
> I'd rather use '= ""' style initialization for local variables from the
> viewpoint of readability.

No strong feelings here, not really a fast path, just learned something
new, I thought that that kind of initialization would be equivalent to
what Franck proposed, but gcc really uses the most efficient way of
zeroing the whole string (movq for things like that, and rep stos for
bigger arrays, etc).

> Anyway, thank you for looking into the code :-)

Yes, please continue sending your improvements and fixes!

Masami, what about the fixes Franck sent, clould you please send ACK or
NACKs for those?

- Arnaldo


\
 
 \ /
  Last update: 2010-12-24 14:17    [W:0.080 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site