wlauto.instrumentation.trace_cmd package

Module contents

class wlauto.instrumentation.trace_cmd.TraceCmdInstrument(device, **kwargs)[source]

Bases: wlauto.core.instrumentation.Instrument

aliases = AC([])
artifacts = AC([])
core_modules = []
description = "\n trace-cmd is an instrument which interacts with ftrace Linux kernel internal\n tracer\n\n From trace-cmd man page:\n\n trace-cmd command interacts with the ftrace tracer that is built inside the\n Linux kernel. It interfaces with the ftrace specific files found in the\n debugfs file system under the tracing directory.\n\n trace-cmd reads a list of events it will trace, which can be specified in\n the config file as follows ::\n\n trace_events = ['irq*', 'power*']\n\n If no event is specified, a default set of events that are generally considered useful\n for debugging/profiling purposes will be enabled.\n\n The list of available events can be obtained by rooting and running the following\n command line on the device ::\n\n trace-cmd list\n\n You may also specify ``trace_buffer_size`` setting which must be an integer that will\n be used to set the ftrace buffer size. It will be interpreted as KB::\n\n trace_cmd_buffer_size = 8000\n\n The maximum buffer size varies from device to device, but there is a maximum and trying\n to set buffer size beyond that will fail. If you plan on collecting a lot of trace over\n long periods of time, the buffer size will not be enough and you will only get trace for\n the last portion of your run. To deal with this you can set the ``trace_mode`` setting to\n ``'record'`` (the default is ``'start'``)::\n\n trace_cmd_mode = 'record'\n\n This will cause trace-cmd to trace into file(s) on disk, rather than the buffer, and so the\n limit for the max size of the trace is set by the storage available on device. Bear in mind\n that ``'record'`` mode *is* more intrusive than the default, so if you do not plan on\n generating a lot of trace, it is best to use the default ``'start'`` mode.\n\n .. note:: Mode names correspond to the underlying trace-cmd executable's command used to\n implement them. You can find out more about what is happening in each case from\n trace-cmd documentation: https://lwn.net/Articles/341902/.\n\n This instrument comes with an trace-cmd binary that will be copied and used\n on the device, however post-processing will be, by default, done on-host and you must\n have trace-cmd installed and in your path. On Ubuntu systems, this may be\n done with::\n\n sudo apt-get install trace-cmd\n\n Alternatively, you may set ``report_on_target`` parameter to ``True`` to enable on-target\n processing (this is useful when running on non-Linux hosts, but is likely to take longer\n and may fail on particularly resource-constrained targets).\n\n "
finalize(*args, **kwargs)
initialize(*args, **kwargs)
insert_end_mark(context)[source]
insert_start_mark(context)[source]
kind = 'instrument'
name = 'trace-cmd'
on_run_end(context)[source]
on_run_init(context)[source]
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'events', 'constraint': None, 'default': ['sched*', 'irq*', 'power*'], 'allowed_values': None, 'global_alias': 'trace_events', 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'mode', 'constraint': None, 'default': 'start', 'allowed_values': ['start', 'record'], 'global_alias': 'trace_mode', 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'buffer_size', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': 'trace_buffer_size', 'override': False})", "Param({'kind': <function integer>, 'mandatory': None, 'name': 'buffer_size_step', 'constraint': None, 'default': 1000, 'allowed_values': None, 'global_alias': 'trace_buffer_size_step', 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'buffer_size_file', 'constraint': None, 'default': '/sys/kernel/debug/tracing/buffer_size_kb', 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'report', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'no_install', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'report_on_target', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})"])
setup(context)[source]
stop(context)[source]
teardown(context)[source]
update_result(context)[source]
validate(*args, **kwargs)
very_slow_start(context)[source]