Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 8633006: Add HEAP_PROFILE_TIME_INTERVAL to dump heap profiles periodically in third_party/tcmalloc/chromium. (Closed)

Created:
9 years, 1 month ago by Dai Mikurube (NOT FULLTIME)
Modified:
8 years, 11 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Add HEAP_PROFILE_TIME_INTERVAL to dump heap profiles periodically in third_party/tcmalloc/chromium. This patch is originally from http://codereview.chromium.org/7865021/. BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115808

Patch Set 1 #

Patch Set 2 : Removed DEEP_PROFILER_ON from this change. #

Patch Set 3 : Moved the definition of an option variable. #

Patch Set 4 : Fixed. #

Total comments: 4

Patch Set 5 : reflected the comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -0 lines) Patch
M third_party/tcmalloc/chromium/src/heap-profiler.cc View 1 2 3 4 5 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Alexander Potapenko
General comment: this flag does not give you a guaranteed time interval between two dumps. ...
9 years ago (2011-12-20 13:26:04 UTC) #1
Dai Mikurube (NOT FULLTIME)
Thank you! Yes, exact time intervals is not necessary. The goal is long-running heap profiling. ...
9 years ago (2011-12-21 05:40:56 UTC) #2
Alexander Potapenko
LGTM
8 years, 12 months ago (2011-12-26 12:18:37 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmikurube@chromium.org/8633006/15001
8 years, 12 months ago (2011-12-27 05:00:24 UTC) #4
Dai Mikurube (NOT FULLTIME)
Thanks. Checked the "Commit" box.
8 years, 12 months ago (2011-12-27 05:00:40 UTC) #5
commit-bot: I haz the power
Change committed as 115808
8 years, 12 months ago (2011-12-27 06:12:03 UTC) #6
jar (doing other things)
Can you give an example of where this functionalitiy would be useful? When I do ...
8 years, 12 months ago (2011-12-27 16:55:53 UTC) #7
jar (doing other things)
As a more specific, and possibly constructive comment, the memory analysis tools on Windows that ...
8 years, 12 months ago (2011-12-27 17:04:30 UTC) #8
Dai Mikurube (NOT FULLTIME)
Sorry, I overlooked the replies. A typical case of watching a trend is observing long-running ...
8 years, 11 months ago (2012-01-04 19:26:23 UTC) #9
jar (doing other things)
The existing memory watcher tools can be built under the "tools" group on MSVC when ...
8 years, 11 months ago (2012-01-04 20:12:26 UTC) #10
jar (doing other things)
Excellent answer! Thanks! So what you are after is looking at memory that is not ...
8 years, 11 months ago (2012-01-04 22:15:19 UTC) #11
Dai Mikurube (NOT FULLTIME)
8 years, 11 months ago (2012-01-05 01:58:18 UTC) #12
Thank you for the comment and summary.

Awesome.  Such a single snapshot would be useful.  It has an additional
advantage in time accuracy.  Accuracy in periodical dumping  is bounded by the
period.

A trade-off is storage consumption in memory to store clock time.  2 or 4 bytes
will be required per allocation.  It may be acceptable, but not ignorable.

On 2012/01/04 22:15:19, jar wrote:
> Excellent answer! Thanks!
> 
> So what you are after is looking at memory that is not short term, or more
> specifically and equivalently, memory that was allocated "a while ago" or
> longer.
> 
> You currently detect this by looking at a graph, effectively doing low-pass
> filtering to see a consistent range at a given point in time... and that sort
of
> shows the issue.  It smooths out short term variation.
> 
> I need to think about this issue, and see if we can get (in a single snapshot)
> this same metric (amount of long-term allocated memory).
> 
> The memory-watcher tool can certainly do this, as it records when each
> allocation took place.  As a result, when it dumps memory, it could partition
> the tally at any point in time (i.e., ignore allocations after time t).
> 
> That doesn't account for a thrashing process, that is allocating and freeing
> rapidly, maintaining a high average, despite a smaller long-term alloc.  
...but
> then again... I think such thrashers confuse the trend line in a similar
> non-obvious way.
> 
> This is an interesting metric to consider.
> 
> Thanks,
> 
> Jim
> 
> 
> 
> On 2012/01/04 20:12:26, jar wrote:
> > The existing memory watcher tools can be built under the "tools" group on
MSVC
> > when you load the chrome.sln.   They include some stuff (on windows) to grab
> the
> > keystroke, distribute this notification to all processes, walk the stacks,
and
> > dump the results.
> > 
> > I'm still slightly at a loss for understanding what you're hoping to
visualize
> > with the ongoing snapshots.  I guess you can (if you build the
> > graphing/visualization tools) see that the eventual bloat was either aquired
> in
> > one gulp, or was the result of a slow growth.  Perhaps the distinction will
> give
> > you two different paths to follow to find the source.... but it seems much
> more
> > valuable to simply look at the bloated (leaked) memory and ask: Where was
this
> > allocated?  During what functions? etc.  The one gotcha is when it is
> allocated
> > in a complex system, such as V8, and then there is the question of what was
v8
> > doing (in the uber javascript domain).  For the browser process, I don't
think
> > we have such an element of confusion, and the "blaming" of memory use on
code
> > *seems* more valuable than looking at a trend line.
> > 
> > What use case am I missing?
> > 
> > Thanks,
> > 
> > Jim
> > 
> > On 2012/01/04 19:26:23, Dai Mikurube wrote:
> > > Sorry, I overlooked the replies.
> > > 
> > > A typical case of watching a trend is observing long-running and memory
> > > consuming tests.  Memory bloat usually occurs in hours and days in most
> > > scenarios.  Just a snapshot of large consumption doesn't help analysis. 
> > > Watching a trend of such a long-running test will help analyzing memory
> bloat.
> > > 
> > > btw, I'm interested in your tool and "specific keystroke" in your tool.  I
> was
> > > thinking about such user-specified triggers to dump.  SIGQUIT (Ctrl-\) was
> an
> > > option on Linux, but looked not so good...

Powered by Google App Engine
This is Rietveld 408576698