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

Re: git blame with valgrind massif

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Dec 11, 2007, 21:22 UTC
Message-ID
<alpine.LFD.0.9999.0712111315060.25032@woody.linux-foundation.org>
In-Reply-To
<9e4733910712111257h20a4a916gd4747e816e4706ff@mail.gmail.com>
On Tue, 11 Dec 2007, Jon Smirl wrote:
> 
> How do you interpret the massif output?

Not very easy, since massif will tell you what *allocated* it, but then trying to see who was supposed to free it is another issue altogether.

I also find the textual output to be very confusing. But what massif is really good at is to look at the memory usage over time in the postscript file it generates, and that gives you a much better feel for what particular allocation is a problem.

In this case, it's patch_delta that generates all the memory usage (well, 98% of it ;^), but that's not that helpful unless you know git internals, and realize that with deep delta chains, that only means that the memory is kept around just for random object data. The question is why that object data stays around and isn't free'd.

There's two answers to that:
 - the non-buggy use of the object data in the delta base cache (limited 
   by the delta_base_cache_limit, which defaults to 16MB, although you can 
   tweak it with core.deltabasecachelimit)
 - the (possibly buggy) callers that keep the data.

See my previous email with a patch to "git blame" to make it release the object data. That should fix it, I think.

		Linus
Previous: André Goddard RosaNext: Pierre Habouzit
Message 5 of 6 in “git blame with valgrind massif”
  1. Jon SmirlDec 11, 2007
  2. Pierre HabouzitDec 11, 2007
  3. Jon SmirlDec 11, 2007
  4. André Goddard RosaDec 12, 2007
  5. Linus TorvaldsDec 11, 2007
  6. Pierre HabouzitDec 11, 2007

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.