Skip to content

Commit

Permalink
Add effective size vs. size explanation to docs
Browse files Browse the repository at this point in the history
BUG=chromium:663353

Review-Url: https://codereview.chromium.org/2621993004
Cr-Commit-Position: refs/heads/master@{#442917}
  • Loading branch information
chromy authored and Commit bot committed Jan 11, 2017
1 parent 4260025 commit 9dddc3f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/memory-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ memory used by various subsystems of Chrome.
* **UI**: Android only. Memory used by Android java bitmaps for the UI.
* **V8**: Memory used by V8 Javascript engine.
* **Web Cache**: Memory used by resources downloaded from the Web, like images
and scipts.
and scripts.

The **tracing column in gray** reports memory that is used to collect all of the
above information. This memory would not be used if tracing were not enabled,
Expand All @@ -107,6 +107,19 @@ and it is discounted from malloc and the blue columns.
[gpu-memory]: probe-gpu.md
[partalloc]: /base/allocator/partition_allocator/PartitionAlloc.md

## 'effective\_size' vs. 'size'

This is a little like the difference between 'self time' and 'cumulative time'
in a profiling tool. Size is the total amount of memory allocated/requested
by a subsystem whereas effective size is the total amount of memory
used/consumed by a subsystem. If Skia allocates 10mb via partition_alloc
that memory would show up in the size of both Skia and partition_alloc
but only in the effective size of Skia since although partition_alloc
allocates the 10mb it does so on behalf of Skia which is responsible
for the memory. Summing all effective sizes gives the total amount of
memory used whereas summing size would give a number larger than the total
amount of memory used.

## Related Pages

* [Adding MemoryInfra Tracing to a Component](adding_memory_infra_tracing.md)
Expand Down

0 comments on commit 9dddc3f

Please sign in to comment.