git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Nov 5, 2019, 15:00 UTC
Message-ID
<0fae18b6-dd98-f7df-d2a9-cfdc34916686@jeffhostetler.com>
In-Reply-To
<c4237b45-6faf-c1fc-eb13-b6c71b7fb6ef@web.de>
On 11/4/2019 2:27 PM, René Scharfe wrote:
Show 6 quoted lines
> 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.
> 
> Signed-off-by: René Scharfe <l.s.r@web.de>

Looks good! Thanks for simplifying my otherwise convoluted code. Jeff

Previous: Jeff King
Message 3 of 3 in “trace2: add dots directly to strbuf in perf_fmt_prepare()”
  1. trace2: add dots directly to strbuf in perf_fmt_prepare()René Scharfe, Nov 4, 2019
  2. Jeff KingNov 4, 2019
  3. Jeff HostetlerNov 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.