Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Add a basic memory profiler, invoked with -m. #2720
Conversation
|
Critic review: https://critic.hoppipolla.co.uk/r/1908 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @jdm (or someone else) soon. |
|
Sweet! r=me with nits addressed. |
|
I addressed the minor nits except for the |Instrumentation| suggestion, because I couldn't work out how to create a new module, and it also felt like overkill. I also added a second patch that renames Profiler as TimeProfiler. pcwalton, can you please re-review? The Mac Travis CI run failed, but it looked like an infrastructure problem? |
|
@nnethercote I'm looking into the travisci failure - it appears to be a network timeout installing autoconf213, which is required by our ancient version of SpiderMonkey. |
|
On TravisCI, I get:
|
And likewise for |ProfilerChan|, |profiler_chan|, and so on. This contrasts nicely with the newly added |MemoryProfiler|.
|
I fixed the Mac-only travis errors and rebased. Should be good for re-review now. |
This comment has been minimized.
This comment has been minimized.
|
r+ |
Add a basic memory profiler, invoked with -m. r=pcwalton.
This adds a basic memory profiler. It's invoked with the -m option. Sample
output:
It currently only works on Linux. On other platforms, "???" will be printed
instead.
I chose to make the memory profiler entirely separate from the existing
profiler, as opposed to augmenting it. They are/will be different enough beasts
that this seemed the right thing to do. But it did result in a bit of copy &
pasting. And if you run with both -p and -m, the output can be interleaved,
which isn't ideal.
Something I didn't do, which might make sense, is to rename Profiler (and all
related names) as TimeProfiler. That name would nicely match the |time| module
name.
The option_try! macro might be a useful thing to add to Rust's std::macros.