| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
------------------------------------------------------------------------
BEFORE AFTER
------------------------------------------------------------------------
util::memory util::mem
- heap_size_of - heap_size_of (unchanged)
- SizeOf - HeapSizeOf
- size_of_excluding_self - heap_size_of_children
prof::mem prof::mem
- MemoryProfilerChan - ProfilerChan
- MemoryReport - Report
- MemoryReportsChan - ReportsChan
- MemoryReporter - Reporter
- MemoryProfilerMsg - ProfilerMsg
- {R,UnR}egisterMemoryReporter - {R,UnR}egisterReporter
- MemoryProfiler - Prof
- ReportsForest - ReportsForest (unchanged)
- ReportsTree - ReportsTree (unchanged)
- SystemMemoryReporter - SystemReporter
prof::time prof::time
- TimeProfilerChan - ProfilerChan
- TimerMetadata - TimerMetadata (unchanged)
- Formatable - Formattable [spelling!]
- TimeProfilerMsg - ProfilerMsg
- TimeProfilerCategory - ProfilerCategory
- TimeProfilerBuckets - ProfilerBuckets
- TimeProfiler - Profiler
- TimerMetadataFrameType - TimerMetadataFrameType (unchanged)
- TimerMetadataReflowType - TimerMetadataReflowType (unchanged)
- ProfilerMetadata - ProfilerMetadata (unchanged)
In a few places both prof::time and prof::mem are used, and so
module-qualification is needed to avoid overlap, e.g. time::Profiler and
mem::Profiler. Likewise with std::mem and prof::mem. This is not a big
deal.
|
|
|
|
|
|
|
|
|
| |
- Most of util::memory has been moved into profile::mem, though the
`SizeOf` trait and related things remain in util::memory. The
`SystemMemoryReporter` code is now in a submodule
profile::mem::system_reporter.
- util::time has been moved entirely into profile::time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Memory reports are much nicer to read when grouped into trees, which requires giving each report a path instead of a name.
Sample output:
```
Begin memory reports
|
| 2.51 MiB -- pages
| 2.51 MiB -- url(file:///home/njn/moz/servo/../servo-static-suite/wikipedia/Guardians%20of%20the%20Galaxy%20(film)%20-%20Wikipedia,%20the%20free%20encyclopedia.html)
| 2.51 MiB -- display-list
|
| 238.89 MiB -- resident-according-to-smaps
| 188.31 MiB -- anonymous (rw-p)
| 27.29 MiB -- /home/njn/moz/servo/components/servo/target/debug/servo (r-xp)
| 7.82 MiB -- other
| 6.65 MiB -- [heap] (rw-p)
| 3.55 MiB -- /usr/lib/x86_64-linux-gnu/dri/i965_dri.so (r-xp)
| 1.42 MiB -- /lib/x86_64-linux-gnu/libc-2.19.so (r-xp)
| 1.13 MiB -- /home/njn/moz/servo/components/servo/target/debug/servo (r--p)
| 0.74 MiB -- /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (r-xp)
| 0.73 MiB -- /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 (r-xp)
| 0.65 MiB -- /lib/x86_64-linux-gnu/libm-2.19.so (r-xp)
| 0.60 MiB -- /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1 (r-xp)
|
| 71.08 MiB -- jemalloc-heap-active
| 59.11 MiB -- jemalloc-heap-allocated
| 180.00 MiB -- jemalloc-heap-mapped
| 232.87 MiB -- resident
| 54.43 MiB -- system-heap-allocated
| 3130.11 MiB -- vsize
|
End memory reports
```
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the system memory measurements ("resident", "vsize", etc.) are
not reported through the generic memory reporting mechanism, simply
because they pre-date that mechanism. This changeset removes that
special-casing.
One consequence of this is that previously if a platform didn't
implement one of the basic measurements, a '???' entry would be printed.
Now nothing will be printed. This is no great loss and matches what
Firefox does.
Another consequence is that the order in which the measurements are
printed is changed. I plan to fix this soon so that reports are sorted
in a more sensible fashion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if you don't specify the '-m' option, a fake do-nothing memory
profiler thread gets created instead of the real one. It ignores all
events except for `Exit`. And the timer thread doesn't get created so no
`Print` events are sent.
This changeset instead always creates the real thread. If you specify
'-m' the *timer* thread is still absent and it won't print anything.
However, the memory profiler thread will respond to register/unregister
events, which is good, because if there's a bug in those (e.g.
double-registration of a particular name) it'll show up in invocations
that lack '-m'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset implements the beginnings of fine-grained measurement of
Servo's data structures.
- It adds a new `SizeOf` trait, which is used to measure the memory used
by heap data structures, and implements it for some std types: Box,
String, Option, Arc, Vec, and DList.
- It adds a new `MemoryReporter` trait which is used to report memory
measurements from other threads to the memory profiler. Reporters are
registered and unregistered with the memory profiler, and the memory
profiler makes measurement requests of reporters when necessary.
- It plumbs a MemoryProfilerChan through to the layout task so it can
register a memory reporter.
- It implements the `SizeOf` trait for `DisplayList` and associated
types, and adds a memory reporter that uses it.
The display list hits 14.77 MiB when viewing
tests/html/perf-rainbow.html, and 2.51 MiB when viewing the Guardians of
the Galaxy Wikipedia page from servo-static-suite. Example output:
0.29: display-list::http://www.reddit.com/
0.00: display-list::http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&bust2#http://www.reddit.com
0.00: display-list::http://www.reddit.com/static/createadframe.html
There are a number of FIXME comments indicating sub-optimal things. This
is a big enough change for now that doing them as follow-ups seems best.
|
| |
|
| |
|
|
|
|
| |
This leaves range.rs alone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All anonymous segments are aggregated into a single measurement, as are
all segments smaller than 512 KiB.
Example output:
142.89: resident-according-to-smaps
97.84: - anonymous (rw-p)
23.98: - /home/njn/moz/servo/components/servo/target/servo (r-xp)
6.58: - [heap] (rw-p)
5.36: - other
3.51: - /usr/lib/x86_64-linux-gnu/dri/i965_dri.so (r-xp)
1.33: - /lib/x86_64-linux-gnu/libc-2.19.so (r-xp)
0.93: - /home/njn/moz/servo/components/servo/target/servo (r--p)
0.76: - /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 (r-xp)
0.74: - /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (r-xp)
0.50: - /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (r-xp)
0.50: - /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1 (r-xp)
0.45: - /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 (r-xp)
0.43: - /lib/x86_64-linux-gnu/libm-2.19.so (r-xp)
|
|
|
|
|
| |
Because _size_ is always small, but _category_ can be long, so it makes
sense to have the _size_ on the left.
|
| |
|
|\
| |
| |
| |
| | |
It turns out you need to send an "epoch" request to jemalloc before
asking for a measurement otherwise you get stale data! Heavens.
|
| |
| |
| |
| |
| | |
It turns out you need to send an "epoch" request to jemalloc before
asking for a measurement otherwise you get stale data! Heavens.
|
|/ |
|
| |
|
|
|
|
|
|
| |
Although Rust allocations are on the jemalloc heap, allocations done by
Skia and the graphics driver are on the system heap, so it's worth
reporting that as well.
|
| |
|
| |
|
|
|
|
|
| |
IntoString has been removed from Rust, and named() will take a String, so
there is no good reason to do otherwise here.
|
| |
|
| |
|
| |
|
| |
|
|
|