• Home
  • Raw
  • Download

Lines Matching full:n

32     "import logging\n",
33 "from conf import LisaLogging\n",
45 "# Execute this cell to enabled devlib debugging statements\n",
57 "# Other python modules required by this notebook\n",
58 "import json\n",
77 "# Setup a target configuration\n",
78 "conf = {\n",
79 " \n",
80 " # Target is localhost\n",
81 " \"platform\" : 'linux',\n",
82 " \"board\" : \"juno\",\n",
83 " \n",
84 " # Login credentials\n",
85 " \"host\" : \"192.168.0.1\",\n",
86 " \"username\" : \"root\",\n",
87 " \"password\" : \"\",\n",
88 "\n",
89 " # Binary tools required to run this experiment\n",
90 " # These tools must be present in the tools/ folder for the architecture\n",
91 " \"tools\" : ['rt-app', 'taskset', 'trace-cmd'],\n",
92 " \n",
93 " # Comment the following line to force rt-app calibration on your target\n",
94 "# \"rtapp-calib\" : {\n",
95 "# \"0\": 355, \"1\": 138, \"2\": 138, \"3\": 355, \"4\": 354, \"5\": 354\n",
96 "# },\n",
97 " \n",
98 " # FTrace events end buffer configuration\n",
99 " \"ftrace\" : {\n",
100 " \"events\" : [\n",
101 " \"sched_switch\",\n",
102 " \"cpu_frequency\"\n",
103 " ],\n",
104 " \"buffsize\" : 10240\n",
105 " },\n",
106 "\n",
107 " # Where results are collected\n",
108 " \"results_dir\" : \"WlgenExample\",\n",
109 " \n",
110 " # Devlib modules we'll need\n",
111 " \"modules\": [\"cpufreq\"]\n",
127 "12:22:12 INFO : Target - Using base path: /home/derkling/Code/lisa\n",
128 "12:22:12 INFO : Target - Loading custom (inline) target configuration\n",
129 "12:22:12 INFO : Target - Devlib modules to load: ['bl', 'hwmon', 'cpufreq']\n",
130 "12:22:12 INFO : Target - Connecting linux target:\n",
131 "12:22:12 INFO : Target - username : root\n",
132 "12:22:12 INFO : Target - host : 192.168.0.1\n",
133 "12:22:12 INFO : Target - password : \n",
134 "12:22:50 INFO : Target - Initializing target workdir:\n",
135 "12:22:50 INFO : Target - /root/devlib-target\n",
136 "12:22:59 INFO : Target - Topology:\n",
137 "12:22:59 INFO : Target - [[0, 3, 4, 5], [1, 2]]\n",
138 "12:23:01 INFO : Platform - Loading default EM:\n",
139 …12:23:01 INFO : Platform - /home/derkling/Code/lisa/libs/utils/platforms/juno.json\n",
140 "12:23:02 INFO : FTrace - Enabled tracepoints:\n",
141 "12:23:02 INFO : FTrace - sched_switch\n",
142 "12:23:02 INFO : FTrace - cpu_frequency\n",
143 "12:23:02 INFO : EnergyMeter - Scanning for HWMON channels, may take some time...\n",
144 "12:23:02 INFO : EnergyMeter - Channels selected for energy sampling:\n",
145 "12:23:02 INFO : EnergyMeter - a57_energy\n",
146 "12:23:02 INFO : EnergyMeter - a53_energy\n",
147 "12:23:02 WARNING : Target - Using configuration provided RTApp calibration\n",
148 "12:23:02 INFO : Target - Using RT-App calibration values:\n",
149 … : Target - {\"0\": 355, \"1\": 138, \"2\": 138, \"3\": 355, \"4\": 354, \"5\": 354}\n",
150 "12:23:02 WARNING : TestEnv - Wipe previous contents of the results folder:\n",
151 "12:23:02 WARNING : TestEnv - /home/derkling/Code/lisa/results/WlgenExample\n",
152 "12:23:02 INFO : TestEnv - Set results folder to:\n",
153 "12:23:02 INFO : TestEnv - /home/derkling/Code/lisa/results/WlgenExample\n",
154 "12:23:02 INFO : TestEnv - Experiment results available also in:\n",
155 "12:23:02 INFO : TestEnv - /home/derkling/Code/lisa/results_latest\n"
160 "# Support to access the remote target\n",
161 "from env import TestEnv\n",
162 "\n",
163 "# Initialize a test environment using:\n",
164 "# the provided target configuration (my_target_conf)\n",
165 "# the provided test configuration (my_test_conf)\n",
166 "te = TestEnv(conf)\n",
185 "def execute(te, wload, res_dir):\n",
186 " \n",
187 " logging.info('# Create results folder for this execution')\n",
188 " !mkdir {res_dir}\n",
189 " \n",
190 " logging.info('# Setup FTrace')\n",
191 " te.ftrace.start()\n",
192 "\n",
193 " logging.info('## Start energy sampling')\n",
194 " te.emeter.reset()\n",
195 "\n",
196 " logging.info('### Start RTApp execution')\n",
197 " wload.run(out_dir=res_dir)\n",
198 "\n",
199 " logging.info('## Read energy consumption: %s/energy.json', res_dir)\n",
200 " nrg_report = te.emeter.report(out_dir=res_dir)\n",
201 "\n",
202 " logging.info('# Stop FTrace')\n",
203 " te.ftrace.stop()\n",
204 "\n",
205 " trace_file = os.path.join(res_dir, 'trace.dat')\n",
206 " logging.info('# Save FTrace: %s', trace_file)\n",
207 " te.ftrace.get_trace(trace_file)\n",
208 "\n",
209 " logging.info('# Save platform description: %s/platform.json', res_dir)\n",
210 " plt, plt_file = te.platform_dump(res_dir)\n",
211 " \n",
212 " logging.info('# Report collected data:')\n",
213 " logging.info(' %s', res_dir)\n",
214 " !ls -la {res_dir}\n",
215 " \n",
244 "12:38:37 INFO : WlGen - Setup new workload example1\n"
249 "# Support to configure and run RTApp based workloads\n",
250 "from wlgen import RTA\n",
251 "\n",
252 "# Create a new RTApp workload generator using the calibration values\n",
253 "# reported by the TestEnv module\n",
254 "rtapp_name = 'example1'\n",
276 "12:38:39 INFO : RTApp - Workload duration defined by longest task\n",
277 "12:38:39 INFO : RTApp - Default policy: SCHED_OTHER\n",
278 "12:38:39 INFO : RTApp - ------------------------\n",
279 …:38:39 INFO : RTApp - task [task_p20], sched: {'policy': 'OTHER', 'priotity': 130}\n",
280 "12:38:39 INFO : RTApp - | calibration CPU: 1\n",
281 "12:38:39 INFO : RTApp - | loops count: 1\n",
282 "12:38:39 INFO : RTApp - | CPUs affinity: 0\n",
283 "12:38:39 INFO : RTApp - + phase_000001: duration 5.000000 [s] (50 loops)\n",
284 "12:38:39 INFO : RTApp - | period 100000 [us], duty_cycle 20 %\n",
285 "12:38:39 INFO : RTApp - | run_time 20000 [us], sleep_time 80000 [us]\n"
290 "# RTApp configurator for generation of PERIODIC tasks\n",
291 "from wlgen import Periodic \n",
292 "\n",
293 "# Configure this RTApp instance to:\n",
294 "rtapp.conf(\n",
295 "\n",
296 " # 1. generate a \"profile based\" set of tasks\n",
297 " kind = 'profile',\n",
298 " \n",
299 " # 2. define the \"profile\" of each task\n",
300 " params = {\n",
301 " \n",
302 " # 3. PERIODIC task with\n",
303 " 'task_p20': Periodic (\n",
304 " period_ms = 100, # period [ms]\n",
305 " duty_cycle_pct = 20, # duty cycle [%]\n",
306 " duration_s = 5, # duration [s]\n",
307 " delay_s = 0, # start after that delay [s]\n",
308 " sched = { # run as a low-priority SCHED_OTHER task\n",
309 " 'policy' : 'OTHER',\n",
310 " 'priotity' : 130,\n",
311 " },\n",
312 " cpus = # pinned on first online CPU\n",
313 " str(target.list_online_cpus()[0])\n",
314 " # ADD OTHER PARAMETERS\n",
315 " ).get(),\n",
316 "\n",
317 " },\n",
318 " \n",
333 "12:38:42 INFO : Generated RTApp JSON file:\n"
340 "{\n",
341 " \"global\": {\n",
342 " \"calibration\": 138, \n",
343 " \"default_policy\": \"SCHED_OTHER\", \n",
344 " \"duration\": -1, \n",
345 " \"logdir\": \"/root/devlib-target\"\n",
346 " }, \n",
347 " \"tasks\": {\n",
348 " \"task_p20\": {\n",
349 " \"cpus\": [\n",
350 " 0\n",
351 " ], \n",
352 " \"loop\": 1, \n",
353 " \"phases\": {\n",
354 " \"p000001\": {\n",
355 " \"loop\": 50, \n",
356 " \"run\": 20000, \n",
357 " \"timer\": {\n",
358 " \"period\": 100000, \n",
359 " \"ref\": \"task_p20\"\n",
360 " }\n",
361 " }\n",
362 " }, \n",
363 " \"policy\": \"SCHED_OTHER\", \n",
364 " \"priotity\": 130\n",
365 " }\n",
366 " }\n",
367 "}\n"
372 "# Inspect the JSON file used to run the application\n",
373 "with open('./{}_00.json'.format(rtapp_name), 'r') as fh:\n",
374 " rtapp_json = json.load(fh)\n",
375 "logging.info('Generated RTApp JSON file:')\n",
397 "12:38:45 INFO : # Create results folder for this execution\n",
398 "12:38:45 INFO : # Setup FTrace\n",
399 "12:38:49 INFO : ## Start energy sampling\n",
400 "12:38:51 INFO : ### Start RTApp execution\n",
401 "12:38:51 INFO : WlGen - Workload execution START:\n",
402 …FO : WlGen - /root/devlib-target/bin/rt-app /root/devlib-target/example1_00.json\n",
403 … ## Read energy consumption: /home/derkling/Code/lisa/results/WlgenExample/example1/energy.json\n",
404 "12:38:57 INFO : EnergyReport - Energy [ a53]: 5.125284\n",
405 "12:38:57 INFO : EnergyReport - Energy [ a57]: 3.037161\n",
406 "12:38:57 INFO : # Stop FTrace\n",
407 …8:59 INFO : # Save FTrace: /home/derkling/Code/lisa/results/WlgenExample/example1/trace.dat\n",
408 …Save platform description: /home/derkling/Code/lisa/results/WlgenExample/example1/platform.json\n",
409 "12:39:01 INFO : # Report collected data:\n",
410 "12:39:01 INFO : /home/derkling/Code/lisa/results/WlgenExample/example1\n"
417 "total 4008\r\n",
418 "drwxrwxr-x 2 derkling derkling 4096 Mar 2 12:39 .\r\n",
419 "drwxrwxr-x 3 derkling derkling 4096 Mar 2 12:38 ..\r\n",
420 "-rw-rw-r-- 1 derkling derkling 52 Mar 2 12:38 energy.json\r\n",
421 "-rw-r--r-- 1 derkling derkling 644 Mar 2 12:38 example1_00.json\r\n",
422 "-rw-rw-r-- 1 derkling derkling 235 Mar 2 12:38 output.log\r\n",
423 "-rw-rw-r-- 1 derkling derkling 1075 Mar 2 12:39 platform.json\r\n",
424 "-rw-r--r-- 1 derkling derkling 6360 Mar 2 12:38 rt-app-task_p20-0.log\r\n",
425 "-rw-r--r-- 1 derkling derkling 6360 Mar 2 12:38 rt-app-task_p20-3.log\r\n",
426 "-rw-r--r-- 1 derkling derkling 4063232 Mar 2 12:39 trace.dat\r\n"
431 "res_dir = os.path.join(te.res_dir, rtapp_name)\n",
453 … "12:39:07 INFO : Energy: /home/derkling/Code/lisa/results/WlgenExample/example1/energy.json\n"
460 "{\n",
461 " \"LITTLE\": \"5.125284\", \n",
462 " \"big\": \"3.037161\"\n",
463 "}\n"
468 "# Dump the energy measured for the LITTLE and big clusters\n",
469 "logging.info('Energy: %s', nrg_report.report_file)\n",
484 … : Platform description: /home/derkling/Code/lisa/results/WlgenExample/example1/platform.json\n"
491 "{\n",
492 " \"clusters\": {\n",
493 " \"big\": [\n",
494 " 1, \n",
495 " 2\n",
496 " ], \n",
497 " \"little\": [\n",
498 " 0, \n",
499 " 3, \n",
500 " 4, \n",
501 " 5\n",
502 " ]\n",
503 " }, \n",
504 " \"cpus_count\": 6, \n",
505 " \"freqs\": {\n",
506 " \"big\": [\n",
507 " 450000, \n",
508 " 625000, \n",
509 " 800000, \n",
510 " 950000, \n",
511 " 1100000\n",
512 " ], \n",
513 " \"little\": [\n",
514 " 450000, \n",
515 " 575000, \n",
516 " 700000, \n",
517 " 775000, \n",
518 " 850000\n",
519 " ]\n",
520 " }, \n",
521 " \"nrg_model\": {\n",
522 " \"big\": {\n",
523 " \"cluster\": {\n",
524 " \"nrg_max\": 64\n",
525 " }, \n",
526 " \"cpu\": {\n",
527 " \"cap_max\": 1024, \n",
528 " \"nrg_max\": 616\n",
529 " }\n",
530 " }, \n",
531 " \"little\": {\n",
532 " \"cluster\": {\n",
533 " \"nrg_max\": 57\n",
534 " }, \n",
535 " \"cpu\": {\n",
536 " \"cap_max\": 447, \n",
537 " \"nrg_max\": 93\n",
538 " }\n",
539 " }\n",
540 " }, \n",
541 " \"topology\": [\n",
542 " [\n",
543 " 0, \n",
544 " 3, \n",
545 " 4, \n",
546 " 5\n",
547 " ], \n",
548 " [\n",
549 " 1, \n",
550 " 2\n",
551 " ]\n",
552 " ]\n",
553 "}\n"
558 "# Dump the platform descriptor, which could be useful for further analysis\n",
559 "# of the generated results\n",
560 "logging.info('Platform description: %s', plt_file)\n",
583 "version = 6\n",
584 "trace-cmd: No such file or directory\n",
585 " [vmscan:mm_vmscan_writepage] function sizeof not defined\n",
586 " unknown op '~'\n",
587 " Error: expected type 5 but read 0\n",
588 " Error: expected type 4 but read 0\n",
589 " unknown op '~'\n",
590 " Error: expected type 5 but read 0\n",
591 " Error: expected type 4 but read 0\n",
592 " unknown op '~'\n",
593 " Error: expected type 5 but read 0\n",
594 " Error: expected type 4 but read 0\n",
595 " unknown op '~'\n",
596 " Error: expected type 5 but read 0\n",
597 " Error: expected type 4 but read 0\n",
598 " [sunrpc:xs_tcp_data_recv] function __builtin_constant_p not defined\n",
599 " [sunrpc:xprt_transmit] function __builtin_constant_p not defined\n",
600 " [sunrpc:xprt_lookup_rqst] function __builtin_constant_p not defined\n",
601 " [sunrpc:xprt_complete_rqst] function __builtin_constant_p not defined\n",
602 " [sunrpc:svc_send] function __builtin_constant_p not defined\n",
603 " [sunrpc:svc_recv] function __builtin_constant_p not defined\n",
604 " [sunrpc:svc_process] function __builtin_constant_p not defined\n",
605 " [ras:mc_event] function mc_event_error_type not defined\n",
606 " [libata:ata_qc_complete_internal] function libata_trace_parse_qc_flags not defined\n",
607 " [libata:ata_qc_complete_failed] function libata_trace_parse_qc_flags not defined\n",
608 " [libata:ata_qc_complete_done] function libata_trace_parse_qc_flags not defined\n",
609 " [libata:ata_eh_link_autopsy_qc] function libata_trace_parse_qc_flags not defined\n",
610 " [libata:ata_eh_link_autopsy] function libata_trace_parse_eh_action not defined\n",
611 " [kvm:kvm_arm_set_regset] function __print_array not defined\n",
612 " [kmem:mm_page_pcpu_drain] function sizeof not defined\n",
613 " [kmem:mm_page_free_batched] function sizeof not defined\n",
614 " [kmem:mm_page_free] function sizeof not defined\n",
615 " [kmem:mm_page_alloc_zone_locked] function sizeof not defined\n",
616 " Error: expected type 4 but read 0\n",
617 " [kmem:mm_page_alloc_extfrag] function sizeof not defined\n",
618 " [kmem:mm_page_alloc] function sizeof not defined\n",
619 " Error: expected type 4 but read 0\n",
620 " [filemap:mm_filemap_delete_from_page_cache] function sizeof not defined\n",
621 " [filemap:mm_filemap_add_to_page_cache] function sizeof not defined\n",
622 "\n",
623 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
624 "\n",
625 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
626 "\n",
627 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
628 "\n",
629 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
630 "\n",
631 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
632 "\n",
633 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
634 "\n",
635 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
636 "\n",
637 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
638 "\n",
639 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
640 "\n",
641 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
642 "\n",
643 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
644 "\n",
645 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
646 "\n",
647 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
648 "\n",
649 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
650 "\n",
651 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
652 "\n",
653 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
654 "\n",
655 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
656 "\n",
657 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
658 "\n",
659 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
660 "\n",
661 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
662 "\n",
663 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
664 "\n",
665 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
666 "\n",
667 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
668 "\n",
669 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
670 "\n",
671 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
672 "\n",
673 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
674 "\n",
675 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
676 "\n",
677 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
678 "\n",
679 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
680 "\n",
681 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
682 "\n",
683 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
684 "\n",
685 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
686 "\n",
687 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
688 "\n",
689 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
690 "\n",
691 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
692 "\n",
693 …elshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n",
694 "\n",
695 …ernelshark:11002): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GtkStatusbar'\n",
696 "\n",
697 …1002): Gtk-CRITICAL **: IA__gtk_statusbar_push: assertion 'GTK_IS_STATUSBAR (statusbar)' failed\n",
698 "\n",
699 …nelshark:11002): Gtk-CRITICAL **: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed\n"
732 "12:43:40 INFO : WlGen - Setup new workload example2\n"
737 "# Support to configure and run RTApp based workloads\n",
738 "from wlgen import RTA\n",
739 "\n",
740 "# Create a new RTApp workload generator using the calibration values\n",
741 "# reported by the TestEnv module\n",
742 "rtapp_name = 'example2'\n",
764 "12:44:39 INFO : RTApp - Workload duration defined by longest task\n",
765 "12:44:39 INFO : RTApp - Default policy: SCHED_OTHER\n",
766 "12:44:39 INFO : RTApp - ------------------------\n",
767 "12:44:39 INFO : RTApp - task [task_ramp], sched: using default policy\n",
768 "12:44:39 INFO : RTApp - | calibration CPU: 1\n",
769 "12:44:39 INFO : RTApp - | loops count: 1\n",
770 "12:44:39 INFO : RTApp - | CPUs affinity: 1\n",
771 "12:44:39 INFO : RTApp - + phase_000001: duration 1.000000 [s] (100 loops)\n",
772 "12:44:39 INFO : RTApp - | period 10000 [us], duty_cycle 10 %\n",
773 "12:44:39 INFO : RTApp - | run_time 1000 [us], sleep_time 9000 [us]\n",
774 "12:44:39 INFO : RTApp - + phase_000002: duration 1.000000 [s] (20 loops)\n",
775 "12:44:39 INFO : RTApp - | period 50000 [us], duty_cycle 10 %\n",
776 "12:44:39 INFO : RTApp - | run_time 5000 [us], sleep_time 45000 [us]\n",
777 "12:44:39 INFO : RTApp - + phase_000003: duration 1.000000 [s] (20 loops)\n",
778 "12:44:39 INFO : RTApp - | period 50000 [us], duty_cycle 30 %\n",
779 "12:44:39 INFO : RTApp - | run_time 15000 [us], sleep_time 35000 [us]\n",
780 "12:44:39 INFO : RTApp - + phase_000004: duration 1.000000 [s] (20 loops)\n",
781 "12:44:39 INFO : RTApp - | period 50000 [us], duty_cycle 50 %\n",
782 "12:44:39 INFO : RTApp - | run_time 25000 [us], sleep_time 25000 [us]\n",
783 "12:44:39 INFO : RTApp - + phase_000005: duration 1.000000 [s] (20 loops)\n",
784 "12:44:39 INFO : RTApp - | period 50000 [us], duty_cycle 70 %\n",
785 "12:44:39 INFO : RTApp - | run_time 35000 [us], sleep_time 15000 [us]\n",
786 "12:44:39 INFO : RTApp - + phase_000006: duration 1.000000 [s] (20 loops)\n",
787 "12:44:39 INFO : RTApp - | period 50000 [us], duty_cycle 90 %\n",
788 "12:44:39 INFO : RTApp - | run_time 45000 [us], sleep_time 5000 [us]\n",
789 "12:44:39 INFO : RTApp - + phase_000007: duration 0.100000 [s] (1 loops)\n",
790 "12:44:39 INFO : RTApp - | period 100000 [us], duty_cycle 90 %\n",
791 "12:44:39 INFO : RTApp - | run_time 90000 [us], sleep_time 10000 [us]\n"
796 "# RTApp configurator for generation of PERIODIC tasks\n",
797 "from wlgen import Periodic, Ramp\n",
798 "\n",
799 "# Light workload\n",
800 "light = Periodic(duty_cycle_pct=10, duration_s=1.0, period_ms= 10,\n",
801 " cpus=str(target.bl.bigs_online[0]))\n",
802 "# Ramp workload\n",
803 "ramp = Ramp(start_pct=10, end_pct=90, delta_pct=20, time_s=1, period_ms=50)\n",
804 "# Heavy workload\n",
805 "heavy = Periodic(duty_cycle_pct=90, duration_s=0.1, period_ms=100)\n",
806 "\n",
807 "# Composed workload\n",
808 "lrh_task = light + ramp + heavy\n",
809 "\n",
810 "# Configure this RTApp instance to:\n",
811 "rtapp.conf(\n",
812 "\n",
813 " # 1. generate a \"profile based\" set of tasks\n",
814 " kind = 'profile',\n",
815 " \n",
816 " # 2. define the \"profile\" of each task\n",
817 " params = {\n",
818 " \n",
819 " # 3. PERIODIC task with\n",
820 " 'task_ramp': lrh_task.get() \n",
821 "\n",
822 " },\n",
823 " \n",
838 "12:45:34 INFO : Generated RTApp JSON file:\n"
845 "{\n",
846 " \"global\": {\n",
847 " \"calibration\": 138, \n",
848 " \"default_policy\": \"SCHED_OTHER\", \n",
849 " \"duration\": -1, \n",
850 " \"logdir\": \"/root/devlib-target\"\n",
851 " }, \n",
852 " \"tasks\": {\n",
853 " \"task_ramp\": {\n",
854 " \"cpus\": [\n",
855 " 1\n",
856 " ], \n",
857 " \"loop\": 1, \n",
858 " \"phases\": {\n",
859 " \"p000001\": {\n",
860 " \"loop\": 100, \n",
861 " \"run\": 1000, \n",
862 " \"timer\": {\n",
863 " \"period\": 10000, \n",
864 " \"ref\": \"task_ramp\"\n",
865 " }\n",
866 " }, \n",
867 " \"p000002\": {\n",
868 " \"loop\": 20, \n",
869 " \"run\": 5000, \n",
870 " \"timer\": {\n",
871 " \"period\": 50000, \n",
872 " \"ref\": \"task_ramp\"\n",
873 " }\n",
874 " }, \n",
875 " \"p000003\": {\n",
876 " \"loop\": 20, \n",
877 " \"run\": 15000, \n",
878 " \"timer\": {\n",
879 " \"period\": 50000, \n",
880 " \"ref\": \"task_ramp\"\n",
881 " }\n",
882 " }, \n",
883 " \"p000004\": {\n",
884 " \"loop\": 20, \n",
885 " \"run\": 25000, \n",
886 " \"timer\": {\n",
887 " \"period\": 50000, \n",
888 " \"ref\": \"task_ramp\"\n",
889 " }\n",
890 " }, \n",
891 " \"p000005\": {\n",
892 " \"loop\": 20, \n",
893 " \"run\": 35000, \n",
894 " \"timer\": {\n",
895 " \"period\": 50000, \n",
896 " \"ref\": \"task_ramp\"\n",
897 " }\n",
898 " }, \n",
899 " \"p000006\": {\n",
900 " \"loop\": 20, \n",
901 " \"run\": 45000, \n",
902 " \"timer\": {\n",
903 " \"period\": 50000, \n",
904 " \"ref\": \"task_ramp\"\n",
905 " }\n",
906 " }, \n",
907 " \"p000007\": {\n",
908 " \"loop\": 1, \n",
909 " \"run\": 90000, \n",
910 " \"timer\": {\n",
911 " \"period\": 100000, \n",
912 " \"ref\": \"task_ramp\"\n",
913 " }\n",
914 " }\n",
915 " }, \n",
916 " \"policy\": \"SCHED_OTHER\"\n",
917 " }\n",
918 " }\n",
919 "}\n"
924 "# Inspect the JSON file used to run the application\n",
925 "with open('./{}_00.json'.format(rtapp_name), 'r') as fh:\n",
926 " rtapp_json = json.load(fh)\n",
927 "logging.info('Generated RTApp JSON file:')\n",
949 "12:48:02 INFO : # Create results folder for this execution\n",
950 "12:48:02 INFO : # Setup FTrace\n",
951 "12:48:06 INFO : ## Start energy sampling\n",
952 "12:48:07 INFO : ### Start RTApp execution\n",
953 "12:48:07 INFO : WlGen - Workload execution START:\n",
954 …FO : WlGen - /root/devlib-target/bin/rt-app /root/devlib-target/example2_00.json\n",
955 … ## Read energy consumption: /home/derkling/Code/lisa/results/WlgenExample/example2/energy.json\n",
956 "12:48:16 INFO : EnergyReport - Energy [ a53]: 1.495969\n",
957 "12:48:16 INFO : EnergyReport - Energy [ a57]: 25.145680\n",
958 "12:48:16 INFO : # Stop FTrace\n",
959 …8:17 INFO : # Save FTrace: /home/derkling/Code/lisa/results/WlgenExample/example2/trace.dat\n",
960 …Save platform description: /home/derkling/Code/lisa/results/WlgenExample/example2/platform.json\n",
961 "12:48:19 INFO : # Report collected data:\n",
962 "12:48:19 INFO : /home/derkling/Code/lisa/results/WlgenExample/example2\n"
969 "total 4124\r\n",
970 "drwxrwxr-x 2 derkling derkling 4096 Mar 2 12:48 .\r\n",
971 "drwxrwxr-x 4 derkling derkling 4096 Mar 2 12:48 ..\r\n",
972 "-rw-rw-r-- 1 derkling derkling 53 Mar 2 12:48 energy.json\r\n",
973 "-rw-r--r-- 1 derkling derkling 2121 Mar 2 12:48 example2_00.json\r\n",
974 "-rw-rw-r-- 1 derkling derkling 235 Mar 2 12:48 output.log\r\n",
975 "-rw-rw-r-- 1 derkling derkling 1075 Mar 2 12:48 platform.json\r\n",
976 "-rw-r--r-- 1 derkling derkling 25084 Mar 2 12:48 rt-app-task_ramp-0.log\r\n",
977 "-rw-r--r-- 1 derkling derkling 4169728 Mar 2 12:48 trace.dat\r\n"
982 "res_dir = os.path.join(te.res_dir, rtapp_name)\n",
1004 "version = 6\r\n"
1030 "12:55:36 INFO : WlGen - Setup new workload example3\n"
1035 "# Support to configure and run RTApp based workloads\n",
1036 "from wlgen import RTA\n",
1037 "\n",
1038 "# Create a new RTApp workload generator using the calibration values\n",
1039 "# reported by the TestEnv module\n",
1040 "rtapp_name = 'example3'\n",
1041 "rtapp = RTA(target, rtapp_name, calibration=te.calibration())\n",
1042 "\n",
1043 "# Configure this RTApp to use a custom JSON\n",
1044 "rtapp.conf(\n",
1045 "\n",
1046 " # 1. generate a \"custom\" set of tasks\n",
1047 " kind = 'custom',\n",
1048 " \n",
1049 " # 2. define the \"profile\" of each task\n",
1050 " params = \"../../assets/mp3-short.json\",\n",
1051 " \n",
1052 " # In this case only few values of the orignal JSON can be tuned:\n",
1053 " # DURATION : maximum duration of the workload [s]\n",
1054 " # PVALUE : calibration value\n",
1055 " # LOGDIR : folder used for generated logs\n",
1056 " # WORKDIR : working directory on target\n",
1057 " \n",
1058 " # 3. defined a maximum duration for that workload\n",
1059 " duration = 5,\n",
1060 " \n",
1075 "12:55:53 INFO : # Create results folder for this execution\n",
1076 "12:55:53 INFO : # Setup FTrace\n",
1077 "12:55:57 INFO : ## Start energy sampling\n",
1078 "12:55:58 INFO : ### Start RTApp execution\n",
1079 "12:55:58 INFO : WlGen - Workload execution START:\n",
1080 …FO : WlGen - /root/devlib-target/bin/rt-app /root/devlib-target/example3_00.json\n",
1081 … ## Read energy consumption: /home/derkling/Code/lisa/results/WlgenExample/example3/energy.json\n",
1082 "12:56:04 INFO : EnergyReport - Energy [ a53]: 2.481205\n",
1083 "12:56:04 INFO : EnergyReport - Energy [ a57]: 8.981533\n",
1084 "12:56:04 INFO : # Stop FTrace\n",
1085 …6:05 INFO : # Save FTrace: /home/derkling/Code/lisa/results/WlgenExample/example3/trace.dat\n",
1086 …Save platform description: /home/derkling/Code/lisa/results/WlgenExample/example3/platform.json\n",
1087 "12:56:07 INFO : # Report collected data:\n",
1088 "12:56:07 INFO : /home/derkling/Code/lisa/results/WlgenExample/example3\n"
1095 "total 5048\r\n",
1096 "drwxrwxr-x 2 derkling derkling 4096 Mar 2 12:56 .\r\n",
1097 "drwxrwxr-x 5 derkling derkling 4096 Mar 2 12:55 ..\r\n",
1098 "-rw-rw-r-- 1 derkling derkling 52 Mar 2 12:56 energy.json\r\n",
1099 "-rw-r--r-- 1 derkling derkling 1324 Mar 2 12:56 example3_00.json\r\n",
1100 "-rw-rw-r-- 1 derkling derkling 807 Mar 2 12:56 output.log\r\n",
1101 "-rw-rw-r-- 1 derkling derkling 1075 Mar 2 12:56 platform.json\r\n",
1102 "-rw-r--r-- 1 derkling derkling 5144576 Mar 2 12:56 trace.dat\r\n"
1107 "res_dir = os.path.join(te.res_dir, rtapp_name)\n",
1122 "12:56:21 INFO : Generated RTApp JSON file:\n"
1129 "{\n",
1130 " \"global\": {\n",
1131 " \"calibration\": 138, \n",
1132 " \"default_policy\": \"SCHED_OTHER\", \n",
1133 " \"duration\": 5, \n",
1134 " \"frag\": 1, \n",
1135 " \"ftrace\": false, \n",
1136 " \"gnuplot\": false, \n",
1137 " \"lock_pages\": true, \n",
1138 " \"log_basename\": \"mp3\", \n",
1139 " \"logdir\": \"/root/devlib-target\"\n",
1140 " }, \n",
1141 " \"tasks\": {\n",
1142 " \"AudioOut\": {\n",
1143 " \"loop\": -1, \n",
1144 " \"priority\": -19, \n",
1145 " \"resume\": \"AudioTrack\", \n",
1146 " \"run\": 4725, \n",
1147 " \"suspend\": \"AudioOut\"\n",
1148 " }, \n",
1149 " \"AudioTick\": {\n",
1150 " \"cpus\": [\n",
1151 " 0\n",
1152 " ], \n",
1153 " \"loop\": -1, \n",
1154 " \"phases\": {\n",
1155 " \"p1\": {\n",
1156 " \"loop\": 1, \n",
1157 " \"resume\": \"AudioOut\", \n",
1158 " \"timer\": {\n",
1159 " \"period\": 6000, \n",
1160 " \"ref\": \"tick\"\n",
1161 " }\n",
1162 " }, \n",
1163 " \"p2\": {\n",
1164 " \"loop\": 4, \n",
1165 " \"timer\": {\n",
1166 " \"period\": 6000, \n",
1167 " \"ref\": \"tick\"\n",
1168 " }\n",
1169 " }\n",
1170 " }, \n",
1171 " \"priority\": -19\n",
1172 " }, \n",
1173 " \"AudioTrack\": {\n",
1174 " \"loop\": -1, \n",
1175 " \"priority\": -16, \n",
1176 " \"resume\": \"mp3.decoder\", \n",
1177 " \"run\": 300, \n",
1178 " \"suspend\": \"AudioTrack\"\n",
1179 " }, \n",
1180 " \"OMXCall\": {\n",
1181 " \"lock\": \"mutex\", \n",
1182 " \"loop\": -1, \n",
1183 " \"priority\": -2, \n",
1184 " \"run\": 300, \n",
1185 " \"signal\": \"queue\", \n",
1186 " \"unlock\": \"mutex\", \n",
1187 " \"wait\": {\n",
1188 " \"mutex\": \"mutex\", \n",
1189 " \"ref\": \"queue\"\n",
1190 " }\n",
1191 " }, \n",
1192 " \"mp3.decoder\": {\n",
1193 " \"lock\": \"mutex\", \n",
1194 " \"loop\": -1, \n",
1195 " \"priority\": -2, \n",
1196 " \"run\": 150, \n",
1197 " \"signal\": \"queue\", \n",
1198 " \"suspend\": \"mp3.decoder\", \n",
1199 " \"unlock\": \"mutex\", \n",
1200 " \"wait\": {\n",
1201 " \"mutex\": \"mutex\", \n",
1202 " \"ref\": \"queue\"\n",
1203 " }\n",
1204 " }\n",
1205 " }\n",
1206 "}\n"
1211 "# Inspect the JSON file used to run the application\n",
1212 "with open('./{}_00.json'.format(rtapp_name), 'r') as fh:\n",
1213 " rtapp_json = json.load(fh)\n",
1214 "logging.info('Generated RTApp JSON file:')\n",
1243 "01:08:28 INFO : WlGen - Setup new workload hackbench\n"
1258 "# Support to configure and run RTApp based workloads\n",
1259 "from wlgen import PerfMessaging\n",
1260 "\n",
1261 "# Create a \"perf bench sched messages\" (i.e. hackbench) workload\n",
1262 "perf_name = 'hackbench'\n",
1263 "perf = PerfMessaging(target, perf_name)\n",
1264 "\n",
1265 "perf.conf(group=1, loop=100, pipe=True, thread=True)\n"
1286 "01:08:29 INFO : # Create results folder for this execution\n"
1293 …cannot create directory ‘/home/derkling/Code/lisa/results/WlgenExample/hackbench’: File exists\r\n"
1300 "01:08:29 INFO : # Setup FTrace\n",
1301 "01:08:31 INFO : ## Start energy sampling\n",
1302 "01:08:31 INFO : ### Start RTApp execution\n",
1303 "01:08:31 INFO : WlGen - Workload execution START:\n",
1304 …en - /root/devlib-target/bin/perf bench sched messaging --pipe --thread --group 1 --loop 100\n",
1305 "01:08:32 INFO : PerfBench - Completion time: 0.126000, Performance 7.936508\n",
1306 …## Read energy consumption: /home/derkling/Code/lisa/results/WlgenExample/hackbench/energy.json\n",
1307 "01:08:33 INFO : EnergyReport - Energy [ a53]: 1.066525\n",
1308 "01:08:33 INFO : EnergyReport - Energy [ a57]: 2.245705\n",
1309 "01:08:33 INFO : # Stop FTrace\n",
1310 …:34 INFO : # Save FTrace: /home/derkling/Code/lisa/results/WlgenExample/hackbench/trace.dat\n",
1311 …ave platform description: /home/derkling/Code/lisa/results/WlgenExample/hackbench/platform.json\n",
1312 "01:08:36 INFO : # Report collected data:\n",
1313 "01:08:36 INFO : /home/derkling/Code/lisa/results/WlgenExample/hackbench\n"
1320 "total 10396\r\n",
1321 "drwxrwxr-x 2 derkling derkling 4096 Mar 2 13:08 .\r\n",
1322 "drwxrwxr-x 6 derkling derkling 4096 Mar 2 13:08 ..\r\n",
1323 "-rw-rw-r-- 1 derkling derkling 52 Mar 2 13:08 energy.json\r\n",
1324 "-rw-rw-r-- 1 derkling derkling 147 Mar 2 13:08 output.log\r\n",
1325 "-rw-rw-r-- 1 derkling derkling 61 Mar 2 13:08 performance.json\r\n",
1326 "-rw-rw-r-- 1 derkling derkling 1075 Mar 2 13:08 platform.json\r\n",
1327 "-rw-r--r-- 1 derkling derkling 10620928 Mar 2 13:08 trace.dat\r\n"
1332 "res_dir = os.path.join(te.res_dir, perf_name)\n",
1354 "01:10:40 INFO : Generated performance JSON file:\n"
1361 "{\n",
1362 " \"ctime\": 0.126, \n",
1363 " \"performance\": 7.936507936507937\n",
1364 "}\n"
1369 "# Inspect the generated performance report\n",
1370 "perf_file = os.path.join(te.res_dir, perf_name, 'performance.json')\n",
1371 "with open(perf_file, 'r') as fh:\n",
1372 " perf_json = json.load(fh)\n",
1373 "logging.info('Generated performance JSON file:')\n",
1395 "version = 6\r\n"