mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
workloads/rt-app: Port workload from WA2
This commit is contained in:
parent
2dc1d2e54e
commit
d4f78afc30
8
wa/workloads/rt_app/LICENSE
Normal file
8
wa/workloads/rt_app/LICENSE
Normal file
@ -0,0 +1,8 @@
|
||||
rt-app binaries and workgen script included with this workload are distributed
|
||||
under GPL version 2; The full text of the license may be viewed here:
|
||||
|
||||
http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Source for these binaries may be obtained from Linaro here:
|
||||
|
||||
https://git.linaro.org/power/rt-app.git
|
281
wa/workloads/rt_app/__init__.py
Normal file
281
wa/workloads/rt_app/__init__.py
Normal file
@ -0,0 +1,281 @@
|
||||
# Copyright 2015 ARM Limited
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
import os
|
||||
import re
|
||||
import json
|
||||
import tarfile
|
||||
from collections import OrderedDict
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
from wa import Workload, Parameter, Executable, File
|
||||
from wa.framework.exception import WorkloadError, ResourceError
|
||||
from wa.utils.misc import check_output
|
||||
|
||||
RAW_OUTPUT_FILENAME = 'raw-output.txt'
|
||||
TARBALL_FILENAME = 'rtapp-logs.tar.gz'
|
||||
BINARY_NAME = 'rt-app'
|
||||
PACKAGED_USE_CASE_DIRECTORY = os.path.abspath(os.path.join(os.path.dirname(__file__), 'use_cases'))
|
||||
|
||||
PLOAD_REGEX = re.compile(r'pLoad = (\d+)(\w+) : calib_cpu (\d+)')
|
||||
ERROR_REGEX = re.compile(r'error')
|
||||
CRIT_REGEX = re.compile(r'crit')
|
||||
|
||||
|
||||
class RtApp(Workload):
|
||||
# pylint: disable=no-member,attribute-defined-outside-init
|
||||
|
||||
name = 'rt-app'
|
||||
description = """
|
||||
A test application that simulates configurable real-time periodic load.
|
||||
|
||||
rt-app is a test application that starts multiple periodic threads in order to
|
||||
simulate a real-time periodic load. It supports SCHED_OTHER, SCHED_FIFO,
|
||||
SCHED_RR as well as the AQuoSA framework and SCHED_DEADLINE.
|
||||
|
||||
The load is described using JSON-like config files. Below are a couple of simple
|
||||
examples.
|
||||
|
||||
|
||||
Simple use case which creates a thread that run 1ms then sleep 9ms
|
||||
until the use case is stopped with Ctrl+C:
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"tasks" : {
|
||||
"thread0" : {
|
||||
"loop" : -1,
|
||||
"run" : 20000,
|
||||
"sleep" : 80000
|
||||
}
|
||||
},
|
||||
"global" : {
|
||||
"duration" : 2,
|
||||
"calibration" : "CPU0",
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"pi_enabled" : false,
|
||||
"lock_pages" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "rt-app1",
|
||||
"ftrace" : false,
|
||||
"gnuplot" : true,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Simple use case with 2 threads that runs for 10 ms and wake up each
|
||||
other until the use case is stopped with Ctrl+C
|
||||
|
||||
.. code-block:: json
|
||||
|
||||
{
|
||||
"tasks" : {
|
||||
"thread0" : {
|
||||
"loop" : -1,
|
||||
"run" : 10000,
|
||||
"resume" : "thread1",
|
||||
"suspend" : "thread0"
|
||||
},
|
||||
"thread1" : {
|
||||
"loop" : -1,
|
||||
"run" : 10000,
|
||||
"resume" : "thread0",
|
||||
"suspend" : "thread1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Please refer to the existing configs in ``$WA_ROOT/wa/workloads/rt_app/use_case``
|
||||
for more examples.
|
||||
|
||||
The version of rt-app currently used with this workload contains enhancements and
|
||||
modifications done by Linaro. The source code for this version may be obtained here:
|
||||
|
||||
http://git.linaro.org/power/rt-app.git
|
||||
|
||||
The upstream version of rt-app is hosted here:
|
||||
|
||||
https://github.com/scheduler-tools/rt-app
|
||||
|
||||
"""
|
||||
|
||||
parameters = [
|
||||
Parameter('config', kind=str, default='taskset',
|
||||
description='''
|
||||
Use case configuration file to run with rt-app. This may be
|
||||
either the name of one of the "standard" configurations included
|
||||
with the workload. or a path to a custom JSON file provided by
|
||||
the user. Either way, the ".json" extension is implied and will
|
||||
be added automatically if not specified in the argument.
|
||||
|
||||
The following is the list of standard configurations currently
|
||||
included with the workload: {}
|
||||
|
||||
'''.format(', '.join(os.listdir(PACKAGED_USE_CASE_DIRECTORY)))),
|
||||
Parameter('duration', kind=int,
|
||||
description='''
|
||||
Duration of the workload execution in Seconds. If specified, this
|
||||
will override the corresponding parameter in the JSON config.
|
||||
'''),
|
||||
Parameter('taskset_mask', kind=int,
|
||||
description='Constrain execution to specific CPUs.'),
|
||||
Parameter('uninstall_on_exit', kind=bool, default=False,
|
||||
description="""
|
||||
If set to ``True``, rt-app binary will be uninstalled from the device
|
||||
at the end of the run.
|
||||
"""),
|
||||
Parameter('force_install', kind=bool, default=False,
|
||||
description="""
|
||||
If set to ``True``, rt-app binary will always be deployed to the
|
||||
target device at the beginning of the run, regardless of whether it
|
||||
was already installed there.
|
||||
"""),
|
||||
]
|
||||
|
||||
def initialize(self, context):
|
||||
# initialize() runs once per run. setting a class variable to make it
|
||||
# available to other instances of the workload
|
||||
RtApp.target_working_directory = self.target.path.join(self.target.working_directory,
|
||||
'rt-app-working')
|
||||
RtApp.host_binary = context.resolver.get(Executable(self,
|
||||
self.target.abi,
|
||||
BINARY_NAME), strict=False)
|
||||
RtApp.workgen_script = context.resolver.get(File(self, 'workgen'))
|
||||
if not self.target.is_rooted: # some use cases require root privileges
|
||||
raise WorkloadError('rt-app requires the target to be rooted.')
|
||||
self.target.execute('mkdir -p {}'.format(self.target_working_directory))
|
||||
self._deploy_rt_app_binary_if_necessary()
|
||||
|
||||
def setup(self, context):
|
||||
self.log_basename = context.current_job.label
|
||||
self.host_json_config = self._load_json_config(context)
|
||||
self.config_file_on_target = self.target.path.join(self.target_working_directory,
|
||||
os.path.basename(self.host_json_config))
|
||||
self.target.push(self.host_json_config, self.config_file_on_target, timeout=60)
|
||||
self.command = '{} {}'.format(self.target_binary, self.config_file_on_target)
|
||||
|
||||
time_buffer = 30
|
||||
self.timeout = self.duration + time_buffer
|
||||
|
||||
def run(self, context):
|
||||
self.output = self.target.invoke(self.command,
|
||||
on_cpus=self.taskset_mask,
|
||||
timeout=self.timeout,
|
||||
as_root=True)
|
||||
|
||||
def update_result(self, context):
|
||||
self._pull_rt_app_logs(context)
|
||||
context.result.classifiers.update(dict(
|
||||
duration=self.duration,
|
||||
task_count=self.task_count,
|
||||
))
|
||||
|
||||
outfile = os.path.join(context.output_directory, RAW_OUTPUT_FILENAME)
|
||||
with open(outfile, 'w') as wfh:
|
||||
wfh.write(self.output)
|
||||
|
||||
error_count = 0
|
||||
crit_count = 0
|
||||
for line in self.output.split('\n'):
|
||||
match = PLOAD_REGEX.search(line)
|
||||
if match:
|
||||
pload_value = match.group(1)
|
||||
pload_unit = match.group(2)
|
||||
calib_cpu_value = match.group(3)
|
||||
context.result.add_metric('pLoad', float(pload_value), pload_unit)
|
||||
context.result.add_metric('calib_cpu', float(calib_cpu_value))
|
||||
|
||||
error_match = ERROR_REGEX.search(line)
|
||||
if error_match:
|
||||
error_count += 1
|
||||
|
||||
crit_match = CRIT_REGEX.search(line)
|
||||
if crit_match:
|
||||
crit_count += 1
|
||||
|
||||
context.result.add_metric('error_count', error_count, 'count')
|
||||
context.result.add_metric('crit_count', crit_count, 'count')
|
||||
|
||||
def finalize(self, context):
|
||||
if self.uninstall_on_exit:
|
||||
self.target.uninstall(self.target_binary)
|
||||
self.target.execute('rm -rf {}'.format(self.target_working_directory))
|
||||
|
||||
def _deploy_rt_app_binary_if_necessary(self):
|
||||
# called from initialize() so gets invoked once per run
|
||||
RtApp.target_binary = self.target.get_installed("rt-app")
|
||||
if self.force_install or not RtApp.target_binary:
|
||||
if not self.host_binary:
|
||||
message = '''rt-app is not installed on the target and could not be
|
||||
found in workload resources'''
|
||||
raise ResourceError(message)
|
||||
RtApp.target_binary = self.target.install(self.host_binary)
|
||||
|
||||
def _load_json_config(self, context):
|
||||
user_config_file = self._get_raw_json_config(context.resolver)
|
||||
config_file = self._generate_workgen_config(user_config_file,
|
||||
context.output_directory)
|
||||
with open(config_file) as fh:
|
||||
config_data = json.load(fh, object_pairs_hook=OrderedDict)
|
||||
self._update_rt_app_config(config_data)
|
||||
self.duration = config_data['global'].get('duration', 0)
|
||||
self.task_count = len(config_data.get('tasks', []))
|
||||
with open(config_file, 'w') as wfh:
|
||||
json.dump(config_data, wfh, indent=4)
|
||||
return config_file
|
||||
|
||||
def _get_raw_json_config(self, resolver):
|
||||
if os.path.splitext(self.config)[1] != '.json':
|
||||
self.config += '.json'
|
||||
if os.path.isfile(self.config):
|
||||
return os.path.abspath(self.config)
|
||||
partial_path = os.path.join('use_cases', self.config)
|
||||
return resolver.get(File(self, partial_path))
|
||||
|
||||
def _generate_workgen_config(self, user_file, output_directory):
|
||||
output_file = os.path.join(output_directory, 'unkind.json')
|
||||
# use workgen dry run option to generate a use case
|
||||
# file with proper JSON grammar on host first
|
||||
try:
|
||||
check_output('python {} -d -o {} {}'.format(self.workgen_script,
|
||||
output_file,
|
||||
user_file),
|
||||
shell=True)
|
||||
except CalledProcessError as e:
|
||||
message = 'Could not generate config using workgen, got "{}"'
|
||||
raise WorkloadError(message.format(e))
|
||||
return output_file
|
||||
|
||||
def _update_rt_app_config(self, config_data):
|
||||
config_data['global'] = config_data.get('global', {})
|
||||
config_data['global']['logdir'] = self.target_working_directory
|
||||
config_data['global']['log_basename'] = self.log_basename
|
||||
if self.duration is not None:
|
||||
config_data['global']['duration'] = self.duration
|
||||
|
||||
def _pull_rt_app_logs(self, context):
|
||||
tar_command = '{} tar czf {}/{} -C {} .'.format(self.target.busybox,
|
||||
self.target_working_directory,
|
||||
TARBALL_FILENAME,
|
||||
self.target_working_directory)
|
||||
self.target.execute(tar_command, timeout=300)
|
||||
target_path = self.target.path.join(self.target_working_directory, TARBALL_FILENAME)
|
||||
host_path = os.path.join(context.output_directory, TARBALL_FILENAME)
|
||||
self.target.pull_file(target_path, host_path, timeout=120)
|
||||
with tarfile.open(host_path, 'r:gz') as tf:
|
||||
tf.extractall(context.output_directory)
|
||||
os.remove(host_path)
|
||||
self.target.execute('rm -rf {}/*'.format(self.target_working_directory))
|
BIN
wa/workloads/rt_app/bin/arm64/rt-app
Executable file
BIN
wa/workloads/rt_app/bin/arm64/rt-app
Executable file
Binary file not shown.
BIN
wa/workloads/rt_app/bin/armeabi/rt-app
Executable file
BIN
wa/workloads/rt_app/bin/armeabi/rt-app
Executable file
Binary file not shown.
134
wa/workloads/rt_app/use_cases/browser-long.json
Normal file
134
wa/workloads/rt_app/use_cases/browser-long.json
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"BrowserMain" : {
|
||||
"loop" : 3,
|
||||
"phases" : {
|
||||
"start" : {
|
||||
"loop" : 1,
|
||||
"sleep" : 400000,
|
||||
"run" : 15000,
|
||||
"resume" : "Browser",
|
||||
"run" : 7000,
|
||||
"sleep" : 8000
|
||||
},
|
||||
"render1" : {
|
||||
"loop" : 50,
|
||||
"resume" : "BrowserSub",
|
||||
"run" : 3000
|
||||
},
|
||||
"render2" : {
|
||||
"loop" : 1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 10000,
|
||||
"resume" : "Browser",
|
||||
"run" : 5000
|
||||
},
|
||||
"render3" : {
|
||||
"loop" : 20,
|
||||
"resume" : "BrowserSub",
|
||||
"run" : 3000
|
||||
},
|
||||
"stop" : {
|
||||
"loop" : 1,
|
||||
"run" : 2000,
|
||||
"sleep" : 200000,
|
||||
"suspend" : "Browser",
|
||||
"sleep" : 600000
|
||||
},
|
||||
"scroll" : {
|
||||
"loop" : 4,
|
||||
"resume" : "Browser",
|
||||
"suspend" : "BrowserNext",
|
||||
"run" : 1000
|
||||
},
|
||||
"stop2" : {
|
||||
"loop" : 1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 200,
|
||||
"sleep" : 800000
|
||||
}
|
||||
}
|
||||
},
|
||||
"BrowserSub1" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "BrowserSub",
|
||||
"run" : 100
|
||||
},
|
||||
"BrowserSub2" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "BrowserSub",
|
||||
"run" : 100
|
||||
},
|
||||
"BrowserDisplay" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 300,
|
||||
"resume" : "BrowserNext",
|
||||
"run" : 12000,
|
||||
"lock" : "mutex11",
|
||||
"sync" : { "ref" : "queue11", "mutex": "mutex11" },
|
||||
"unlock" : "mutex11",
|
||||
"run" : 300,
|
||||
"resume" : "Binder-display",
|
||||
"run" : 400
|
||||
},
|
||||
"Binder-dummy" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"lock" : "mutex11",
|
||||
"wait" : { "ref" : "queue11", "mutex": "mutex11" },
|
||||
"unlock" : "mutex11",
|
||||
"run" : 200,
|
||||
"lock" : "mutex11",
|
||||
"signal" : "queue11",
|
||||
"unlock" : "mutex11",
|
||||
"run" : 100
|
||||
},
|
||||
"Binder-display" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder-display",
|
||||
"run" : 300,
|
||||
"resume" : "Event-Browser",
|
||||
"resume" : "Event-Display"
|
||||
},
|
||||
"Event-Browser" : {
|
||||
"priority" : -9,
|
||||
"loop" : -1,
|
||||
"suspend" : "Event-Browser",
|
||||
"run" : 50,
|
||||
"sleep" : 16000,
|
||||
"run" : 50,
|
||||
"resume" : "Browser"
|
||||
},
|
||||
"Event-Display" : {
|
||||
"priority" : -9,
|
||||
"loop" : -1,
|
||||
"suspend" : "Event-Display",
|
||||
"run" : 50,
|
||||
"sleep" : 16000,
|
||||
"run" : 50,
|
||||
"resume" : "Display"
|
||||
},
|
||||
"Display" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"suspend" : "Display",
|
||||
"run" : 16000
|
||||
},
|
||||
},
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 600,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "web",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
134
wa/workloads/rt_app/use_cases/browser-short.json
Normal file
134
wa/workloads/rt_app/use_cases/browser-short.json
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"BrowserMain" : {
|
||||
"loop" : 3,
|
||||
"phases" : {
|
||||
"start" : {
|
||||
"loop" : 1,
|
||||
"sleep" : 400000,
|
||||
"run" : 15000,
|
||||
"resume" : "Browser",
|
||||
"run" : 7000,
|
||||
"sleep" : 8000
|
||||
},
|
||||
"render1" : {
|
||||
"loop" : 50,
|
||||
"resume" : "BrowserSub",
|
||||
"run" : 3000
|
||||
},
|
||||
"render2" : {
|
||||
"loop" : 1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 10000,
|
||||
"resume" : "Browser",
|
||||
"run" : 5000
|
||||
},
|
||||
"render3" : {
|
||||
"loop" : 20,
|
||||
"resume" : "BrowserSub",
|
||||
"run" : 3000
|
||||
},
|
||||
"stop" : {
|
||||
"loop" : 1,
|
||||
"run" : 2000,
|
||||
"sleep" : 200000,
|
||||
"suspend" : "Browser",
|
||||
"sleep" : 600000
|
||||
},
|
||||
"scroll" : {
|
||||
"loop" : 4,
|
||||
"resume" : "Browser",
|
||||
"suspend" : "BrowserNext",
|
||||
"run" : 1000
|
||||
},
|
||||
"stop2" : {
|
||||
"loop" : 1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 200,
|
||||
"sleep" : 800000
|
||||
}
|
||||
}
|
||||
},
|
||||
"BrowserSub1" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "BrowserSub",
|
||||
"run" : 100
|
||||
},
|
||||
"BrowserSub2" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "BrowserSub",
|
||||
"run" : 100
|
||||
},
|
||||
"BrowserDisplay" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "Browser",
|
||||
"run" : 300,
|
||||
"resume" : "BrowserNext",
|
||||
"run" : 12000,
|
||||
"lock" : "mutex11",
|
||||
"sync" : { "ref" : "queue11", "mutex": "mutex11" },
|
||||
"unlock" : "mutex11",
|
||||
"run" : 300,
|
||||
"resume" : "Binder-display",
|
||||
"run" : 400
|
||||
},
|
||||
"Binder-dummy" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"lock" : "mutex11",
|
||||
"wait" : { "ref" : "queue11", "mutex": "mutex11" },
|
||||
"unlock" : "mutex11",
|
||||
"run" : 200,
|
||||
"lock" : "mutex11",
|
||||
"signal" : "queue11",
|
||||
"unlock" : "mutex11",
|
||||
"run" : 100
|
||||
},
|
||||
"Binder-display" : {
|
||||
"priority" : -6,
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder-display",
|
||||
"run" : 300,
|
||||
"resume" : "Event-Browser",
|
||||
"resume" : "Event-Display"
|
||||
},
|
||||
"Event-Browser" : {
|
||||
"priority" : -9,
|
||||
"loop" : -1,
|
||||
"suspend" : "Event-Browser",
|
||||
"run" : 50,
|
||||
"sleep" : 16000,
|
||||
"run" : 50,
|
||||
"resume" : "Browser"
|
||||
},
|
||||
"Event-Display" : {
|
||||
"priority" : -9,
|
||||
"loop" : -1,
|
||||
"suspend" : "Event-Display",
|
||||
"run" : 50,
|
||||
"sleep" : 16000,
|
||||
"run" : 50,
|
||||
"resume" : "Display"
|
||||
},
|
||||
"Display" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"suspend" : "Display",
|
||||
"run" : 16000
|
||||
},
|
||||
},
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 6,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "web",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
980
wa/workloads/rt_app/use_cases/camera-long.json
Normal file
980
wa/workloads/rt_app/use_cases/camera-long.json
Normal file
@ -0,0 +1,980 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"surfaceflinger" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"suspend": "surfaceflinger",
|
||||
"run" : 1500,
|
||||
"resume" : "Binder1"
|
||||
},
|
||||
|
||||
"emulate_irq" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "rpmsg_tx_tsk",
|
||||
"run" : 50,
|
||||
"timer" : { "ref" : "timerA", "period" : 33333 }
|
||||
},
|
||||
|
||||
"rpmsg_tx_tsk" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
|
||||
"p1" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"sleep" : 3500
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"sleep" : 4000
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"suspend" : "rpmsg_tx_tsk"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispack" : {
|
||||
"priority" : -20,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 400,
|
||||
"resume" : "ispout_1",
|
||||
"resume" : "ispin_1",
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ispout_2"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "ispout_8"
|
||||
},
|
||||
|
||||
"p4": {
|
||||
"resume" : "ispout_6",
|
||||
"run" : 200
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"p6" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_1" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_1",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_1_mutex",
|
||||
"wait" : { "ref" : "ispout_1_queue", "mutex": "ispout_1_mutex" },
|
||||
"unlock" : "ispout_1_mutex",
|
||||
"sleep" : 30,
|
||||
"lock1" : "ispout_1_mutex",
|
||||
"wait1" : { "ref" : "ispout_1_queue", "mutex": "ispout_1_mutex" },
|
||||
"unlock1" : "ispout_1_mutex",
|
||||
"run" : 1500
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "fork1"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "fork2"
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"resume" : "fork3"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_2" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_2",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_2_mutex",
|
||||
"wait" : { "ref" : "ispout_2_queue", "mutex": "ispout_2_mutex" },
|
||||
"unlock" : "ispout_2_mutex",
|
||||
"run" : 350,
|
||||
"resume" : "SceneDetection",
|
||||
"run1" : 200
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "FaceDetection"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "Misc",
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"resume" : "AssitAF",
|
||||
"sleep" : 20,
|
||||
"run" : 600
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_6" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_6",
|
||||
"run" : 1000
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ev2",
|
||||
"run" : 400
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ispout_8_mutex",
|
||||
"signal" : "ispout_8_queue",
|
||||
"unlock" : "ispout_8_mutex"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"lock" : "ispout_2_mutex",
|
||||
"signal" : "ispout_2_queue",
|
||||
"unlock" : "ispout_2_mutex",
|
||||
"resume" : "pl2"
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"lock" : "ispout_1_mutex",
|
||||
"signal" : "ispout_1_queue",
|
||||
"unlock" : "ispout_1_mutex",
|
||||
"run" : 150,
|
||||
"lock1" : "ispout_1_mutex",
|
||||
"signal1" : "ispout_1_queue",
|
||||
"unlock1" : "ispout_1_mutex",
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_8" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_8",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_8_mutex",
|
||||
"wait" : { "ref" : "ispout_8_queue", "mutex": "ispout_8_mutex" },
|
||||
"unlock" : "ispout_8_mutex",
|
||||
"run" : 300,
|
||||
"resume" : "ispreproc"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispin_1" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_1",
|
||||
"run" : 180,
|
||||
"resume" : "isp_0",
|
||||
|
||||
"lock" : "ispin_1_mutex",
|
||||
"wait" : { "ref" : "ispin_1_queue", "mutex": "ispin_1_mutex" },
|
||||
"unlock" : "ispin_1_mutex",
|
||||
"run" : 50,
|
||||
},
|
||||
|
||||
"ispin_2" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_2",
|
||||
"run" : 50,
|
||||
},
|
||||
|
||||
|
||||
"ispin_8" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_8",
|
||||
"run" : 125,
|
||||
},
|
||||
|
||||
"isp_0" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_1",
|
||||
"run" : 1500,
|
||||
|
||||
"lock" : "ispin_1_mutex",
|
||||
"signal" : "ispin_1_queue",
|
||||
"unlock" : "ispin_1_mutex",
|
||||
|
||||
"resume" : "ispin_2",
|
||||
|
||||
|
||||
"run" : 50,
|
||||
|
||||
"resume" : "ispin_8",
|
||||
},
|
||||
|
||||
"SceneDetection" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "SceneDetection",
|
||||
"run" : 3500,
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "LogdWriter",
|
||||
"lock" : "ev2_mutex",
|
||||
"signal" : "ev2_queue",
|
||||
"unlock" : "ev2_mutex"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"suspend" : "SceneDetection",
|
||||
"run" : 6500,
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "LogdWriter",
|
||||
"lock" : "ev2_mutex",
|
||||
"signal" : "ev2_queue",
|
||||
"unlock" : "ev2_mutex"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"FaceDetection" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 5736,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 7626,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 2405,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 8184,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispreproc" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispreproc",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispreproc_mutex",
|
||||
"wait" : { "ref" : "ispreproc_queue", "mutex": "ispreproc_mutex" },
|
||||
"unlock" : "ispreproc_mutex",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ev2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ev2",
|
||||
"run" : 260
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ispreq",
|
||||
"run" : 260,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ev2_mutex",
|
||||
"wait" : { "ref" : "ev2_queue", "mutex": "ev2_mutex" },
|
||||
"unlock" : "ev2_mutex",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ispreproc_mutex",
|
||||
"signal" : "ispreproc_queue",
|
||||
"unlock" : "ispreproc_mutex",
|
||||
"run" : 110
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Misc" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "Misc",
|
||||
"run" : 178
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"AssitAF" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "AssitAF",
|
||||
"run" : 178
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispreq" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispreq",
|
||||
"run" : 180
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"pl2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "pl2",
|
||||
"run" : 285,
|
||||
"resume" : "CameraData"
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 11848,
|
||||
"run" : 896
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork1",
|
||||
"run" : 182
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase1",
|
||||
"run" : 7000,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork2",
|
||||
"run" : 82
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase2",
|
||||
"run" : 6400,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork3" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork3",
|
||||
"run" : 82
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase3"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase3" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase3",
|
||||
"run" : 7361
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"SensorService" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"run" : 300,
|
||||
"resume" : "m_camera",
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"run" : 300,
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"run" : 300,
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"run" : 300,
|
||||
"resume" : "m_camera",
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"DisplaySync" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"run" : 180
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "EventThread1"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "EventThread2"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"sleep" : 30,
|
||||
"run" : 120,
|
||||
"timer" : { "ref" : "timerB", "period" : 16667 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"EventThread1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
|
||||
"p1" : {
|
||||
"suspend" : "EventThread1",
|
||||
"run" : 200,
|
||||
"resume" : "m_camera",
|
||||
"run1" : 280,
|
||||
"resume": "surfaceflinger",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 660,
|
||||
"run" : 300,
|
||||
"sleep1" : 60,
|
||||
"run1" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"EventThread2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread2",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"m_camera" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "m_camera",
|
||||
"run" : 660
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "render_thread_mutex",
|
||||
"signal" : "render_thread_queue",
|
||||
"unlock" : "render_thread_mutex"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"RenderThread" : {
|
||||
"loop" : -1,
|
||||
|
||||
"lock" : "render_thread_mutex",
|
||||
"wait" : { "ref" : "render_thread_queue", "mutex": "render_thread_mutex" },
|
||||
"unlock" : "render_thread_mutex",
|
||||
|
||||
"run" : 300,
|
||||
"resume" : "mali-render",
|
||||
"sleep" : 240,
|
||||
"run1" : 1000,
|
||||
"sleep1" : 210,
|
||||
"run2" : 1040,
|
||||
"sleep2" : 580,
|
||||
"run3" : 350
|
||||
|
||||
},
|
||||
|
||||
"MaliRender" : {
|
||||
"loop" : -1,
|
||||
|
||||
"suspend" : "mali-render",
|
||||
"run" : 250,
|
||||
"resume" : "mali-render-hnd",
|
||||
"sleep" : 20,
|
||||
"run1" : 160,
|
||||
"sleep1" : 1373,
|
||||
"run2" : 250,
|
||||
"resume2" : "mali-render-hnd",
|
||||
"sleep2" : 20,
|
||||
"run3" : 250,
|
||||
"sleep3" : 568,
|
||||
"run4" : 500,
|
||||
"sleep4" : 30,
|
||||
"run5" : 300,
|
||||
"resume5" : "mali-render-hnd",
|
||||
"sleep5" : 200,
|
||||
"run6" : 120,
|
||||
|
||||
"resume": "surfaceflinger",
|
||||
},
|
||||
|
||||
"MaliRenderHnd" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "mali-render-hnd",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"AudioTick" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 1,
|
||||
"run" : 150,
|
||||
"resume" : "AudioIn",
|
||||
"timer" : { "ref" : "tick", "period": 20000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"AudioIn" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioIn",
|
||||
"run" : 2730,
|
||||
"resume" : "AudioRecord"
|
||||
},
|
||||
|
||||
"AudioRecord" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioRecord",
|
||||
"resume" : "pull_looper",
|
||||
"sleep" : 2600,
|
||||
"resume1" : "pull_looper"
|
||||
},
|
||||
|
||||
"pull_looper" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "pull_looper",
|
||||
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock" : "mutex"
|
||||
},
|
||||
|
||||
"recoder_looper" : {
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 180,
|
||||
|
||||
"lock1" : "mutex",
|
||||
"signal1" : "queue",
|
||||
"wait1" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock1" : "mutex",
|
||||
"run1" : 130,
|
||||
|
||||
"resume" : "gle.acc.encoder",
|
||||
|
||||
"lock2" : "mutex",
|
||||
"signal2" : "queue",
|
||||
"wait2" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock2" : "mutex",
|
||||
"run2" : 130
|
||||
},
|
||||
|
||||
"codec_looper" : {
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 130,
|
||||
|
||||
"lock1" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock1" : "mutex",
|
||||
"run1" : 180,
|
||||
|
||||
"suspend" : "codec_looper",
|
||||
"run2" : 160,
|
||||
"lock2" : "mutex",
|
||||
"signal2" : "queue",
|
||||
"unlock2" : "mutex"
|
||||
},
|
||||
|
||||
"gle.acc.encoder" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "gle.acc.encoder",
|
||||
"run" : 20,
|
||||
"resume" : "OMXCall",
|
||||
|
||||
"suspend1" : "gle.acc.encoder",
|
||||
"run1" : 800,
|
||||
"resume1" : "OMXCall"
|
||||
},
|
||||
|
||||
"OMXCall" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "OMXCall",
|
||||
"run" : 130,
|
||||
"resume" : "codec_looper"
|
||||
},
|
||||
|
||||
"CameraData" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "CameraData",
|
||||
"run" : 2000,
|
||||
"lock" : "camera_data_mutex",
|
||||
"signal" : "camera_data_queue",
|
||||
"unlock" : "camera_data_mutex",
|
||||
|
||||
"resume" : "Binder1",
|
||||
"resume1" : "Binder2",
|
||||
"run1" : 2080,
|
||||
|
||||
"lock1" : "camera_data_mutex",
|
||||
"signal1" : "camera_data_queue",
|
||||
"unlock1" : "camera_data_mutex",
|
||||
|
||||
"resume2" : "Binder3"
|
||||
},
|
||||
|
||||
"CameraDataProc" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_data_mutex",
|
||||
"wait" : { "ref" : "camera_data_queue", "mutex": "camera_data_mutex" },
|
||||
"unlock" : "camera_data_mutex",
|
||||
"run" : 150,
|
||||
|
||||
"lock1" : "camera_stream1_mutex",
|
||||
"signal" : "camera_stream1_queue",
|
||||
"unlock1" : "camera_stream1_mutex",
|
||||
|
||||
"lock2" : "camera_data_mutex",
|
||||
"wait2" : { "ref" : "camera_data_queue", "mutex": "camera_data_mutex" },
|
||||
"unlock2" : "camera_data_mutex",
|
||||
"run2" : 1000,
|
||||
|
||||
"resume" : "Binder1"
|
||||
},
|
||||
|
||||
"CameraStream1" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream1_mutex",
|
||||
"wait" : { "ref" : "camera_stream1_queue", "mutex": "camera_stream1_mutex" },
|
||||
"unlock" : "camera_stream1_mutex",
|
||||
"run" : 240,
|
||||
|
||||
"resume" : "Binder1",
|
||||
|
||||
"lock1" : "camera_stream2_mutex",
|
||||
"signal" : "camera_stream2_queue",
|
||||
"unlock1" : "camera_stream2_mutex",
|
||||
|
||||
"sleep" : 2500,
|
||||
"run1" : 240,
|
||||
|
||||
"lock2" : "camera_stream3_mutex",
|
||||
"signal2" : "camera_stream3_queue",
|
||||
"unlock2" : "camera_stream3_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
|
||||
"lock3" : "camera_req_mutex",
|
||||
"signal3" : "camera_req_queue",
|
||||
"unlock3" : "camera_req_mutex"
|
||||
},
|
||||
|
||||
"CameraStream2" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream2_mutex",
|
||||
"wait" : { "ref" : "camera_stream2_queue", "mutex": "camera_stream2_mutex" },
|
||||
"unlock" : "camera_stream2_mutex",
|
||||
"run" : 180,
|
||||
"sleep" : 2500,
|
||||
"run1" : 240,
|
||||
"sleep1" : 850,
|
||||
"run2" : 90,
|
||||
|
||||
"resume" : "Binder1",
|
||||
|
||||
"lock2" : "camera_req_mutex",
|
||||
"signal" : "camera_req_queue",
|
||||
"unlock2" : "camera_req_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"CameraStream3" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream3_mutex",
|
||||
"wait" : { "ref" : "camera_stream3_queue", "mutex": "camera_stream3_mutex" },
|
||||
"unlock" : "camera_stream3_mutex",
|
||||
"run" : 90,
|
||||
|
||||
"lock1" : "eb_mutex",
|
||||
"signal" : "eb_queue",
|
||||
"unlock1" : "eb_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"CameraReqQueue" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_req_mutex",
|
||||
"wait" : { "ref" : "camera_req_queue", "mutex": "camera_req_mutex" },
|
||||
"unlock" : "camera_req_mutex",
|
||||
"run" : 200,
|
||||
|
||||
"lock1" : "camera_req_mutex",
|
||||
"wait1" : { "ref" : "camera_req_queue", "mutex": "camera_req_mutex" },
|
||||
"unlock1" : "camera_req_mutex",
|
||||
"run1" : 200,
|
||||
|
||||
"resume" : "Binder3",
|
||||
|
||||
"sleep" : 120,
|
||||
"run2" : 200,
|
||||
|
||||
"resume2" : "Binder2",
|
||||
|
||||
"sleep2" : 1900,
|
||||
"run3" : 270,
|
||||
"lock3" : "camera_s0_mutex",
|
||||
"signal" : "camera_s0_queue",
|
||||
"unlock3" : "camera_s0_mutex",
|
||||
|
||||
"resume3" : "Binder1",
|
||||
|
||||
"sleep3" : 560,
|
||||
"run4" : 700,
|
||||
"lock4" : "camera_s1_mutex",
|
||||
"signal4" : "camera_s1_queue",
|
||||
"unlock4" : "camera_s1_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
|
||||
"sleep4" : 533,
|
||||
"run5" : 300,
|
||||
"lock5" : "camera_s2_mutex",
|
||||
"signal5" : "camera_s2_queue",
|
||||
"unlock5" : "camera_s2_mutex"
|
||||
},
|
||||
|
||||
"CameraS0" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_s0_mutex",
|
||||
"wait" : { "ref" : "camera_s0_queue", "mutex": "camera_s0_mutex" },
|
||||
"unlock" : "camera_s0_mutex",
|
||||
"run" : 300,
|
||||
|
||||
"lock1" : "camera_s1_mutex",
|
||||
"wait1" : { "ref" : "camera_s1_queue", "mutex": "camera_s1_mutex" },
|
||||
"unlock1" : "camera_s1_mutex",
|
||||
"run1" : 300,
|
||||
|
||||
"lock2" : "camera_s2_mutex",
|
||||
"wait2" : { "ref" : "camera_s2_queue", "mutex": "camera_s2_mutex" },
|
||||
"unlock2" : "camera_s2_mutex",
|
||||
"run2" : 400,
|
||||
|
||||
"sleep" : 900,
|
||||
"run3" : 380,
|
||||
"sleep3" : 250,
|
||||
"run4" : 278
|
||||
},
|
||||
|
||||
"EmptyBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "eb_mutex",
|
||||
"wait" : { "ref" : "eb_queue", "mutex": "eb_mutex" },
|
||||
"unlock" : "eb_mutex",
|
||||
"run" : 240,
|
||||
|
||||
"lock1" : "encb_mutex",
|
||||
"signal" : "encb_queue",
|
||||
"unlock1" : "encb_mutex"
|
||||
},
|
||||
|
||||
"EncodeBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "encb_mutex",
|
||||
"wait" : { "ref" : "encb_queue", "mutex": "encb_mutex" },
|
||||
"unlock" : "encb_mutex",
|
||||
"run" : 370,
|
||||
|
||||
"lock1" : "fb_mutex",
|
||||
"signal" : "fb_queue",
|
||||
"wait1" : { "ref" : "fb_queue", "mutex": "fb_mutex" },
|
||||
"unlock1" : "fb_mutex",
|
||||
"run1" : 350
|
||||
},
|
||||
|
||||
"FillBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "fb_mutex",
|
||||
"wait" : { "ref" : "fb_queue", "mutex": "fb_mutex" },
|
||||
"unlock" : "fb_mutex",
|
||||
"run" : 200,
|
||||
|
||||
"sleep" : 14800,
|
||||
"run1" : 2400,
|
||||
|
||||
"lock1" : "fb_mutex",
|
||||
"signal" : "fb_queue",
|
||||
"unlock1" : "fb_mutex"
|
||||
},
|
||||
|
||||
"Binder1" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder1",
|
||||
"run" : 350
|
||||
},
|
||||
|
||||
"Binder2" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder2",
|
||||
"run" : 365
|
||||
},
|
||||
|
||||
"Binder3" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder3",
|
||||
"run" : 369,
|
||||
},
|
||||
|
||||
"LogdWriter" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "LogdWriter",
|
||||
"run" : 300,
|
||||
"resume" : "LogdReader",
|
||||
},
|
||||
|
||||
"LogdReader" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "LogdReader",
|
||||
"run" : 30,
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 600,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "camera",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
||||
|
980
wa/workloads/rt_app/use_cases/camera-short.json
Normal file
980
wa/workloads/rt_app/use_cases/camera-short.json
Normal file
@ -0,0 +1,980 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"surfaceflinger" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"suspend": "surfaceflinger",
|
||||
"run" : 1500,
|
||||
"resume" : "Binder1"
|
||||
},
|
||||
|
||||
"emulate_irq" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "rpmsg_tx_tsk",
|
||||
"run" : 50,
|
||||
"timer" : { "ref" : "timerA", "period" : 33333 }
|
||||
},
|
||||
|
||||
"rpmsg_tx_tsk" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
|
||||
"p1" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"sleep" : 3500
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"sleep" : 4000
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"run" : 50,
|
||||
"resume" : "ispack",
|
||||
"suspend" : "rpmsg_tx_tsk"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispack" : {
|
||||
"priority" : -20,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 400,
|
||||
"resume" : "ispout_1",
|
||||
"resume" : "ispin_1",
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ispout_2"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "ispout_8"
|
||||
},
|
||||
|
||||
"p4": {
|
||||
"resume" : "ispout_6",
|
||||
"run" : 200
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"p6" : {
|
||||
"suspend" : "ispack",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_1" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_1",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_1_mutex",
|
||||
"wait" : { "ref" : "ispout_1_queue", "mutex": "ispout_1_mutex" },
|
||||
"unlock" : "ispout_1_mutex",
|
||||
"sleep" : 30,
|
||||
"lock1" : "ispout_1_mutex",
|
||||
"wait1" : { "ref" : "ispout_1_queue", "mutex": "ispout_1_mutex" },
|
||||
"unlock1" : "ispout_1_mutex",
|
||||
"run" : 1500
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "fork1"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "fork2"
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"resume" : "fork3"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_2" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_2",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_2_mutex",
|
||||
"wait" : { "ref" : "ispout_2_queue", "mutex": "ispout_2_mutex" },
|
||||
"unlock" : "ispout_2_mutex",
|
||||
"run" : 350,
|
||||
"resume" : "SceneDetection",
|
||||
"run1" : 200
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "FaceDetection"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "Misc",
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"resume" : "AssitAF",
|
||||
"sleep" : 20,
|
||||
"run" : 600
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_6" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_6",
|
||||
"run" : 1000
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ev2",
|
||||
"run" : 400
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ispout_8_mutex",
|
||||
"signal" : "ispout_8_queue",
|
||||
"unlock" : "ispout_8_mutex"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"lock" : "ispout_2_mutex",
|
||||
"signal" : "ispout_2_queue",
|
||||
"unlock" : "ispout_2_mutex",
|
||||
"resume" : "pl2"
|
||||
},
|
||||
|
||||
"p5" : {
|
||||
"lock" : "ispout_1_mutex",
|
||||
"signal" : "ispout_1_queue",
|
||||
"unlock" : "ispout_1_mutex",
|
||||
"run" : 150,
|
||||
"lock1" : "ispout_1_mutex",
|
||||
"signal1" : "ispout_1_queue",
|
||||
"unlock1" : "ispout_1_mutex",
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispout_8" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispout_8",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispout_8_mutex",
|
||||
"wait" : { "ref" : "ispout_8_queue", "mutex": "ispout_8_mutex" },
|
||||
"unlock" : "ispout_8_mutex",
|
||||
"run" : 300,
|
||||
"resume" : "ispreproc"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispin_1" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_1",
|
||||
"run" : 180,
|
||||
"resume" : "isp_0",
|
||||
|
||||
"lock" : "ispin_1_mutex",
|
||||
"wait" : { "ref" : "ispin_1_queue", "mutex": "ispin_1_mutex" },
|
||||
"unlock" : "ispin_1_mutex",
|
||||
"run" : 50,
|
||||
},
|
||||
|
||||
"ispin_2" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_2",
|
||||
"run" : 50,
|
||||
},
|
||||
|
||||
|
||||
"ispin_8" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_8",
|
||||
"run" : 125,
|
||||
},
|
||||
|
||||
"isp_0" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "ispin_1",
|
||||
"run" : 1500,
|
||||
|
||||
"lock" : "ispin_1_mutex",
|
||||
"signal" : "ispin_1_queue",
|
||||
"unlock" : "ispin_1_mutex",
|
||||
|
||||
"resume" : "ispin_2",
|
||||
|
||||
|
||||
"run" : 50,
|
||||
|
||||
"resume" : "ispin_8",
|
||||
},
|
||||
|
||||
"SceneDetection" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "SceneDetection",
|
||||
"run" : 3500,
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "LogdWriter",
|
||||
"lock" : "ev2_mutex",
|
||||
"signal" : "ev2_queue",
|
||||
"unlock" : "ev2_mutex"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"suspend" : "SceneDetection",
|
||||
"run" : 6500,
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"resume" : "LogdWriter",
|
||||
"lock" : "ev2_mutex",
|
||||
"signal" : "ev2_queue",
|
||||
"unlock" : "ev2_mutex"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"FaceDetection" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 5736,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 7626,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 2405,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"suspend" : "FaceDetection",
|
||||
"run" : 8184,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispreproc" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispreproc",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "ispreproc_mutex",
|
||||
"wait" : { "ref" : "ispreproc_queue", "mutex": "ispreproc_mutex" },
|
||||
"unlock" : "ispreproc_mutex",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ev2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ev2",
|
||||
"run" : 260
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ispreq",
|
||||
"run" : 260,
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ev2_mutex",
|
||||
"wait" : { "ref" : "ev2_queue", "mutex": "ev2_mutex" },
|
||||
"unlock" : "ev2_mutex",
|
||||
"run" : 140
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"lock" : "ispreproc_mutex",
|
||||
"signal" : "ispreproc_queue",
|
||||
"unlock" : "ispreproc_mutex",
|
||||
"run" : 110
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Misc" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "Misc",
|
||||
"run" : 178
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"AssitAF" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "AssitAF",
|
||||
"run" : 178
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ispreq" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ispreq",
|
||||
"run" : 180
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"pl2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "pl2",
|
||||
"run" : 285,
|
||||
"resume" : "CameraData"
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 11848,
|
||||
"run" : 896
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork1",
|
||||
"run" : 182
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase1"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase1",
|
||||
"run" : 7000,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork2",
|
||||
"run" : 82
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase2",
|
||||
"run" : 6400,
|
||||
"resume" : "LogdWriter",
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"fork3" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "fork3",
|
||||
"run" : 82
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "ThumbnailBase3"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ThumbnailBase3" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "ThumbnailBase3",
|
||||
"run" : 7361
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"SensorService" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"run" : 300,
|
||||
"resume" : "m_camera",
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"run" : 300,
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"run" : 300,
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"run" : 300,
|
||||
"resume" : "m_camera",
|
||||
"timer" : { "ref" : "timerB", "period" : 3000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"DisplaySync" : {
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"run" : 180
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"resume" : "EventThread1"
|
||||
},
|
||||
|
||||
"p3" : {
|
||||
"resume" : "EventThread2"
|
||||
},
|
||||
|
||||
"p4" : {
|
||||
"sleep" : 30,
|
||||
"run" : 120,
|
||||
"timer" : { "ref" : "timerB", "period" : 16667 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"EventThread1" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
|
||||
"p1" : {
|
||||
"suspend" : "EventThread1",
|
||||
"run" : 200,
|
||||
"resume" : "m_camera",
|
||||
"run1" : 280,
|
||||
"resume": "surfaceflinger",
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 660,
|
||||
"run" : 300,
|
||||
"sleep1" : 60,
|
||||
"run1" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"EventThread2" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread2",
|
||||
"run" : 150
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"m_camera" : {
|
||||
"loop" : -1,
|
||||
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "m_camera",
|
||||
"run" : 660
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"lock" : "render_thread_mutex",
|
||||
"signal" : "render_thread_queue",
|
||||
"unlock" : "render_thread_mutex"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"RenderThread" : {
|
||||
"loop" : -1,
|
||||
|
||||
"lock" : "render_thread_mutex",
|
||||
"wait" : { "ref" : "render_thread_queue", "mutex": "render_thread_mutex" },
|
||||
"unlock" : "render_thread_mutex",
|
||||
|
||||
"run" : 300,
|
||||
"resume" : "mali-render",
|
||||
"sleep" : 240,
|
||||
"run1" : 1000,
|
||||
"sleep1" : 210,
|
||||
"run2" : 1040,
|
||||
"sleep2" : 580,
|
||||
"run3" : 350
|
||||
|
||||
},
|
||||
|
||||
"MaliRender" : {
|
||||
"loop" : -1,
|
||||
|
||||
"suspend" : "mali-render",
|
||||
"run" : 250,
|
||||
"resume" : "mali-render-hnd",
|
||||
"sleep" : 20,
|
||||
"run1" : 160,
|
||||
"sleep1" : 1373,
|
||||
"run2" : 250,
|
||||
"resume2" : "mali-render-hnd",
|
||||
"sleep2" : 20,
|
||||
"run3" : 250,
|
||||
"sleep3" : 568,
|
||||
"run4" : 500,
|
||||
"sleep4" : 30,
|
||||
"run5" : 300,
|
||||
"resume5" : "mali-render-hnd",
|
||||
"sleep5" : 200,
|
||||
"run6" : 120,
|
||||
|
||||
"resume": "surfaceflinger",
|
||||
},
|
||||
|
||||
"MaliRenderHnd" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "mali-render-hnd",
|
||||
"run" : 150
|
||||
},
|
||||
|
||||
"AudioTick" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 1,
|
||||
"run" : 150,
|
||||
"resume" : "AudioIn",
|
||||
"timer" : { "ref" : "tick", "period": 20000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"AudioIn" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioIn",
|
||||
"run" : 2730,
|
||||
"resume" : "AudioRecord"
|
||||
},
|
||||
|
||||
"AudioRecord" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioRecord",
|
||||
"resume" : "pull_looper",
|
||||
"sleep" : 2600,
|
||||
"resume1" : "pull_looper"
|
||||
},
|
||||
|
||||
"pull_looper" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "pull_looper",
|
||||
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock" : "mutex"
|
||||
},
|
||||
|
||||
"recoder_looper" : {
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 180,
|
||||
|
||||
"lock1" : "mutex",
|
||||
"signal1" : "queue",
|
||||
"wait1" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock1" : "mutex",
|
||||
"run1" : 130,
|
||||
|
||||
"resume" : "gle.acc.encoder",
|
||||
|
||||
"lock2" : "mutex",
|
||||
"signal2" : "queue",
|
||||
"wait2" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock2" : "mutex",
|
||||
"run2" : 130
|
||||
},
|
||||
|
||||
"codec_looper" : {
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 130,
|
||||
|
||||
"lock1" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock1" : "mutex",
|
||||
"run1" : 180,
|
||||
|
||||
"suspend" : "codec_looper",
|
||||
"run2" : 160,
|
||||
"lock2" : "mutex",
|
||||
"signal2" : "queue",
|
||||
"unlock2" : "mutex"
|
||||
},
|
||||
|
||||
"gle.acc.encoder" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "gle.acc.encoder",
|
||||
"run" : 20,
|
||||
"resume" : "OMXCall",
|
||||
|
||||
"suspend1" : "gle.acc.encoder",
|
||||
"run1" : 800,
|
||||
"resume1" : "OMXCall"
|
||||
},
|
||||
|
||||
"OMXCall" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "OMXCall",
|
||||
"run" : 130,
|
||||
"resume" : "codec_looper"
|
||||
},
|
||||
|
||||
"CameraData" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "CameraData",
|
||||
"run" : 2000,
|
||||
"lock" : "camera_data_mutex",
|
||||
"signal" : "camera_data_queue",
|
||||
"unlock" : "camera_data_mutex",
|
||||
|
||||
"resume" : "Binder1",
|
||||
"resume1" : "Binder2",
|
||||
"run1" : 2080,
|
||||
|
||||
"lock1" : "camera_data_mutex",
|
||||
"signal1" : "camera_data_queue",
|
||||
"unlock1" : "camera_data_mutex",
|
||||
|
||||
"resume2" : "Binder3"
|
||||
},
|
||||
|
||||
"CameraDataProc" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_data_mutex",
|
||||
"wait" : { "ref" : "camera_data_queue", "mutex": "camera_data_mutex" },
|
||||
"unlock" : "camera_data_mutex",
|
||||
"run" : 150,
|
||||
|
||||
"lock1" : "camera_stream1_mutex",
|
||||
"signal" : "camera_stream1_queue",
|
||||
"unlock1" : "camera_stream1_mutex",
|
||||
|
||||
"lock2" : "camera_data_mutex",
|
||||
"wait2" : { "ref" : "camera_data_queue", "mutex": "camera_data_mutex" },
|
||||
"unlock2" : "camera_data_mutex",
|
||||
"run2" : 1000,
|
||||
|
||||
"resume" : "Binder1"
|
||||
},
|
||||
|
||||
"CameraStream1" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream1_mutex",
|
||||
"wait" : { "ref" : "camera_stream1_queue", "mutex": "camera_stream1_mutex" },
|
||||
"unlock" : "camera_stream1_mutex",
|
||||
"run" : 240,
|
||||
|
||||
"resume" : "Binder1",
|
||||
|
||||
"lock1" : "camera_stream2_mutex",
|
||||
"signal" : "camera_stream2_queue",
|
||||
"unlock1" : "camera_stream2_mutex",
|
||||
|
||||
"sleep" : 2500,
|
||||
"run1" : 240,
|
||||
|
||||
"lock2" : "camera_stream3_mutex",
|
||||
"signal2" : "camera_stream3_queue",
|
||||
"unlock2" : "camera_stream3_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
|
||||
"lock3" : "camera_req_mutex",
|
||||
"signal3" : "camera_req_queue",
|
||||
"unlock3" : "camera_req_mutex"
|
||||
},
|
||||
|
||||
"CameraStream2" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream2_mutex",
|
||||
"wait" : { "ref" : "camera_stream2_queue", "mutex": "camera_stream2_mutex" },
|
||||
"unlock" : "camera_stream2_mutex",
|
||||
"run" : 180,
|
||||
"sleep" : 2500,
|
||||
"run1" : 240,
|
||||
"sleep1" : 850,
|
||||
"run2" : 90,
|
||||
|
||||
"resume" : "Binder1",
|
||||
|
||||
"lock2" : "camera_req_mutex",
|
||||
"signal" : "camera_req_queue",
|
||||
"unlock2" : "camera_req_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"CameraStream3" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_stream3_mutex",
|
||||
"wait" : { "ref" : "camera_stream3_queue", "mutex": "camera_stream3_mutex" },
|
||||
"unlock" : "camera_stream3_mutex",
|
||||
"run" : 90,
|
||||
|
||||
"lock1" : "eb_mutex",
|
||||
"signal" : "eb_queue",
|
||||
"unlock1" : "eb_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
},
|
||||
|
||||
"CameraReqQueue" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_req_mutex",
|
||||
"wait" : { "ref" : "camera_req_queue", "mutex": "camera_req_mutex" },
|
||||
"unlock" : "camera_req_mutex",
|
||||
"run" : 200,
|
||||
|
||||
"lock1" : "camera_req_mutex",
|
||||
"wait1" : { "ref" : "camera_req_queue", "mutex": "camera_req_mutex" },
|
||||
"unlock1" : "camera_req_mutex",
|
||||
"run1" : 200,
|
||||
|
||||
"resume" : "Binder3",
|
||||
|
||||
"sleep" : 120,
|
||||
"run2" : 200,
|
||||
|
||||
"resume2" : "Binder2",
|
||||
|
||||
"sleep2" : 1900,
|
||||
"run3" : 270,
|
||||
"lock3" : "camera_s0_mutex",
|
||||
"signal" : "camera_s0_queue",
|
||||
"unlock3" : "camera_s0_mutex",
|
||||
|
||||
"resume3" : "Binder1",
|
||||
|
||||
"sleep3" : 560,
|
||||
"run4" : 700,
|
||||
"lock4" : "camera_s1_mutex",
|
||||
"signal4" : "camera_s1_queue",
|
||||
"unlock4" : "camera_s1_mutex",
|
||||
|
||||
"resume" : "LogdWriter",
|
||||
|
||||
"sleep4" : 533,
|
||||
"run5" : 300,
|
||||
"lock5" : "camera_s2_mutex",
|
||||
"signal5" : "camera_s2_queue",
|
||||
"unlock5" : "camera_s2_mutex"
|
||||
},
|
||||
|
||||
"CameraS0" : {
|
||||
"loop" : -1,
|
||||
"lock" : "camera_s0_mutex",
|
||||
"wait" : { "ref" : "camera_s0_queue", "mutex": "camera_s0_mutex" },
|
||||
"unlock" : "camera_s0_mutex",
|
||||
"run" : 300,
|
||||
|
||||
"lock1" : "camera_s1_mutex",
|
||||
"wait1" : { "ref" : "camera_s1_queue", "mutex": "camera_s1_mutex" },
|
||||
"unlock1" : "camera_s1_mutex",
|
||||
"run1" : 300,
|
||||
|
||||
"lock2" : "camera_s2_mutex",
|
||||
"wait2" : { "ref" : "camera_s2_queue", "mutex": "camera_s2_mutex" },
|
||||
"unlock2" : "camera_s2_mutex",
|
||||
"run2" : 400,
|
||||
|
||||
"sleep" : 900,
|
||||
"run3" : 380,
|
||||
"sleep3" : 250,
|
||||
"run4" : 278
|
||||
},
|
||||
|
||||
"EmptyBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "eb_mutex",
|
||||
"wait" : { "ref" : "eb_queue", "mutex": "eb_mutex" },
|
||||
"unlock" : "eb_mutex",
|
||||
"run" : 240,
|
||||
|
||||
"lock1" : "encb_mutex",
|
||||
"signal" : "encb_queue",
|
||||
"unlock1" : "encb_mutex"
|
||||
},
|
||||
|
||||
"EncodeBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "encb_mutex",
|
||||
"wait" : { "ref" : "encb_queue", "mutex": "encb_mutex" },
|
||||
"unlock" : "encb_mutex",
|
||||
"run" : 370,
|
||||
|
||||
"lock1" : "fb_mutex",
|
||||
"signal" : "fb_queue",
|
||||
"wait1" : { "ref" : "fb_queue", "mutex": "fb_mutex" },
|
||||
"unlock1" : "fb_mutex",
|
||||
"run1" : 350
|
||||
},
|
||||
|
||||
"FillBuffer" : {
|
||||
"loop" : -1,
|
||||
"lock" : "fb_mutex",
|
||||
"wait" : { "ref" : "fb_queue", "mutex": "fb_mutex" },
|
||||
"unlock" : "fb_mutex",
|
||||
"run" : 200,
|
||||
|
||||
"sleep" : 14800,
|
||||
"run1" : 2400,
|
||||
|
||||
"lock1" : "fb_mutex",
|
||||
"signal" : "fb_queue",
|
||||
"unlock1" : "fb_mutex"
|
||||
},
|
||||
|
||||
"Binder1" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder1",
|
||||
"run" : 350
|
||||
},
|
||||
|
||||
"Binder2" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder2",
|
||||
"run" : 365
|
||||
},
|
||||
|
||||
"Binder3" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "Binder3",
|
||||
"run" : 369,
|
||||
},
|
||||
|
||||
"LogdWriter" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "LogdWriter",
|
||||
"run" : 300,
|
||||
"resume" : "LogdReader",
|
||||
},
|
||||
|
||||
"LogdReader" : {
|
||||
"loop" : -1,
|
||||
"suspend" : "LogdReader",
|
||||
"run" : 30,
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 6,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "camera",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
||||
|
68
wa/workloads/rt_app/use_cases/mp3-long.json
Normal file
68
wa/workloads/rt_app/use_cases/mp3-long.json
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"AudioTick" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"cpus" : [0],
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 1,
|
||||
"resume" : "AudioOut",
|
||||
"timer" : { "ref" : "tick", "period": 6000 }
|
||||
},
|
||||
"p2" : {
|
||||
"loop" : 4,
|
||||
"timer" : { "ref" : "tick", "period": 6000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"AudioOut" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"run" : 275,
|
||||
"resume" : "AudioTrack",
|
||||
"run" : 4725,
|
||||
"suspend" : "AudioOut"
|
||||
},
|
||||
"AudioTrack" : {
|
||||
"priority" : -16,
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioTrack",
|
||||
"run" : 300,
|
||||
"resume" : "mp3.decoder"
|
||||
},
|
||||
"mp3.decoder" : {
|
||||
"priority" : -2,
|
||||
"loop" : -1,
|
||||
"suspend" : "mp3.decoder",
|
||||
"run" : 1000,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 150
|
||||
},
|
||||
"OMXCall" : {
|
||||
"priority" : -2,
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 300,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock" : "mutex"
|
||||
}
|
||||
},
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 600,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "mp3",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
68
wa/workloads/rt_app/use_cases/mp3-short.json
Normal file
68
wa/workloads/rt_app/use_cases/mp3-short.json
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"AudioTick" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"cpus" : [0],
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 1,
|
||||
"resume" : "AudioOut",
|
||||
"timer" : { "ref" : "tick", "period": 6000 }
|
||||
},
|
||||
"p2" : {
|
||||
"loop" : 4,
|
||||
"timer" : { "ref" : "tick", "period": 6000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"AudioOut" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"run" : 275,
|
||||
"resume" : "AudioTrack",
|
||||
"run" : 4725,
|
||||
"suspend" : "AudioOut"
|
||||
},
|
||||
"AudioTrack" : {
|
||||
"priority" : -16,
|
||||
"loop" : -1,
|
||||
"suspend" : "AudioTrack",
|
||||
"run" : 300,
|
||||
"resume" : "mp3.decoder"
|
||||
},
|
||||
"mp3.decoder" : {
|
||||
"priority" : -2,
|
||||
"loop" : -1,
|
||||
"suspend" : "mp3.decoder",
|
||||
"run" : 1000,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 150
|
||||
},
|
||||
"OMXCall" : {
|
||||
"priority" : -2,
|
||||
"loop" : -1,
|
||||
"lock" : "mutex",
|
||||
"wait" : { "ref" : "queue", "mutex": "mutex" },
|
||||
"unlock" : "mutex",
|
||||
"run" : 300,
|
||||
"lock" : "mutex",
|
||||
"signal" : "queue",
|
||||
"unlock" : "mutex"
|
||||
}
|
||||
},
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 6,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "mp3",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
52
wa/workloads/rt_app/use_cases/spreading-tasks.json
Normal file
52
wa/workloads/rt_app/use_cases/spreading-tasks.json
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"thread1" : {
|
||||
"instance" : 1,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"light" : {
|
||||
"loop" : 300,
|
||||
"run" : 1000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
},
|
||||
"heavy" : {
|
||||
"loop" : 300,
|
||||
"run" : 7000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
}
|
||||
}
|
||||
},
|
||||
"thread2" : {
|
||||
"instance" : 1,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"light1" : {
|
||||
"loop" : 900,
|
||||
"run" : 1000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
},
|
||||
"heavy1" : {
|
||||
"loop" : 600,
|
||||
"run" : 7000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
},
|
||||
"light2" : {
|
||||
"loop" : 300,
|
||||
"run" : 1000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
},
|
||||
"heavy1" : {
|
||||
"loop" : 600,
|
||||
"run" : 7000,
|
||||
"timer" : { "ref" : "unique", "period" : 10000 }
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
"global" : {
|
||||
"duration" : 60,
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
||||
|
186
wa/workloads/rt_app/use_cases/taskset.json
Normal file
186
wa/workloads/rt_app/use_cases/taskset.json
Normal file
@ -0,0 +1,186 @@
|
||||
{
|
||||
"tasks": {
|
||||
"ThreadA": {
|
||||
"exec": 5000,
|
||||
"period": 24000,
|
||||
"priority": -19,
|
||||
"cpus": [
|
||||
0
|
||||
],
|
||||
"lock_order": [
|
||||
"r0",
|
||||
"trig1"
|
||||
],
|
||||
"resources": {
|
||||
"r0": {
|
||||
"duration": 1000
|
||||
},
|
||||
"trig1": {
|
||||
"duration": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"ThreadB": {
|
||||
"priority": -16,
|
||||
"phases": {
|
||||
"phase1": {
|
||||
"exec": 300,
|
||||
"period": 24000,
|
||||
"sleep": false,
|
||||
"loop": 1,
|
||||
"lock_order": [
|
||||
"wait1",
|
||||
"r0",
|
||||
"trig2"
|
||||
],
|
||||
"resources": {
|
||||
"wait1": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig1_mutex"
|
||||
]
|
||||
},
|
||||
"r0": {
|
||||
"duration": 300
|
||||
},
|
||||
"trig2": {
|
||||
"duration": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"phase2": {
|
||||
"exec": 4000,
|
||||
"period": 24000,
|
||||
"loop": 2,
|
||||
"sleep": false,
|
||||
"lock_order": [
|
||||
"wait1",
|
||||
"r0",
|
||||
"trig2"
|
||||
],
|
||||
"resources": {
|
||||
"wait1": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig1_mutex"
|
||||
]
|
||||
},
|
||||
"r0": {
|
||||
"duration": 300
|
||||
},
|
||||
"trig2": {
|
||||
"duration": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ThreadC": {
|
||||
"exec": 1150,
|
||||
"period": 24000,
|
||||
"priority": -2,
|
||||
"sleep": false,
|
||||
"lock_order": [
|
||||
"wait2",
|
||||
"r0",
|
||||
"sync3"
|
||||
],
|
||||
"resources": {
|
||||
"wait2": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig2_mutex"
|
||||
]
|
||||
},
|
||||
"r0": {
|
||||
"duration": 1000
|
||||
},
|
||||
"sync3": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig3_mutex"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"ThreadD": {
|
||||
"exec": 300,
|
||||
"period": 24000,
|
||||
"deadline": 24000,
|
||||
"priority": -2,
|
||||
"sleep": false,
|
||||
"lock_order": [
|
||||
"wait3",
|
||||
"r0",
|
||||
"trig3"
|
||||
],
|
||||
"resources": {
|
||||
"wait3": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig3_mutex"
|
||||
]
|
||||
},
|
||||
"r0": {
|
||||
"duration": 300
|
||||
},
|
||||
"trig3": {
|
||||
"duration": 0,
|
||||
"access": [
|
||||
"trig3_mutex"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"trig1_mutex": {
|
||||
"type": "mutex"
|
||||
},
|
||||
"wait1": {
|
||||
"type": "wait"
|
||||
},
|
||||
"trig1": {
|
||||
"type": "signal",
|
||||
"target": "wait1"
|
||||
},
|
||||
"trig2_mutex": {
|
||||
"type": "mutex"
|
||||
},
|
||||
"wait2": {
|
||||
"type": "wait"
|
||||
},
|
||||
"trig2": {
|
||||
"type": "signal",
|
||||
"target": "wait2"
|
||||
},
|
||||
"trig3_mutex": {
|
||||
"type": "mutex"
|
||||
},
|
||||
"wait3": {
|
||||
"type": "wait"
|
||||
},
|
||||
"trig3": {
|
||||
"type": "signal",
|
||||
"target": "wait3"
|
||||
},
|
||||
"sync3": {
|
||||
"type": "sync",
|
||||
"target": "wait3"
|
||||
},
|
||||
"r0": {
|
||||
"type": "run"
|
||||
}
|
||||
},
|
||||
"global": {
|
||||
"default_policy": "SCHED_OTHER",
|
||||
"duration": 5,
|
||||
"ftrace": true,
|
||||
"gnuplot": false,
|
||||
"logdir": "/root/wa",
|
||||
"log_basename": "rt-app",
|
||||
"lock_pages": true,
|
||||
"frag": 1,
|
||||
"calibration": "CPU1"
|
||||
}
|
||||
}
|
252
wa/workloads/rt_app/use_cases/video-long.json
Normal file
252
wa/workloads/rt_app/use_cases/video-long.json
Normal file
@ -0,0 +1,252 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"surfaceflinger" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 1500
|
||||
},
|
||||
|
||||
"DispSync" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend",
|
||||
"run" : 35,
|
||||
"resume" : "EventThread",
|
||||
"run" : 40,
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"loop" : 2,
|
||||
"suspend",
|
||||
"run" : 30
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
"hwc_eventmon" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "DispSync",
|
||||
"run" : 115,
|
||||
"timer" : { "ref" : "timerA", "period" : 16667 }
|
||||
},
|
||||
|
||||
"EventThread1" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 25,
|
||||
"resume" : "DispSync",
|
||||
"sleep" : 9650,
|
||||
"run" : 70,
|
||||
"resume" : "DispSync",
|
||||
"run" : 80
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 90,
|
||||
"resume" : "DispSync"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"EventThread2" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 30,
|
||||
"resume" : "surfaceflinger"
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 35,
|
||||
"sleep" : 2000,
|
||||
"run" : 110,
|
||||
"resume" : "DispSync",
|
||||
"run" : 60
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"waker" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "NuPlayerRenderer",
|
||||
"timer" : { "ref" : "timerB", "period" : 33333 }
|
||||
},
|
||||
|
||||
"NuPlayerRenderer" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 3,
|
||||
"suspend" : "NuPlayerRenderer",
|
||||
"run" : 140,
|
||||
"resume" : "NuPlayerDriver1",
|
||||
"run" : 95
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 27000,
|
||||
"run" : 580,
|
||||
"resume" : "NPDecoder",
|
||||
"resume" : "NPDecoder-CL",
|
||||
"resume" : "gle.aac.decoder"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"NuPlayerDriver1" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 100,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 50,
|
||||
"suspend" : "NuPlayerDriver",
|
||||
"run" : 80,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 370,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 135,
|
||||
"resume" : "NuPlayerDriver"
|
||||
},
|
||||
|
||||
"NuPlayerDriver2" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend" : "NuPlayerDriver",
|
||||
"run" : 110,
|
||||
"resume" : "NuPlayerDriver",
|
||||
"resume" : "CodecLooper1",
|
||||
"sleep" : 2500,
|
||||
"run" : 80,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 50,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 70,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 35
|
||||
},
|
||||
|
||||
"CodecLooper1" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 230,
|
||||
"sleep" : 80,
|
||||
"run" : 150,
|
||||
"sleep" : 210,
|
||||
"run" : 330,
|
||||
"resume" : "CodecLooper2",
|
||||
"sleep" : 900,
|
||||
"run" : 170,
|
||||
"sleep" : 670,
|
||||
"run" : 125,
|
||||
"resume" : "CodecLooper2"
|
||||
},
|
||||
|
||||
"CodecLooper2" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 160,
|
||||
"resume" : "CodecLooper3",
|
||||
"sleep" : 590,
|
||||
"resume" : "OMXCallbackDisp2",
|
||||
"run" : 75,
|
||||
"suspend",
|
||||
"run" : 260
|
||||
},
|
||||
|
||||
"OMXCallbackDisp2" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 180
|
||||
},
|
||||
|
||||
"CodecLooper3" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 1000
|
||||
},
|
||||
|
||||
"NPDecoder" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 500,
|
||||
"sleep" : 680,
|
||||
"resume" : "OMXCallbackDisp1",
|
||||
"run" : 2000
|
||||
},
|
||||
|
||||
"NPDecoder-CL" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 570,
|
||||
"sleep" : 570,
|
||||
"run" : 2100
|
||||
},
|
||||
|
||||
"gle.aac.decoder" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 2400,
|
||||
"sleep" : 430,
|
||||
"run" : 45
|
||||
},
|
||||
|
||||
"OMXCallbackDisp1" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 135,
|
||||
"sleep" : 230,
|
||||
"run" : 140,
|
||||
"sleep" : 330,
|
||||
"run" : 190,
|
||||
"sleep" : 550,
|
||||
"run" : 160
|
||||
}
|
||||
},
|
||||
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 600,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "video",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
||||
|
252
wa/workloads/rt_app/use_cases/video-short.json
Normal file
252
wa/workloads/rt_app/use_cases/video-short.json
Normal file
@ -0,0 +1,252 @@
|
||||
{
|
||||
"tasks" : {
|
||||
"surfaceflinger" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 1500
|
||||
},
|
||||
|
||||
"DispSync" : {
|
||||
"priority" : -7,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend",
|
||||
"run" : 35,
|
||||
"resume" : "EventThread",
|
||||
"run" : 40,
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"loop" : 2,
|
||||
"suspend",
|
||||
"run" : 30
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
"hwc_eventmon" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "DispSync",
|
||||
"run" : 115,
|
||||
"timer" : { "ref" : "timerA", "period" : 16667 }
|
||||
},
|
||||
|
||||
"EventThread1" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 25,
|
||||
"resume" : "DispSync",
|
||||
"sleep" : 9650,
|
||||
"run" : 70,
|
||||
"resume" : "DispSync",
|
||||
"run" : 80
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 90,
|
||||
"resume" : "DispSync"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"EventThread2" : {
|
||||
"priority" : -8,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 30,
|
||||
"resume" : "surfaceflinger"
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"suspend" : "EventThread",
|
||||
"run" : 35,
|
||||
"sleep" : 2000,
|
||||
"run" : 110,
|
||||
"resume" : "DispSync",
|
||||
"run" : 60
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"waker" : {
|
||||
"priority" : -19,
|
||||
"loop" : -1,
|
||||
"resume" : "NuPlayerRenderer",
|
||||
"timer" : { "ref" : "timerB", "period" : 33333 }
|
||||
},
|
||||
|
||||
"NuPlayerRenderer" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"phases" : {
|
||||
"p1" : {
|
||||
"loop" : 3,
|
||||
"suspend" : "NuPlayerRenderer",
|
||||
"run" : 140,
|
||||
"resume" : "NuPlayerDriver1",
|
||||
"run" : 95
|
||||
},
|
||||
|
||||
"p2" : {
|
||||
"sleep" : 27000,
|
||||
"run" : 580,
|
||||
"resume" : "NPDecoder",
|
||||
"resume" : "NPDecoder-CL",
|
||||
"resume" : "gle.aac.decoder"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"NuPlayerDriver1" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 100,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 50,
|
||||
"suspend" : "NuPlayerDriver",
|
||||
"run" : 80,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 370,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 135,
|
||||
"resume" : "NuPlayerDriver"
|
||||
},
|
||||
|
||||
"NuPlayerDriver2" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend" : "NuPlayerDriver",
|
||||
"run" : 110,
|
||||
"resume" : "NuPlayerDriver",
|
||||
"resume" : "CodecLooper1",
|
||||
"sleep" : 2500,
|
||||
"run" : 80,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 50,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 70,
|
||||
"lock" : "NuPlayerDriver",
|
||||
"sync" : { "ref" : "NuPlayerDriver", "mutex" : "NuPlayerDriver" },
|
||||
"unlock" : "NuPlayerDriver",
|
||||
"run" : 35
|
||||
},
|
||||
|
||||
"CodecLooper1" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 230,
|
||||
"sleep" : 80,
|
||||
"run" : 150,
|
||||
"sleep" : 210,
|
||||
"run" : 330,
|
||||
"resume" : "CodecLooper2",
|
||||
"sleep" : 900,
|
||||
"run" : 170,
|
||||
"sleep" : 670,
|
||||
"run" : 125,
|
||||
"resume" : "CodecLooper2"
|
||||
},
|
||||
|
||||
"CodecLooper2" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 160,
|
||||
"resume" : "CodecLooper3",
|
||||
"sleep" : 590,
|
||||
"resume" : "OMXCallbackDisp2",
|
||||
"run" : 75,
|
||||
"suspend",
|
||||
"run" : 260
|
||||
},
|
||||
|
||||
"OMXCallbackDisp2" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 180
|
||||
},
|
||||
|
||||
"CodecLooper3" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 1000
|
||||
},
|
||||
|
||||
"NPDecoder" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 500,
|
||||
"sleep" : 680,
|
||||
"resume" : "OMXCallbackDisp1",
|
||||
"run" : 2000
|
||||
},
|
||||
|
||||
"NPDecoder-CL" : {
|
||||
"priority" : -15,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 570,
|
||||
"sleep" : 570,
|
||||
"run" : 2100
|
||||
},
|
||||
|
||||
"gle.aac.decoder" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 2400,
|
||||
"sleep" : 430,
|
||||
"run" : 45
|
||||
},
|
||||
|
||||
"OMXCallbackDisp1" : {
|
||||
"priority" : -1,
|
||||
"loop" : -1,
|
||||
"suspend",
|
||||
"run" : 135,
|
||||
"sleep" : 230,
|
||||
"run" : 140,
|
||||
"sleep" : 330,
|
||||
"run" : 190,
|
||||
"sleep" : 550,
|
||||
"run" : 160
|
||||
}
|
||||
},
|
||||
|
||||
"global" : {
|
||||
"default_policy" : "SCHED_OTHER",
|
||||
"duration" : 6,
|
||||
"ftrace" : false,
|
||||
"gnuplot" : false,
|
||||
"logdir" : "./",
|
||||
"log_basename" : "video",
|
||||
"lock_pages" : true,
|
||||
"frag" : 1,
|
||||
"calibration" : "CPU0"
|
||||
}
|
||||
}
|
||||
|
236
wa/workloads/rt_app/workgen
Executable file
236
wa/workloads/rt_app/workgen
Executable file
@ -0,0 +1,236 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import getopt
|
||||
import subprocess
|
||||
import signal
|
||||
import re
|
||||
|
||||
def check_unikid_json(infile, outfile, verbose=0):
|
||||
if not os.path.exists(infile):
|
||||
print "WARN: %s does not exist", infile
|
||||
|
||||
try:
|
||||
fi = open(infile, "r")
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", infile
|
||||
sys.exit(2)
|
||||
|
||||
lines = fi.readlines()
|
||||
fi.close()
|
||||
|
||||
try:
|
||||
fo = open(outfile, "w+")
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", f
|
||||
sys.exit(2)
|
||||
|
||||
curid = 1
|
||||
refcount = 0
|
||||
idlist = {}
|
||||
myid = []
|
||||
for myline in lines:
|
||||
if "{" in myline:
|
||||
refcount += 1
|
||||
myid.append(curid)
|
||||
curid = 1
|
||||
idlist[refcount] = {}
|
||||
|
||||
if "}" in myline:
|
||||
del idlist[refcount]
|
||||
curid = myid.pop()
|
||||
refcount -= 1
|
||||
|
||||
try:
|
||||
key_id, value = myline.split(":", 1)
|
||||
except ValueError:
|
||||
fo.write(myline)
|
||||
continue
|
||||
|
||||
key_id = key_id.strip('\"\t\n\r ')
|
||||
value = value.strip(',\"\t\n\r ')
|
||||
|
||||
if key_id in idlist[refcount]:
|
||||
newkey_id = key_id + str(curid)
|
||||
while newkey_id in idlist[refcount]:
|
||||
curid += 1
|
||||
newkey_id = key_id + str(curid)
|
||||
|
||||
if verbose:
|
||||
print "level ", refcount, " : key ", key_id, " changed into ", newkey_id
|
||||
|
||||
myline = myline.replace(key_id, newkey_id, 1)
|
||||
key_id = newkey_id
|
||||
|
||||
idlist[refcount][key_id] = value
|
||||
fo.write(myline)
|
||||
|
||||
fo.close()
|
||||
|
||||
return
|
||||
|
||||
def check_suspend_json(infile, outfile, verbose=0):
|
||||
if not os.path.exists(infile):
|
||||
print "WARN: %s does not exist", infile
|
||||
|
||||
try:
|
||||
fi = open(infile, "r")
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", infile
|
||||
sys.exit(2)
|
||||
|
||||
lines = fi.readlines()
|
||||
fi.close()
|
||||
|
||||
try:
|
||||
fo = open(outfile, "w+")
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", f
|
||||
sys.exit(2)
|
||||
|
||||
|
||||
taskobj = 0
|
||||
curid = ""
|
||||
for myline in lines:
|
||||
|
||||
exception = 0
|
||||
key_id = "exception"
|
||||
|
||||
try:
|
||||
key_id, value = myline.split(":", 1)
|
||||
except ValueError:
|
||||
if "suspend" in myline:
|
||||
key_id = "suspend"
|
||||
exception = 1
|
||||
|
||||
key_id = key_id.strip('\"\t\n\r ')
|
||||
|
||||
if not "tasks" in key_id and \
|
||||
taskobj == 0:
|
||||
fo.write(myline)
|
||||
continue
|
||||
|
||||
if "{" in myline:
|
||||
taskobj += 1
|
||||
if taskobj == 2:
|
||||
curid = key_id
|
||||
|
||||
if "}" in myline:
|
||||
taskobj -= 1
|
||||
|
||||
if "suspend" in key_id and \
|
||||
exception == 1:
|
||||
|
||||
if verbose:
|
||||
print "value ", curid, " added to suspend key"
|
||||
|
||||
if "," in myline:
|
||||
myline = myline.replace(",", " : " + "\"" + curid + "\",", 1)
|
||||
else:
|
||||
myline = myline.replace("\n", " : " + "\"" + curid + "\"\n", 1)
|
||||
|
||||
fo.write(myline)
|
||||
|
||||
fo.close()
|
||||
|
||||
return
|
||||
|
||||
# remove trailing commas that may appear after closing
|
||||
# brackets and last entries in every section
|
||||
def remove_trailing_commas(outfile):
|
||||
try:
|
||||
f = open(outfile, 'r+')
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", f
|
||||
sys.exit(2)
|
||||
|
||||
lines = f.read()
|
||||
check_last_entry_regex = r'(.),(\n\s*})'
|
||||
check_end_bracket_regex = r'(}),(\n\s*})'
|
||||
|
||||
lines = re.sub(check_last_entry_regex, r'\g<1>\g<2>', lines)
|
||||
lines = re.sub(check_end_bracket_regex, r'\g<1>\g<2>', lines)
|
||||
|
||||
f.seek(0)
|
||||
f.write(lines)
|
||||
f.truncate()
|
||||
f.close()
|
||||
|
||||
return
|
||||
|
||||
|
||||
# Search for comments to remove
|
||||
def comment_remover(text):
|
||||
def replacer(match):
|
||||
s = match.group(0)
|
||||
if s.startswith('/'):
|
||||
return " " # note: a space and not an empty string
|
||||
else:
|
||||
return s
|
||||
|
||||
pattern = re.compile(
|
||||
r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
|
||||
re.DOTALL | re.MULTILINE)
|
||||
|
||||
return re.sub(pattern, replacer, text)
|
||||
|
||||
# Remove all comments inside the file
|
||||
def remove_all_comments(outfile):
|
||||
try:
|
||||
f = open(outfile, 'r+')
|
||||
except IOError:
|
||||
print "WARN: Unable to open %s", f
|
||||
sys.exit(2)
|
||||
|
||||
lines = f.read()
|
||||
|
||||
lines = comment_remover(lines)
|
||||
f.seek(0)
|
||||
f.write(lines)
|
||||
f.truncate()
|
||||
|
||||
f.close()
|
||||
|
||||
return
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
def handleSigTERM(signum, frame):
|
||||
sys.exit()
|
||||
|
||||
signal.signal(signal.SIGTERM, handleSigTERM)
|
||||
signal.signal(signal.SIGINT, handleSigTERM)
|
||||
|
||||
outfile = "unikid.json"
|
||||
selfupdate = 0
|
||||
verbose = 0
|
||||
dry_run = False
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], "o:avd")
|
||||
except getopt.GetoptError as err:
|
||||
print str(err) # will print something like "option -a not recognized"
|
||||
sys.exit(2)
|
||||
|
||||
for o, a in opts:
|
||||
if o == "-o":
|
||||
outfile = a
|
||||
if o == "-a":
|
||||
selfupdate = 1
|
||||
if o == "-v":
|
||||
verbose = 1
|
||||
if o == "-d":
|
||||
dry_run = True
|
||||
|
||||
for f in args:
|
||||
if selfupdate:
|
||||
outfile = f
|
||||
|
||||
check_suspend_json(f, outfile)
|
||||
check_unikid_json(outfile, outfile)
|
||||
remove_trailing_commas(outfile)
|
||||
remove_all_comments(outfile)
|
||||
|
||||
if not dry_run:
|
||||
subprocess.call(["rt-app", outfile])
|
Loading…
x
Reference in New Issue
Block a user