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.
This commit is contained in:
Nicholas Nethercote 2015-03-22 15:20:31 -07:00
parent 7f587f6cb5
commit ce36e574f4
19 changed files with 322 additions and 331 deletions

View file

@ -41,9 +41,9 @@ use net::storage_task::{StorageTaskFactory, StorageTask};
#[cfg(not(test))]
use gfx::font_cache_task::FontCacheTask;
#[cfg(not(test))]
use profile::mem::MemoryProfiler;
use profile::mem;
#[cfg(not(test))]
use profile::time::TimeProfiler;
use profile::time;
#[cfg(not(test))]
use util::opts;
#[cfg(not(test))]
@ -70,8 +70,8 @@ impl Browser {
let (compositor_proxy, compositor_receiver) =
WindowMethods::create_compositor_channel(&window);
let time_profiler_chan = TimeProfiler::create(opts.time_profiler_period);
let memory_profiler_chan = MemoryProfiler::create(opts.memory_profiler_period);
let time_profiler_chan = time::Profiler::create(opts.time_profiler_period);
let mem_profiler_chan = mem::Profiler::create(opts.mem_profiler_period);
let devtools_chan = opts.devtools_port.map(|port| {
devtools::start_server(port)
});
@ -100,7 +100,7 @@ impl Browser {
image_cache_task,
font_cache_task,
time_profiler_chan.clone(),
memory_profiler_chan.clone(),
mem_profiler_chan.clone(),
devtools_chan,
storage_task);
@ -124,7 +124,7 @@ impl Browser {
compositor_receiver,
constellation_chan,
time_profiler_chan,
memory_profiler_chan);
mem_profiler_chan);
Browser {
compositor: compositor,