Skip to content

Performance instrumentation #241

Closed
Closed

Description

@brson

We need to be able to make repeatable performance measurements of various kinds. There is very minimal code for this already in servo in the form of a time function, but we need much more. We want servo designed for gecko-style telemetry from the beginning, so it would serve us well to do some up-front investigation into what they are doing.

Some types of metrics we care about:

  • Speed of specific sections of code
  • Latency between two events
  • Memory usage of a task over time
  • Per-type memory usage

We need a reporting infrastructure that allows measurements to be reported and recorded in a structured way. We'll want to track metrics over time. I imagine having a global metrics task that dumps them to a database at shutdown.

For memory profiling in particular we'll want to make improvements to the Rust runtime, at minimum we'll want a way to give tasks names, associate allocations with names of Rust types, and to be able to periodically interrogate the allocations of a task, maybe register for allocator events.

We'll also need a way to integrate our metrics with whatever metrics SpiderMonkey offers.

Activity

  1. atris commented on Jan 15, 2013

    @atris

    The third point seems just like the project I did...Does it sound nice if I bring it to the latest tree and do the performance statistics? Because if we can do that, that will solve the third point.

    The fourth point is what we were initially planning for extension on the memory watcher project.

    The design seems pretty coherent.The global metrics task brings back some memories :)

    We can get the function names through the LLVM call stack. memory watcher already gives the task Id,type and size of the memory allocated.

    Second point can be solved by spawning two tasks for the two events been measured,and use time function to independently measure them.this needs more research.

    Point one needs thinking.

    Do we plan to interface it with telemetry in any way?

  2. brson commented on Jan 15, 2013

    @brson
    ContributorAuthor

    Yes, go ahead and measure the performance impact of your implementation. I don't know if gecko's telemetry is something we can interface with or just something to immitate - I don't know anything about it.

  3. mbrubeck commented on May 24, 2016

    @mbrubeck
    Contributor

    Servo now has various infrastructure for time and memory profiling.

  4. added a commit that references this issue on Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions