Re: [PATCH] trace2: add dots directly to strbuf in perf_fmt_prepare()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 04, 2019 at 08:27:54PM +0100, René Scharfe wrote:

> The initialization function of the Trace2 performance format target sets
> aside a stash of dots for indenting output.  Get rid of it and use
> strbuf_addchars() to provide dots on demand instead.  This shortens the
> code, gets rid of a small heap allocation and is a bit more efficient.

Yeah, the end result is much easier on the eyes. I am scratching my head
at whether there is any advantage to copying the separate buffer, but I
don't see one. The likelihood of having to allocate in the final "buf"
strbuf is the same either way.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux