Created
March 1, 2016 11:23
-
-
Save derkling/0dbc91c1c281a5541697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Report available at this link:\n", | |
" https://docs.google.com/document/d/1f2NpnYUS0ci_sLn4i2IY6ZKrRVOqRNnktI9xnt4yK6w/edit" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import logging\n", | |
"reload(logging)\n", | |
"logging.basicConfig(\n", | |
" format='%(asctime)-9s %(levelname)-8s: %(message)s',\n", | |
" datefmt='%I:%M:%S')\n", | |
"\n", | |
"# Enable logging at INFO level\n", | |
"logging.getLogger().setLevel(logging.INFO)\n", | |
"# Comment the follwing line to disable devlib debugging statements\n", | |
"#logging.getLogger('ssh').setLevel(logging.DEBUG)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Populating the interactive namespace from numpy and matplotlib\n" | |
] | |
} | |
], | |
"source": [ | |
"# Generate plots inline\n", | |
"%pylab inline\n", | |
"\n", | |
"import json\n", | |
"import os\n", | |
"import subprocess\n", | |
"\n", | |
"# Support to access the remote target\n", | |
"import devlib\n", | |
"from env import TestEnv\n", | |
"\n", | |
"# Support for trace events analysis\n", | |
"from trace import Trace\n", | |
"from trace_analysis import TraceAnalysis\n", | |
"\n", | |
"# Support to configure and run RTApp based workloads\n", | |
"from wlgen import RTA\n", | |
"\n", | |
"# Support for performance analysis of RTApp workloads\n", | |
"from perf_analysis import PerfAnalysis\n", | |
"\n", | |
"# Suport for FTrace events parsing and visualization\n", | |
"import trappy" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Test environment setup" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"# Setup a target configuration\n", | |
"my_target_conf = {\n", | |
" \n", | |
" # Define the kind of target platform to use for the experiments\n", | |
" \"platform\" : 'linux', # Linux system, valid other options are:\n", | |
" # android - access via ADB\n", | |
" # linux - access via SSH\n", | |
" # host - direct access\n", | |
" \n", | |
" # Preload settings for a specific target\n", | |
" \"board\" : 'juno', # load JUNO specific settings, e.g.\n", | |
" # - HWMON based energy sampling\n", | |
" # - Juno energy model\n", | |
" # valid options are:\n", | |
" # - juno - JUNO Development Board\n", | |
" # - tc2 - TC2 Development Board\n", | |
" # - oak - Mediatek MT63xx based target\n", | |
"\n", | |
" # Define devlib module to load\n", | |
" \"exclude_modules\" : [\n", | |
" 'hwmon', # do not load HWMON, we do not need to measure NRG\n", | |
" ],\n", | |
"\n", | |
" # Account to access the remote target\n", | |
" \"host\" : '10.1.208.145',\n", | |
" \"username\" : 'root',\n", | |
" \"password\" : '',\n", | |
"\n", | |
" # Comment the following line to force rt-app calibration on your target\n", | |
" \"rtapp-calib\" : {\n", | |
" '0': 361, '1': 138, '2': 138, '3': 352, '4': 360, '5': 353\n", | |
" }\n", | |
"\n", | |
"}\n", | |
"\n", | |
"# Setup the required Test Environment supports\n", | |
"my_tests_conf = {\n", | |
" \n", | |
" # Binary tools required to run this experiment\n", | |
" # These tools must be present in the tools/ folder for the architecture\n", | |
" \"tools\" : ['rt-app', 'taskset', 'trace-cmd'],\n", | |
" \n", | |
" # FTrace events end buffer configuration\n", | |
" \"ftrace\" : {\n", | |
" \"events\" : [\n", | |
" \"cpu_frequency\",\n", | |
" \"sched_load_avg_cpu\",\n", | |
" \"sched_load_avg_task\",\n", | |
" \"sched_switch\",\n", | |
" ],\n", | |
" \"buffsize\" : 10240\n", | |
" },\n", | |
"\n", | |
"}" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"08:12:34 INFO : Target - Using base path: /home/patbel01/Code/schedtest\n", | |
"08:12:34 INFO : Target - Loading custom (inline) target configuration\n", | |
"08:12:34 INFO : Target - Loading custom (inline) test configuration\n", | |
"08:12:34 INFO : Target - Devlib modules to load: ['bl', 'cpufreq']\n", | |
"08:12:34 INFO : Target - Connecting linux target with: {'username': 'root', 'host': '10.1.208.145', 'password': ''}\n", | |
"08:12:39 INFO : Target - Initializing target workdir [/root/devlib-target]\n", | |
"08:12:47 INFO : Target topology: [[0, 3, 4, 5], [1, 2]]\n", | |
"08:12:48 INFO : Platform - Loading default EM [/home/patbel01/Code/schedtest/libs/utils/platforms/juno.json]...\n", | |
"08:12:49 INFO : FTrace - Enabled events:\n", | |
"08:12:49 INFO : FTrace - ['cpu_frequency', 'sched_load_avg_cpu', 'sched_load_avg_task', 'sched_switch']\n", | |
"08:12:49 INFO : FTrace - None\n", | |
"08:12:49 INFO : EnergyMeter - HWMON module not enabled\n", | |
"08:12:49 WARNING : EnergyMeter - Energy sampling disabled by configuration\n", | |
"08:12:49 INFO : Loading RTApp calibration from configuration file...\n", | |
"08:12:49 INFO : Using RT-App calibration values: {\"0\": 361, \"1\": 138, \"2\": 138, \"3\": 352, \"4\": 360, \"5\": 353}\n", | |
"08:12:49 INFO : TestEnv - Set results folder to:\n", | |
"08:12:49 INFO : TestEnv - /home/patbel01/Code/schedtest/results/20160216_201249\n", | |
"08:12:49 INFO : TestEnv - Experiment results available also in:\n", | |
"08:12:49 INFO : TestEnv - /home/patbel01/Code/schedtest/results_latest\n" | |
] | |
} | |
], | |
"source": [ | |
"# Initialize a test environment using:\n", | |
"# the provided target configuration (my_target_conf)\n", | |
"# the provided test configuration (my_test_conf)\n", | |
"te = TestEnv(target_conf=my_target_conf, test_conf=my_tests_conf)\n", | |
"target = te.target" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Workload configuration" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"08:12:50 INFO : WlGen - Setup new workload simple\n", | |
"08:12:50 INFO : RTApp - Workload duration defined by longest task\n", | |
"08:12:50 INFO : RTApp - Default policy: SCHED_OTHER\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [jumper], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 3,4\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (250 loops)\n", | |
"08:12:50 INFO : RTApp - | period 20000 [us], duty_cycle 20 %\n", | |
"08:12:50 INFO : RTApp - | run_time 4000 [us], sleep_time 16000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [rt_l1], sched: {'policy': 'FIFO'}\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 3\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (250 loops)\n", | |
"08:12:50 INFO : RTApp - | period 20000 [us], duty_cycle 10 %\n", | |
"08:12:50 INFO : RTApp - | run_time 2000 [us], sleep_time 18000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [rt_l2], sched: {'policy': 'FIFO'}\n", | |
"08:12:50 INFO : RTApp - | start delay: 0.300000 [s]\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 4\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (250 loops)\n", | |
"08:12:50 INFO : RTApp - | period 20000 [us], duty_cycle 10 %\n", | |
"08:12:50 INFO : RTApp - | run_time 2000 [us], sleep_time 18000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [task_p20], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 0\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (50 loops)\n", | |
"08:12:50 INFO : RTApp - | period 100000 [us], duty_cycle 20 %\n", | |
"08:12:50 INFO : RTApp - | run_time 20000 [us], sleep_time 80000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [task_p50_1], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 1\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (12 loops)\n", | |
"08:12:50 INFO : RTApp - | period 400000 [us], duty_cycle 50 %\n", | |
"08:12:50 INFO : RTApp - | run_time 200000 [us], sleep_time 200000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [task_p50_2], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | start delay: 0.350000 [s]\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 1\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (12 loops)\n", | |
"08:12:50 INFO : RTApp - | period 400000 [us], duty_cycle 20 %\n", | |
"08:12:50 INFO : RTApp - | run_time 80000 [us], sleep_time 320000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [task_r20_5-60], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 5\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 1.000000 [s] (10 loops)\n", | |
"08:12:50 INFO : RTApp - | period 100000 [us], duty_cycle 5 %\n", | |
"08:12:50 INFO : RTApp - | run_time 5000 [us], sleep_time 95000 [us]\n", | |
"08:12:50 INFO : RTApp - + phase_000002: duration 1.000000 [s] (10 loops)\n", | |
"08:12:50 INFO : RTApp - | period 100000 [us], duty_cycle 25 %\n", | |
"08:12:50 INFO : RTApp - | run_time 25000 [us], sleep_time 75000 [us]\n", | |
"08:12:50 INFO : RTApp - + phase_000003: duration 1.000000 [s] (10 loops)\n", | |
"08:12:50 INFO : RTApp - | period 100000 [us], duty_cycle 45 %\n", | |
"08:12:50 INFO : RTApp - | run_time 45000 [us], sleep_time 55000 [us]\n", | |
"08:12:50 INFO : RTApp - ------------------------\n", | |
"08:12:50 INFO : RTApp - task [task_render_1], sched: using default policy\n", | |
"08:12:50 INFO : RTApp - | calibration CPU: 1\n", | |
"08:12:50 INFO : RTApp - | loops count: 1\n", | |
"08:12:50 INFO : RTApp - | CPUs affinity: 2\n", | |
"08:12:50 INFO : RTApp - + phase_000001: duration 5.000000 [s] (312 loops)\n", | |
"08:12:50 INFO : RTApp - | period 16000 [us], duty_cycle 62 %\n", | |
"08:12:50 INFO : RTApp - | run_time 9920 [us], sleep_time 6080 [us]\n" | |
] | |
} | |
], | |
"source": [ | |
"# Create a new RTApp workload generator using the calibration values\n", | |
"# reported by the TestEnv module\n", | |
"rtapp = RTA(target, 'simple', calibration=te.calibration())\n", | |
"\n", | |
"# Configure this RTApp instance to:\n", | |
"rtapp.conf(\n", | |
" # 1. generate a \"profile based\" set of tasks\n", | |
" kind='profile',\n", | |
" \n", | |
" # 2. define the \"profile\" of each task\n", | |
" params={\n", | |
" \n", | |
" # 3. PERIODIC task with\n", | |
" 'task_p20': RTA.periodic(\n", | |
" period_ms=100, # period\n", | |
" duty_cycle_pct=20, # duty cycle\n", | |
" duration_s=5, # duration \n", | |
" cpus='0' # pinned on CPU0\n", | |
" ),\n", | |
" \n", | |
" # 4. RAMP task (i.e. increasing load) with\n", | |
" 'task_r20_5-60': RTA.ramp(\n", | |
" start_pct=5, # intial load\n", | |
" end_pct=50, # end load\n", | |
" delta_pct=20, # load % increase...\n", | |
" time_s=1, # ... every 1[s]\n", | |
" # pinned on last CPU of the target\n", | |
" cpus=str(len(target.core_names)-1)\n", | |
" ),\n", | |
" \n", | |
" # 5. Two tasks on the same CPU\n", | |
" 'task_p50_1': RTA.periodic(\n", | |
" period_ms=400, # period\n", | |
" duty_cycle_pct=50, # duty cycle\n", | |
" duration_s=5, # duration \n", | |
" cpus=str(target.bl.bigs[0])\n", | |
" # pinned on first big CPU\n", | |
" ),\n", | |
" 'task_p50_2': RTA.periodic(\n", | |
" period_ms=400, # period\n", | |
" duty_cycle_pct=20, # duty cycle\n", | |
" duration_s=5, # duration \n", | |
" delay_s=0.35,\n", | |
" cpus=str(target.bl.bigs[0])\n", | |
" # pinned on first big CPU\n", | |
" ),\n", | |
" \n", | |
" # 6. Render thread simulation\n", | |
" 'task_render_1': RTA.periodic(\n", | |
" period_ms=16, # period\n", | |
" duty_cycle_pct=62, # duty cycle\n", | |
" duration_s=5, # duration\n", | |
" cpus=str(target.bl.bigs[-1])\n", | |
" # pinned on last big CPU\n", | |
" ),\n", | |
" \n", | |
" # 7. Jumping puppet\n", | |
" 'rt_l1' : RTA.periodic(\n", | |
" period_ms=20, # period\n", | |
" duty_cycle_pct=10, # duty cycle\n", | |
" duration_s=5, # duration\n", | |
" cpus=str(target.bl.littles[1]),\n", | |
" sched={'policy': 'FIFO'}\n", | |
" # Pinned on 2nd LITTLE\n", | |
" ),\n", | |
" 'rt_l2' : RTA.periodic(\n", | |
" period_ms=20, # period\n", | |
" duty_cycle_pct=10, # duty cycle\n", | |
" duration_s=5, # duration\n", | |
" cpus=str(target.bl.littles[2]),\n", | |
" sched={'policy': 'FIFO'},\n", | |
" delay_s = 0.3,\n", | |
" # Pinned on 3rd LITTLE\n", | |
" ),\n", | |
" 'jumper' : RTA.periodic(\n", | |
" period_ms=20, # period\n", | |
" duty_cycle_pct=20, # duty cycle\n", | |
" duration_s=5, # duration\n", | |
" cpus='{},{}'.format(\n", | |
" target.bl.littles[1],\n", | |
" target.bl.littles[2])\n", | |
"# # Pinned on first and second LITTLEs\n", | |
" ),\n", | |
" \n", | |
" },\n", | |
" \n", | |
" # 4. use this folder for task logfiles\n", | |
" run_dir=target.working_directory\n", | |
" \n", | |
");" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Workload execution" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"08:12:51 INFO : #### Enable Utilization estimation\n", | |
"08:12:52 INFO : #### Setup FTrace\n", | |
"08:12:56 INFO : #### Start energy sampling\n", | |
"08:12:56 INFO : #### Start RTApp execution\n", | |
"08:12:56 INFO : WlGen - WlGen [start]: /root/devlib-target/bin/rt-app /root/devlib-target/simple_00.json\n", | |
"08:13:02 INFO : #### Stop FTrace\n", | |
"08:13:03 INFO : #### Save FTrace: /home/patbel01/Code/schedtest/results/20160216_201249/trace.dat\n", | |
"08:13:05 INFO : #### Save platform description: /home/patbel01/Code/schedtest/results/20160216_201249/platform.json\n" | |
] | |
} | |
], | |
"source": [ | |
"logging.info(\"#### Enable Utilization estimation\")\n", | |
"te.target.execute(\"echo UTIL_EST > /sys/kernel/debug/sched_features\")\n", | |
"te.target.execute(\"echo NO_CAP_UTIL_EST > /sys/kernel/debug/sched_features\")\n", | |
"\n", | |
"logging.info('#### Setup FTrace')\n", | |
"te.ftrace.start()\n", | |
"\n", | |
"logging.info('#### Start energy sampling')\n", | |
"#te.emeter.reset()\n", | |
"\n", | |
"logging.info('#### Start RTApp execution')\n", | |
"rtapp.run(out_dir=te.res_dir)\n", | |
"\n", | |
"#logging.info('#### Read energy consumption: %s/energy.json', te.res_dir)\n", | |
"#(nrg, nrg_file) = te.emeter.report(out_dir=te.res_dir)\n", | |
"\n", | |
"logging.info('#### Stop FTrace')\n", | |
"te.ftrace.stop()\n", | |
"\n", | |
"trace_file = os.path.join(te.res_dir, 'trace.dat')\n", | |
"logging.info('#### Save FTrace: %s', trace_file)\n", | |
"te.ftrace.get_trace(trace_file)\n", | |
"\n", | |
"logging.info('#### Save platform description: %s/platform.json', te.res_dir)\n", | |
"(plt, plt_file) = te.platform_dump(te.res_dir)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Trace inspection" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"08:13:06 INFO : Collected events spans a 7.712 [s] time interval\n" | |
] | |
} | |
], | |
"source": [ | |
"# Parse trace\n", | |
"events_to_parse = my_tests_conf['ftrace']['events']\n", | |
"events_to_parse += ['dequeue_task_fair', 'enqueue_task_fair', 'set_next_entity']\n", | |
"trace = Trace(te.platform, te.res_dir, events_to_parse)\n", | |
"# Get the TRAPpy RUN object which has been generated from the trace parsing\n", | |
"ftrace = trace.ftrace" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Overall trace view" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style>\n", | |
"/*\n", | |
"\n", | |
" * Copyright 2015-2016 ARM Limited\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"\n", | |
" * you may not use this file except in compliance with the License.\n", | |
"\n", | |
" * You may obtain a copy of the License at\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * http://www.apache.org/licenses/LICENSE-2.0\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Unless required by applicable law or agreed to in writing, software\n", | |
"\n", | |
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"\n", | |
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"\n", | |
" * See the License for the specific language governing permissions and\n", | |
"\n", | |
" * limitations under the License.\n", | |
"\n", | |
" */\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip {\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" padding: 12px;\n", | |
"\n", | |
" background: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" color: #fff;\n", | |
"\n", | |
" border-radius: 2px;\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip:after {\n", | |
"\n", | |
" box-sizing: border-box;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" display: inline;\n", | |
"\n", | |
" font-size: 10px;\n", | |
"\n", | |
" width: 100%;\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" color: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" content: \"\\25BC\";\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
" text-align: center;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip.n:after {\n", | |
"\n", | |
" margin: -1px 0 0 0;\n", | |
"\n", | |
" top: 100%;\n", | |
"\n", | |
" left: 0;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".contextRect {\n", | |
"\n", | |
" fill: lightgray;\n", | |
"\n", | |
" fill-opacity: 0.5;\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
" stroke-width: 1;\n", | |
"\n", | |
" stroke-opacity: 1;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".chart {\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".mini text {\n", | |
"\n", | |
" font: 9px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".main text {\n", | |
"\n", | |
" font: 12px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".axis line, .axis path {\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".miniItem {\n", | |
"\n", | |
" stroke-width: 8;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".brush .extent {\n", | |
"\n", | |
"\n", | |
"\n", | |
" stroke: #000;\n", | |
"\n", | |
" fill-opacity: .125;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"</style>\n", | |
"<div id=\"fig_82fc5405946c4d8f9af2d1ea989268c8\" class=\"eventplot\">\n", | |
" <script>\n", | |
" var req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
"\n", | |
" \"EventPlot\": '/nbextensions/plotter_scripts/EventPlot/EventPlot',\n", | |
" \"d3-tip\": '/nbextensions/plotter_scripts/EventPlot/d3.tip.v0.6.3',\n", | |
" \"d3-plotter\": '/nbextensions/plotter_scripts/EventPlot/d3.min'\n", | |
" },\n", | |
" shim: {\n", | |
" \"d3-plotter\" : {\n", | |
" \"exports\" : \"d3\"\n", | |
" },\n", | |
" \"d3-tip\": [\"d3-plotter\"],\n", | |
" \"EventPlot\": {\n", | |
"\n", | |
" \"deps\": [\"d3-tip\", \"d3-plotter\" ],\n", | |
" \"exports\": \"EventPlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" req([\"require\", \"EventPlot\"], function() {\n", | |
" EventPlot.generate('fig_82fc5405946c4d8f9af2d1ea989268c8', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# NOTE: The interactive trace visualization is available only if you run\n", | |
"# the workload to generate a new trace-file\n", | |
"trappy.plotter.plot_trace(ftrace)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Add max utilization signal" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"# Add column with util_max = max(util_avg, util_est)\n", | |
"df = ftrace.sched_load_avg_cpu.data_frame\n", | |
"df['util_max'] = df[['util_avg', 'util_est']].max(axis=1)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Periodic (20%) and Ramp (5-25-45%) tasks" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style>\n", | |
"/*\n", | |
"\n", | |
" * Copyright 2015-2016 ARM Limited\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"\n", | |
" * you may not use this file except in compliance with the License.\n", | |
"\n", | |
" * You may obtain a copy of the License at\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * http://www.apache.org/licenses/LICENSE-2.0\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Unless required by applicable law or agreed to in writing, software\n", | |
"\n", | |
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"\n", | |
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"\n", | |
" * See the License for the specific language governing permissions and\n", | |
"\n", | |
" * limitations under the License.\n", | |
"\n", | |
" */\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip {\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" padding: 12px;\n", | |
"\n", | |
" background: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" color: #fff;\n", | |
"\n", | |
" border-radius: 2px;\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip:after {\n", | |
"\n", | |
" box-sizing: border-box;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" display: inline;\n", | |
"\n", | |
" font-size: 10px;\n", | |
"\n", | |
" width: 100%;\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" color: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" content: \"\\25BC\";\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
" text-align: center;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip.n:after {\n", | |
"\n", | |
" margin: -1px 0 0 0;\n", | |
"\n", | |
" top: 100%;\n", | |
"\n", | |
" left: 0;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".contextRect {\n", | |
"\n", | |
" fill: lightgray;\n", | |
"\n", | |
" fill-opacity: 0.5;\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
" stroke-width: 1;\n", | |
"\n", | |
" stroke-opacity: 1;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".chart {\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".mini text {\n", | |
"\n", | |
" font: 9px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".main text {\n", | |
"\n", | |
" font: 12px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".axis line, .axis path {\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".miniItem {\n", | |
"\n", | |
" stroke-width: 8;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".brush .extent {\n", | |
"\n", | |
"\n", | |
"\n", | |
" stroke: #000;\n", | |
"\n", | |
" fill-opacity: .125;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"</style>\n", | |
"<div id=\"fig_f2e4f92364dd44fe8ca8c3c09a2851cb\" class=\"eventplot\">\n", | |
" <script>\n", | |
" var req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
"\n", | |
" \"EventPlot\": '/nbextensions/plotter_scripts/EventPlot/EventPlot',\n", | |
" \"d3-tip\": '/nbextensions/plotter_scripts/EventPlot/d3.tip.v0.6.3',\n", | |
" \"d3-plotter\": '/nbextensions/plotter_scripts/EventPlot/d3.min'\n", | |
" },\n", | |
" shim: {\n", | |
" \"d3-plotter\" : {\n", | |
" \"exports\" : \"d3\"\n", | |
" },\n", | |
" \"d3-tip\": [\"d3-plotter\"],\n", | |
" \"EventPlot\": {\n", | |
"\n", | |
" \"deps\": [\"d3-tip\", \"d3-plotter\" ],\n", | |
" \"exports\": \"EventPlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" req([\"require\", \"EventPlot\"], function() {\n", | |
" EventPlot.generate('fig_f2e4f92364dd44fe8ca8c3c09a2851cb', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# NOTE: The interactive trace visualization is available only if you run\n", | |
"# the workload to generate a new trace-file\n", | |
"trappy.plotter.plot_trace(ftrace, execnames=['task_p20', 'task_r20_5-60'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Task Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_f009ac74fd1d4e889a3165c8829179f0\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_f009ac74fd1d4e889a3165c8829179f0', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_7bbcdf5a8d684ca4b1b0957208283afb\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_7bbcdf5a8d684ca4b1b0957208283afb', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_f009ac74fd1d4e889a3165c8829179f0_legend\"></div></td>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_7bbcdf5a8d684ca4b1b0957208283afb_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# These two paramatere are passed to the LinePlot call as long with the\n", | |
"# TRAPpy Run object\n", | |
"trappy.ILinePlot(\n", | |
" ftrace, # TRAPpy RUN object\n", | |
" signals=[\n", | |
" 'sched_load_avg_task:util_avg',\n", | |
" 'sched_load_avg_task:util_est'\n", | |
" ],\n", | |
" pivot='pid',\n", | |
" filters={'comm': ['task_p20', 'task_r20_5-60']},\n", | |
" drawstyle='steps-post',\n", | |
"# sync_zoom=True,\n", | |
"# group='PeriodicAndRamp',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## CPU Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_50dd6a15fcb64efebbfd8b2436b70b5f\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_50dd6a15fcb64efebbfd8b2436b70b5f', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_87efac4ec8994c11a9521e0f6b1697c7\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_87efac4ec8994c11a9521e0f6b1697c7', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_50dd6a15fcb64efebbfd8b2436b70b5f_legend\"></div></td>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_87efac4ec8994c11a9521e0f6b1697c7_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"trappy.ILinePlot(\n", | |
" ftrace,\n", | |
" signals=[\n", | |
" 'sched_load_avg_cpu:util_avg',\n", | |
" #'sched_load_avg_cpu:util_est',\n", | |
" 'sched_load_avg_cpu:util_max',\n", | |
" ],\n", | |
" pivot='cpu',\n", | |
" filters={'cpu': [0, 5]},\n", | |
" drawstyle='steps-post',\n", | |
" scatter=False,\n", | |
"# sync_zoom=True,\n", | |
"# group='PeriodicAndRamp',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Two tasks (50%, 20%) on same CPU with long period (400ms)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style>\n", | |
"/*\n", | |
"\n", | |
" * Copyright 2015-2016 ARM Limited\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"\n", | |
" * you may not use this file except in compliance with the License.\n", | |
"\n", | |
" * You may obtain a copy of the License at\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * http://www.apache.org/licenses/LICENSE-2.0\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Unless required by applicable law or agreed to in writing, software\n", | |
"\n", | |
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"\n", | |
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"\n", | |
" * See the License for the specific language governing permissions and\n", | |
"\n", | |
" * limitations under the License.\n", | |
"\n", | |
" */\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip {\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" padding: 12px;\n", | |
"\n", | |
" background: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" color: #fff;\n", | |
"\n", | |
" border-radius: 2px;\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip:after {\n", | |
"\n", | |
" box-sizing: border-box;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" display: inline;\n", | |
"\n", | |
" font-size: 10px;\n", | |
"\n", | |
" width: 100%;\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" color: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" content: \"\\25BC\";\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
" text-align: center;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip.n:after {\n", | |
"\n", | |
" margin: -1px 0 0 0;\n", | |
"\n", | |
" top: 100%;\n", | |
"\n", | |
" left: 0;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".contextRect {\n", | |
"\n", | |
" fill: lightgray;\n", | |
"\n", | |
" fill-opacity: 0.5;\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
" stroke-width: 1;\n", | |
"\n", | |
" stroke-opacity: 1;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".chart {\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".mini text {\n", | |
"\n", | |
" font: 9px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".main text {\n", | |
"\n", | |
" font: 12px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".axis line, .axis path {\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".miniItem {\n", | |
"\n", | |
" stroke-width: 8;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".brush .extent {\n", | |
"\n", | |
"\n", | |
"\n", | |
" stroke: #000;\n", | |
"\n", | |
" fill-opacity: .125;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"</style>\n", | |
"<div id=\"fig_fb3ab0206d9746368a868ce36db76fd0\" class=\"eventplot\">\n", | |
" <script>\n", | |
" var req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
"\n", | |
" \"EventPlot\": '/nbextensions/plotter_scripts/EventPlot/EventPlot',\n", | |
" \"d3-tip\": '/nbextensions/plotter_scripts/EventPlot/d3.tip.v0.6.3',\n", | |
" \"d3-plotter\": '/nbextensions/plotter_scripts/EventPlot/d3.min'\n", | |
" },\n", | |
" shim: {\n", | |
" \"d3-plotter\" : {\n", | |
" \"exports\" : \"d3\"\n", | |
" },\n", | |
" \"d3-tip\": [\"d3-plotter\"],\n", | |
" \"EventPlot\": {\n", | |
"\n", | |
" \"deps\": [\"d3-tip\", \"d3-plotter\" ],\n", | |
" \"exports\": \"EventPlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" req([\"require\", \"EventPlot\"], function() {\n", | |
" EventPlot.generate('fig_fb3ab0206d9746368a868ce36db76fd0', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# NOTE: The interactive trace visualization is available only if you run\n", | |
"# the workload to generate a new trace-file\n", | |
"trappy.plotter.plot_trace(ftrace, execnames=['task_p50_1', 'task_p50_2'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Task Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_3e05f02479b14b0a8d43b4d484412475\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_3e05f02479b14b0a8d43b4d484412475', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_d0a2255d3c944b1198782ce1353d9dc9\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_d0a2255d3c944b1198782ce1353d9dc9', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_3e05f02479b14b0a8d43b4d484412475_legend\"></div></td>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_d0a2255d3c944b1198782ce1353d9dc9_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# These two paramatere are passed to the LinePlot call as long with the\n", | |
"# TRAPpy Run object\n", | |
"trappy.ILinePlot(\n", | |
" ftrace, # TRAPpy RUN object\n", | |
" signals=[\n", | |
" 'sched_load_avg_task:util_avg',\n", | |
" 'sched_load_avg_task:util_est'\n", | |
" ],\n", | |
" pivot='pid',\n", | |
" filters={'comm': ['task_p50_1', 'task_p50_2']},\n", | |
" drawstyle='steps-post',\n", | |
" sync_zoom=True,\n", | |
" group='TwoTasks',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## CPU Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_58cbfcde1cfb4ca9839560477da8c03a\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_58cbfcde1cfb4ca9839560477da8c03a', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_58cbfcde1cfb4ca9839560477da8c03a_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"trappy.ILinePlot(\n", | |
" ftrace,\n", | |
" signals=[\n", | |
" 'sched_load_avg_cpu:util_avg',\n", | |
" #'sched_load_avg_cpu:util_est',\n", | |
" 'sched_load_avg_cpu:util_max',\n", | |
" ],\n", | |
" pivot='cpu',\n", | |
" filters={'cpu': [1]},\n", | |
" drawstyle='steps-post',\n", | |
" scatter=False,\n", | |
" sync_zoom=True,\n", | |
" group='TwoTasks',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Render Thread simulation" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style>\n", | |
"/*\n", | |
"\n", | |
" * Copyright 2015-2016 ARM Limited\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"\n", | |
" * you may not use this file except in compliance with the License.\n", | |
"\n", | |
" * You may obtain a copy of the License at\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * http://www.apache.org/licenses/LICENSE-2.0\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Unless required by applicable law or agreed to in writing, software\n", | |
"\n", | |
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"\n", | |
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"\n", | |
" * See the License for the specific language governing permissions and\n", | |
"\n", | |
" * limitations under the License.\n", | |
"\n", | |
" */\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip {\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" padding: 12px;\n", | |
"\n", | |
" background: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" color: #fff;\n", | |
"\n", | |
" border-radius: 2px;\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip:after {\n", | |
"\n", | |
" box-sizing: border-box;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" display: inline;\n", | |
"\n", | |
" font-size: 10px;\n", | |
"\n", | |
" width: 100%;\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" color: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" content: \"\\25BC\";\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
" text-align: center;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip.n:after {\n", | |
"\n", | |
" margin: -1px 0 0 0;\n", | |
"\n", | |
" top: 100%;\n", | |
"\n", | |
" left: 0;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".contextRect {\n", | |
"\n", | |
" fill: lightgray;\n", | |
"\n", | |
" fill-opacity: 0.5;\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
" stroke-width: 1;\n", | |
"\n", | |
" stroke-opacity: 1;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".chart {\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".mini text {\n", | |
"\n", | |
" font: 9px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".main text {\n", | |
"\n", | |
" font: 12px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".axis line, .axis path {\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".miniItem {\n", | |
"\n", | |
" stroke-width: 8;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".brush .extent {\n", | |
"\n", | |
"\n", | |
"\n", | |
" stroke: #000;\n", | |
"\n", | |
" fill-opacity: .125;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"</style>\n", | |
"<div id=\"fig_65df911ec2f34ef3b204acb5a33c3615\" class=\"eventplot\">\n", | |
" <script>\n", | |
" var req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
"\n", | |
" \"EventPlot\": '/nbextensions/plotter_scripts/EventPlot/EventPlot',\n", | |
" \"d3-tip\": '/nbextensions/plotter_scripts/EventPlot/d3.tip.v0.6.3',\n", | |
" \"d3-plotter\": '/nbextensions/plotter_scripts/EventPlot/d3.min'\n", | |
" },\n", | |
" shim: {\n", | |
" \"d3-plotter\" : {\n", | |
" \"exports\" : \"d3\"\n", | |
" },\n", | |
" \"d3-tip\": [\"d3-plotter\"],\n", | |
" \"EventPlot\": {\n", | |
"\n", | |
" \"deps\": [\"d3-tip\", \"d3-plotter\" ],\n", | |
" \"exports\": \"EventPlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" req([\"require\", \"EventPlot\"], function() {\n", | |
" EventPlot.generate('fig_65df911ec2f34ef3b204acb5a33c3615', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# NOTE: The interactive trace visualization is available only if you run\n", | |
"# the workload to generate a new trace-file\n", | |
"trappy.plotter.plot_trace(ftrace, execnames=['task_render_1'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Task Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_6090be2ad04e4403b509967a404fa574\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_6090be2ad04e4403b509967a404fa574', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_6090be2ad04e4403b509967a404fa574_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# These two paramatere are passed to the LinePlot call as long with the\n", | |
"# TRAPpy Run object\n", | |
"trappy.ILinePlot(\n", | |
" ftrace, # TRAPpy RUN object\n", | |
" signals=[\n", | |
" 'sched_load_avg_task:util_avg',\n", | |
" 'sched_load_avg_task:util_est'\n", | |
" ],\n", | |
" pivot='pid',\n", | |
" filters={'comm': ['task_render_1']},\n", | |
" drawstyle='steps-post',\n", | |
" sync_zoom=True,\n", | |
" group='RenderThread',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## CPU Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_ed8a09cc09a046d49ad98d7f39822961\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_ed8a09cc09a046d49ad98d7f39822961', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_ed8a09cc09a046d49ad98d7f39822961_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"trappy.ILinePlot(\n", | |
" ftrace,\n", | |
" signals=[\n", | |
" 'sched_load_avg_cpu:util_avg',\n", | |
" #'sched_load_avg_cpu:util_est',\n", | |
" 'sched_load_avg_cpu:util_max',\n", | |
" ],\n", | |
" pivot='cpu',\n", | |
" filters={'cpu': [2]},\n", | |
" drawstyle='steps-post',\n", | |
" scatter=False,\n", | |
" sync_zoom=True,\n", | |
" group='RenderThread',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Jumper task (20%)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<style>\n", | |
"/*\n", | |
"\n", | |
" * Copyright 2015-2016 ARM Limited\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"\n", | |
" * you may not use this file except in compliance with the License.\n", | |
"\n", | |
" * You may obtain a copy of the License at\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * http://www.apache.org/licenses/LICENSE-2.0\n", | |
"\n", | |
" *\n", | |
"\n", | |
" * Unless required by applicable law or agreed to in writing, software\n", | |
"\n", | |
" * distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"\n", | |
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"\n", | |
" * See the License for the specific language governing permissions and\n", | |
"\n", | |
" * limitations under the License.\n", | |
"\n", | |
" */\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip {\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" padding: 12px;\n", | |
"\n", | |
" background: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" color: #fff;\n", | |
"\n", | |
" border-radius: 2px;\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip:after {\n", | |
"\n", | |
" box-sizing: border-box;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" display: inline;\n", | |
"\n", | |
" font-size: 10px;\n", | |
"\n", | |
" width: 100%;\n", | |
"\n", | |
" line-height: 1;\n", | |
"\n", | |
" color: rgba(0, 0, 0, 0.6);\n", | |
"\n", | |
" content: \"\\25BC\";\n", | |
"\n", | |
" position: absolute !important;\n", | |
"\n", | |
" z-index: 99999;\n", | |
"\n", | |
" text-align: center;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".d3-tip.n:after {\n", | |
"\n", | |
" margin: -1px 0 0 0;\n", | |
"\n", | |
" top: 100%;\n", | |
"\n", | |
" left: 0;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".contextRect {\n", | |
"\n", | |
" fill: lightgray;\n", | |
"\n", | |
" fill-opacity: 0.5;\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
" stroke-width: 1;\n", | |
"\n", | |
" stroke-opacity: 1;\n", | |
"\n", | |
" pointer-events: none;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".chart {\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".mini text {\n", | |
"\n", | |
" font: 9px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".main text {\n", | |
"\n", | |
" font: 12px sans-serif;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".axis line, .axis path {\n", | |
"\n", | |
" stroke: black;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".miniItem {\n", | |
"\n", | |
" stroke-width: 8;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"\n", | |
"\n", | |
".brush .extent {\n", | |
"\n", | |
"\n", | |
"\n", | |
" stroke: #000;\n", | |
"\n", | |
" fill-opacity: .125;\n", | |
"\n", | |
" shape-rendering: crispEdges;\n", | |
"\n", | |
"}\n", | |
"\n", | |
"</style>\n", | |
"<div id=\"fig_6cc441f25bce41d486a09442c60a7515\" class=\"eventplot\">\n", | |
" <script>\n", | |
" var req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
"\n", | |
" \"EventPlot\": '/nbextensions/plotter_scripts/EventPlot/EventPlot',\n", | |
" \"d3-tip\": '/nbextensions/plotter_scripts/EventPlot/d3.tip.v0.6.3',\n", | |
" \"d3-plotter\": '/nbextensions/plotter_scripts/EventPlot/d3.min'\n", | |
" },\n", | |
" shim: {\n", | |
" \"d3-plotter\" : {\n", | |
" \"exports\" : \"d3\"\n", | |
" },\n", | |
" \"d3-tip\": [\"d3-plotter\"],\n", | |
" \"EventPlot\": {\n", | |
"\n", | |
" \"deps\": [\"d3-tip\", \"d3-plotter\" ],\n", | |
" \"exports\": \"EventPlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" req([\"require\", \"EventPlot\"], function() {\n", | |
" EventPlot.generate('fig_6cc441f25bce41d486a09442c60a7515', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# NOTE: The interactive trace visualization is available only if you run\n", | |
"# the workload to generate a new trace-file\n", | |
"trappy.plotter.plot_trace(ftrace, execnames=['rt_l1', 'rt_l2', 'jumper'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## Task Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_b94b1807d3c24511b748f034526020d9\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_b94b1807d3c24511b748f034526020d9', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_b94b1807d3c24511b748f034526020d9_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# These two paramatere are passed to the LinePlot call as long with the\n", | |
"# TRAPpy Run object\n", | |
"trappy.ILinePlot(\n", | |
" ftrace, # TRAPpy RUN object\n", | |
" signals=[\n", | |
" 'sched_load_avg_task:util_avg',\n", | |
" 'sched_load_avg_task:util_est'\n", | |
" ],\n", | |
" pivot='pid',\n", | |
" filters={'comm': ['jumper']},\n", | |
" drawstyle='steps-post',\n", | |
" sync_zoom=True,\n", | |
" group='JumperTask',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## CPU Utilization" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<table style=\"border-style: hidden;\">\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_eb9637737d444ff69794c1ebacddf2d0\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_eb9637737d444ff69794c1ebacddf2d0', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"<td style=\"border-style: hidden;\"><div class=\"ilineplot\" id=\"fig_524d775eefa1492aae66236b0a50813e\">\n", | |
" <script>\n", | |
" var ilp_req = require.config( {\n", | |
"\n", | |
" paths: {\n", | |
" \"dygraph-sync\": '/nbextensions/plotter_scripts/ILinePlot/synchronizer',\n", | |
" \"dygraph\": '/nbextensions/plotter_scripts/ILinePlot/dygraph-combined',\n", | |
" \"ILinePlot\": '/nbextensions/plotter_scripts/ILinePlot/ILinePlot',\n", | |
" \"underscore\": '/nbextensions/plotter_scripts/ILinePlot/underscore-min',\n", | |
" },\n", | |
"\n", | |
" shim: {\n", | |
" \"dygraph-sync\": [\"dygraph\"],\n", | |
" \"ILinePlot\": {\n", | |
"\n", | |
" \"deps\": [\"dygraph-sync\", \"dygraph\", \"underscore\"],\n", | |
" \"exports\": \"ILinePlot\"\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" ilp_req([\"require\", \"ILinePlot\"], function() {\n", | |
" ILinePlot.generate('fig_524d775eefa1492aae66236b0a50813e', '/nbextensions/');\n", | |
" });\n", | |
" </script>\n", | |
" </div></td>\n", | |
"</tr>\n", | |
"<tr>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_eb9637737d444ff69794c1ebacddf2d0_legend\"></div></td>\n", | |
"<td style=\"border-style: hidden;\"><div style=\"text-align:right\" id=\"fig_524d775eefa1492aae66236b0a50813e_legend\"></div></td>\n", | |
"</tr>\n", | |
"</table>" | |
], | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"trappy.ILinePlot(\n", | |
" ftrace,\n", | |
" signals=[\n", | |
" #'sched_load_avg_cpu:util_avg',\n", | |
" 'sched_load_avg_cpu:util_est',\n", | |
" #'sched_load_avg_cpu:util_max',\n", | |
" ],\n", | |
" pivot='cpu',\n", | |
" filters={'cpu': [3, 4]},\n", | |
" drawstyle='steps-post',\n", | |
" scatter=False,\n", | |
" sync_zoom=True,\n", | |
" group='JumperTask',\n", | |
" marker = '+').view()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Kernelshark" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"subprocess.Popen([\"kernelshark\", trace_file]);" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.9" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment