Giter Site home page Giter Site logo

scheddisplay's Introduction

SchedDisplay

SchedDisplay is a visualization tool for SchedLog, a custom ring buffer collecting scheduling events in the Linux kernel.

(Note that SchedDisplay is currently being rewritten into TraceDisplay, a visualization tool for trace-cmd records.)

example

SchedDisplay in a few Steps

  1. Build and launch the webserver with ./docker script.
  2. Open the web app http://localhost:5006/v0.
  3. Select a tarball file which contains the data recorded during an experiment and then click select. (see below for record/import)
  4. Select a json file which contains the instructions on how to build the lines in the image from the recorded data and then click select. Uploading a local json file is also supported. (see below for writing custom instructions)
  5. Select Figure to view the image.

There are additional tabs in the application. The Console tab reports progress and errors. The Stat tab computes statistics. The Var tab shows available events in the SchedLog kernel.

A jupyter environment is also available https://localhost (the ssl certificate is generated by jupyter-notebook.sh). The token can be obtain by running docker exec -ti NAME_OF_SCHEDDISPLAY_CONTAINER jupyter notebook list. Feel free to duplicate and modify ./examples/notebook/jupyter-example.ipynb.

The tarball record

You can try SchedDisplay with the trace provided in ./examples/trace/kbuild-sched-example.tar. To record your own trace, follow these instructions:

  1. install the SchedLog kernel.
  2. record your experiment with the sched_log script.
  3. convert the per-cpu buffers into compressed numpy arrays with the report.py script.
  4. create the tarball and store it in ./examples/trace

A tarball must at least contain the following files:

  • sched_log_traced_events.start (a copy of /proc/sched_log_traced_events) which contains the mapping EVENT_ID -> EVENT_NAME.
  • timestamp.npz
  • pid.npz
  • event.npz
  • cpu.npz
  • arg1.npz
  • arg0.npz

Check RecordSchedLog to discover how we automate our experiments.

The json instructions

The input field lists the data required to build the image. Some data are directly recorded through SchedLog (timestamp, cpu, event, pid, arg0, arg1). Other data must be computed.

The output field lists the data to store in the image. Some data are mandatory (x0,y0,x1,y1,c).

The c field lists instructions on how to build categories of lines. For example, the following category draws small vertical lines when the frequency measured at a scheduling tick is between 1.2 and 1.7 GHz on a given CPU.

{
        "label" : "[1.2, 1.7] GHz",
        "color" : "#8ded6d",
        "concatenate" : [[
                ["query","event==$TICK & arg1>1200000 & arg1<=1700000"],
                ["=","x0","timestamp"],
                ["=","x1","timestamp"],
                ["=","y0",["+","cpu",0.0]],
                ["=","y1",["+","cpu",0.5]]
        ]]
},

See examples/line/freq4_new.json for a full example.

scheddisplay's People

Contributors

carverdamien avatar jplozi avatar rgouicem avatar

Stargazers

wdkirchhoff avatar 0.alpha avatar

Watchers

James Cloos avatar  avatar

scheddisplay's Issues

Search Feature

User gives an automata to the tool and it will return sequences in the data that are accepted by the automata.

Track filiation

@damien, j'ai joué un peu plus avec nxt_of_same_evt_on_same_cpu pour essayer de mettre une couleur correspondante a comm. Ca ne marche pas vraiment. Le pb est que comm n'est valide qu'a partir du exec pour un nouveau processus. On colorise donc avec l'info du pere. Il faudrait pouvoir tracer depuis un enqueue jusqu'a un exec, puis de l'exec jusqu'au dequeue du process.

Speedup compute

{
    "columns": {
        "y1":["+",["copy","cpu"],0.75],
        "x1":["nxt_of_same_evt_on_same_cpu","timestamp"]
    },
    "hdf5": ["./raw/hackbench/256-linux-comm.hdf5"],
    "renderers": [
        {
            "filter": ["&",["==","event",13],[">","arg0",0]],
            "label": "RQSIZE>0",
            "line_color": "#666666",
            "x0": "timestamp", "x1": "x1",
            "y0": "cpu", "y1": "cpu"
        },

         {
            "filter": ["&",["==","event",2], ["==","comm",8]],
            "label": "Wakeup gcc 8",
            "line_color": "#ffff00",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },
        {
            "filter": ["&",["|", ["==","event",3], ["==","event",0]], ["==","comm",8]],
            "label": "new gcc",
            "line_color": "#ffff0F",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },

         {
            "filter": ["&",["==","event",4], ["==","comm",6]],
            "label": "Block make 6",
            "line_color": "#AA0000",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },
        {
            "filter": ["&",["==","event",2], ["==","comm",6]],
            "label": "Wakeup make",
            "line_color": "#ff0000",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },
        {
            "filter": ["&",["==","event",3], ["==","comm",6]],
            "label": "new make",
            "line_color": "#ff000F",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },

       {
            "filter": ["&",["==","event",2], ["==","comm",9]],
            "label": "Wakeup bash 9",
            "line_color": "#00ff00",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        },
        {
            "filter": ["&",["|", ["==","event",3], ["==","event",0]], ["==","comm",9]],
            "label": "new bash",
            "line_color": "#00ff0F",
            "x0": "timestamp", "x1": "timestamp",
            "y0": "cpu", "y1": "y1"
        }

    ],
    "truncate": {
        "cursor": 80000000,
        "mode": "index",
        "width": 10000
    }
}

SchedLog: improve recording of task->comm. Add a new_comm event.

Some task->comm are missing

Check if

  • there are exec_evt with unknown comm and display them. (All exec_evt had a comm, there were multiple addr mapping to the same comm because bytes after '\0' are not cleared)
  • there are processes with unknown comm and display them
  • Miss reading the data (yes=> fix, no=>Error in data)
  • p->comm is never updated
  • p->comm is updated after exec_evt

Seamless transition between datashader and renderers

Je me rend compte qu'on a (au moins) deux besoins en terme d'affichage. Une vue globale qui permet de rechercher des phases, et une vue locale pour comprendre ce qui se passe avec le detail des evts.
Pour la vue locale c'est bon.
Pour la vue globale c'est trop lent. Il faut mettre une taille tres grande et le temps d'affichage devient prohibitif, meme avec un script simplifié qui n'affiche que rqsize!=0.

Upload hdf5 button OR FileExplorerView?

Upload hdf5 button

CON:

  • users have to store them locally
  • users need a good network bandwidth

PRO:

  • Reuse system file selection

FileExplorerView for files on server

CON:

  • wasting dev time
  • users cannot name/organize the files

PRO:

  • Ready to use by anyone
  • Can change file format independently from users

Annotations/Comments/Markers

un truc qui serait utile serait de pouvoir inserer des notes a des timestamps donné. Il faudrait pouvoir sauver les notes dans un fichier separé pour pouvoir les recharger.

Fix Reset Tool

  • set reset_policy to event_only

  • add reset event handler

Time axis in seconds

Pour l'echelle de temps, je trouve que la puissance variable est tres confusante. Ca serait bien de rester en ^9 (soit secondes). Si on pouvait rentrer width ou curseur en seconde, ca serait meme mieux.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.