Skip to content

Task accounting statistics #2931

Closed
Closed
@bblum

Description

@bblum
Contributor

It would be cool if the scheduler exposed statistics about tasks. Currently all I have in mind is time alive / time on CPU / time blocked.

Activity

eholk

eholk commented on Jul 16, 2012

@eholk
Contributor

It'd also be nice to be able to give tasks names.

bblum

bblum commented on Jul 16, 2012

@bblum
ContributorAuthor

oh, yeah, there's a hole for that already in the runtime code, just no way to do it.

eholk

eholk commented on Jul 16, 2012

@eholk
Contributor

Yeah, ideally we'd have task::set_name, but then we have to deal with passing strings to the runtime. It's not hard, but it's always enough to discourage me from it.

bblum

bblum commented on Jul 16, 2012

@bblum
ContributorAuthor

as_c_str, and strcpy on the runtime side? (well, strdup, probably)

eholk

eholk commented on Jul 17, 2012

@eholk
Contributor

I think that's basically it.

bblum

bblum commented on Jul 17, 2012

@bblum
ContributorAuthor

hey @eholk, what do you think of this scary comment in rust_task.h?

// Only a pointer to 'name' is kept, so it must live as long as this task.

EDIT: it's ok as is, because the only args are ever "main" or NULL. it's just hinting that it needs a strdup.

eholk

eholk commented on Jul 18, 2012

@eholk
Contributor

Yeah, I was thinking maybe just allocate a fixed sized char buffer and copy the string into it.

graydon

graydon commented on May 8, 2013

@graydon
Contributor

still valid, and I think important enough for production use (accounting / profiling of tasks in general) that I'm going to nominate for production ready.

brson

brson commented on May 16, 2013

@brson
Contributor

Some stats relevant to the new scheduler:

  • Sends - can either rendezvous with the receiving task and context switch immediately or not
  • Receive - can either block or not
  • Work stealing - how many times schedulers become stealers, and how often this is successful
  • I/O - how often outstanding I/O forces the scheduler to go into slower scheduling modes
  • I/O affinity - how often tasks must be sent to other threads to satisfy I/O
graydon

graydon commented on Jun 6, 2013

@graydon
Contributor

accepted for well-covered milestone

graydon

graydon commented on Jun 28, 2013

@graydon
Contributor

See also #6810

catamorphism

catamorphism commented on Sep 23, 2013

@catamorphism
Contributor

Re-nominating in order to de-milestone this; we're trying to cut back the milestones to a more manageable size and this doesn't seem like a blocker to me.

catamorphism

catamorphism commented on Sep 26, 2013

@catamorphism
Contributor

Just a bug, de-milestoning

5 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @graydon@eholk@brson@catamorphism@thestinger

        Issue actions

          Task accounting statistics · Issue #2931 · rust-lang/rust