Commit graph

93 commits

Author SHA1 Message Date
Malisa Smith
1a1d8daede added spaces around - sign 2016-07-07 13:29:58 -07:00
Malisa Smith
854cb5839f added comment to profiler get_statistics function 2016-07-07 13:19:45 -07:00
Malisa Smith
e1092b8b1d simplifying min and max calculation for profiler get_statistics function 2016-07-07 13:08:20 -07:00
Malisa Smith
7dccf09ff6 added test and assertion that profiler statistics data must be sorted 2016-07-07 12:59:16 -07:00
Jeena Lee
d47b769cf7 Add test for Profiler::get_statistics, and remove empty space around Profiler::get_statistics.
Profiler::get_statistics calculates mean, median, min, and max for a given vector of data. This commit adds a test for the calculated statistics.
2016-07-07 11:00:56 -07:00
Malisa Smith
6230911330 separate profiler statistics calculation to its own function 2016-07-07 10:18:10 -07:00
Anthony Ramine
5a576e873e Move util::time::duration_from_seconds to profile::time 2016-06-29 18:00:24 +02:00
Rahul Sharma
15a2064c0d implement related sw interface and register method 2016-06-02 04:09:39 +05:30
Patrick Walton
a86f77e36d script: Keep the DOM-side viewport up to date when scrolling happens in
WebRender.

This happens asynchronously, just as it does in non-WebRender mode.

This functionality is a prerequisite for doing proper display-list-based
hit testing in WebRender, since it moves the scroll offsets into Servo
(and, specifically, into the script thread, enabling iframe event
forwarding) instead of keeping them private to WebRender.

Requires servo/webrender_traits#55 and servo/webrender#277.

Partially addresses #11108.
2016-05-31 14:12:51 -07:00
Josh Matthews
3cb8af20c2 Remove empty lines following braces. 2016-05-27 13:32:05 -04:00
Rohit Zambre
7591e1327a replacing commas with tabs; changing from CSV to TSV profiling 2016-05-19 15:07:18 -07:00
Josh Matthews
9e8cf19e51 Add timeline markers for HTTP requests, JS evaluation, and HTML parsing. 2016-05-18 08:02:42 -05:00
Matt Brubeck
d560ae79b4 Fix some warnings 2016-05-11 21:03:12 -07:00
Rohit Zambre
ca3084d241 added infrastructure to handle interval and CSV time profiling alongside html-timeline-profiling 2016-05-11 11:27:07 -07:00
Matt Brubeck
c4f9576368 Make --profile-trace-path work without -p 2016-05-10 14:03:10 -07:00
Matt Brubeck
9b23cf537e Profile time spent saving the screenshot image 2016-05-09 09:43:13 -07:00
Nick Fitzgerald
9fbb5c720e Add a method for dumping self-contained HTML timeline profiles
This commit adds the `--profiler-trace-path` flag. When combined with `-p` to
enable profiling, it dumps a profile as a self-contained HTML file to the given
path. The profile visualizes the traced operations as a gant-chart style
timeline.
2016-04-27 18:35:17 -07:00
Nick Fitzgerald
1997d034fa Take the stdout lock when printing profile data
Acquiring the stdout lock while printing the profile data prevents other
messages printed to stdout from being interleaved with prints from elsewhere.
2016-04-14 12:28:00 -07:00
Patrick Walton
b29719e36b layout: Rewrite the block formatting context/float inline-size
speculation code.

The old code tried to do the speculation as a single bottom-up pass
after intrinsic inline-size calculation, which was unable to handle
cases like this:

    <div>
        <div style="float: left">Foo</div>
    </div>
    <div>
        <div style="overflow: hidden">Bar</div>
    </div>

No single bottom-up pass could possibly handle this case, because the
inline-size of the float flowing out of the "Foo" block could never make
it down to the "Bar" block, where it is needed for speculation.

On the pages I tried, this regresses layout performance by 1%-2%.

I first noticed this breaking some pages, like the Google SERPs, several
months ago.
2016-03-25 18:39:16 -07:00
Patrick Walton
5ea8c34276 layout: Move overflow calculation to be a separate, sequential,
bottom-up pass.

Right now, the only reason that overflow calculation works is that we
rely on script inducing extra reflows that are sent for display. This
was preventing #10021 from landing.

This change regresses layout performance by about 1% in my tests.

Fixes #7797 properly.
2016-03-18 22:11:51 -07:00
Martin Robinson
e7019f2721 Flatten display list structure
Instead of producing a tree of stacking contexts, display list
generation now produces a flat list of display items and a tree of
stacking contexts. This will eventually allow display list construction
to produce and modify WebRender vertex buffers directly, removing the
overhead of display list conversion.  This change also moves
layerization of the display list to the paint thread, since it isn't
currently useful for WebRender.

To accomplish this, display list generation now takes three passes of
the flow tree:

        1. Calculation of absolute positions.
        2. Collection of a tree of stacking contexts.
        3. Creation of a list of display items.

After collection of display items, they are sorted based upon the index
of their parent stacking contexts and their position in CSS 2.1
Appendeix E stacking order.

This is a big change, but it actually simplifies display list generation.
2016-03-01 14:50:07 -08:00
Keith Yeung
ace5b7a2e8 Implement planned navigation 2016-02-18 06:37:32 -05:00
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Johannes Linke
6b215f38ee Fix a bunch of clippy lints 2016-01-02 23:27:15 +01:00
Patrick Walton
df93b1f194 gfx: Measure text shaping time in the time profiler. 2015-12-15 13:28:05 -08:00
James Sanders
3659218c59 Use thread::sleep instead of deprecated sleep_ms
Similarly, change one instance of `thread::park_timeout_ms`.

Fixes #8694
2015-11-29 13:41:04 -07:00
Patrick Walton
1c130819ca compositing: Split Servo up into multiple sandboxed processes.
Multiprocess mode is enabled with the `-M` switch, and sandboxing is
enabled with the `-S` switch.
2015-11-19 16:38:04 -05:00
benshu
7623e89506 Execute XHR timeout callbacks directly. (Fixes #8468.) 2015-11-11 23:12:07 +01:00
Ms2ger
ff0acccc06 Consolidate ProfilerMetadata and TimerMetadata.
There is no good reason to have the two types.

This also means that the result of LayoutTask::profiler_metadata no longer
borrows the LayoutTask, which I'll need later.
2015-11-09 09:03:50 +01:00
benshu
553a0dbefd Timers are scheduled by a dedicated per-constellation thread. 2015-10-21 16:40:49 +02:00
Corey Farwell
20beaf5af3 Fix issues found by rust-clippy 2015-10-12 20:21:49 -04:00
Connor Imes
3c25f47dbc Add energy monitoring and characterization scripts 2015-09-09 13:35:21 -05:00
Connor Imes
d746835344 Combine script profiling with profile crates. Fixes #7514. 2015-09-04 16:09:44 -05:00
Simon Sapin
40b4348824 Upgrade to rustc 1.4.0-dev (cb9323ec0 2015-09-01) 2015-09-02 09:22:17 +02:00
Mathieu Rheaume
ba1109b920 Issue #7501 emove unused time function in time module of profile 2015-09-01 21:51:57 -04:00
Connor Imes
054cbf2dce Integrate with simple Heartbeats 2015-08-22 07:45:20 +08:00
João Oliveira
0038580abf Replace uses of for foo in bar.iter() and for foo in bar.iter_mut()
closes #7197
2015-08-15 02:27:39 +01:00
Patrick Walton
f10c076180 profile: Make the time and memory profilers run over IPC.
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new
threads.
2015-07-24 17:02:17 -07:00
Manish Goregaokar
89d4ee88f4 Audit and reduce unstable usage in profile
Reasons behind existing unstable features:

collections:

 - `[T].tail()` (naming)
   - Could use iterators instead
2015-06-10 00:20:12 +05:30
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
Nicholas Nethercote
ce36e574f4 Rename lots of profiling-related things.
------------------------------------------------------------------------
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.
2015-03-25 16:00:23 -07:00
Nicholas Nethercote
52447ccd9b Move profiler code from util into a new crate profile.
- 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.
2015-03-24 02:09:31 -07:00
Renamed from components/util/time.rs (Browse further)