€•脌sphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ4/translations/zh_CN/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/zh_TW/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/it_IT/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ja_JP/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ko_KR/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/sp_SP/trace/coresight/coresight-config”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒN/var/lib/git/docbuild/linux/Documentation/trace/coresight/coresight-config.rst”h KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ&CoreSight System Configuration Manager”h]”hŒ&CoreSight System Configuration Manager”…””}”(hh»hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hh¶hžhhŸh³h KubhŒ block_quote”“”)”}”(hŒF:Author: Mike Leach :Date: October 2020 ”h]”hŒ field_list”“”)”}”(hhh]”(hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÙhhÖhŸh³h KubhŒ field_body”“”)”}”(hŒ"Mike Leach ”h]”hŒ paragraph”“”)”}”(hhíh]”(hŒ Mike Leach <”…””}”(hhñhžhhŸNh NubhŒ reference”“”)”}”(hŒmike.leach@linaro.org”h]”hŒmike.leach@linaro.org”…””}”(hhúhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:mike.leach@linaro.org”uh1høhhñubhŒ>”…””}”(hhñhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Khhëubah}”(h]”h ]”h"]”h$]”h&]”uh1héhhÖubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÔhŸh³h KhhÑubhÕ)”}”(hhh]”(hÚ)”}”(hŒDate”h]”hŒDate”…””}”(hj#hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÙhj hŸh³h Kubhê)”}”(hŒ October 2020 ”h]”hð)”}”(hŒ October 2020”h]”hŒ October 2020”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Khj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1héhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÔhŸh³h KhhÑubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÏhhËubah}”(h]”h ]”h"]”h$]”h&]”uh1hÉhŸh³h Khh¶hžhubhµ)”}”(hhh]”(hº)”}”(hŒ Introduction”h]”hŒ Introduction”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj[hžhhŸh³h K ubhð)”}”(hŒ¼The CoreSight System Configuration manager is an API that allows the programming of the CoreSight system with pre-defined configurations that can then be easily enabled from sysfs or perf.”h]”hŒ¼The CoreSight System Configuration manager is an API that allows the programming of the CoreSight system with pre-defined configurations that can then be easily enabled from sysfs or perf.”…””}”(hjlhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K hj[hžhubhð)”}”(hXMany CoreSight components can be programmed in complex ways - especially ETMs. In addition, components can interact across the CoreSight system, often via the cross trigger components such as CTI and CTM. These system settings can be defined and enabled as named configurations.”h]”hXMany CoreSight components can be programmed in complex ways - especially ETMs. In addition, components can interact across the CoreSight system, often via the cross trigger components such as CTI and CTM. These system settings can be defined and enabled as named configurations.”…””}”(hjzhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Khj[hžhubeh}”(h]”Œ introduction”ah ]”h"]”Œ introduction”ah$]”h&]”uh1h´hh¶hžhhŸh³h K ubhµ)”}”(hhh]”(hº)”}”(hŒBasic Concepts”h]”hŒBasic Concepts”…””}”(hj“hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhžhhŸh³h Kubhð)”}”(hŒOThis section introduces the basic concepts of a CoreSight system configuration.”h]”hŒOThis section introduces the basic concepts of a CoreSight system configuration.”…””}”(hj¡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Khjhžhubhµ)”}”(hhh]”(hº)”}”(hŒFeatures”h]”hŒFeatures”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj¯hžhhŸh³h Kubhð)”}”(hŒÂA feature is a named set of programming for a CoreSight device. The programming is device dependent, and can be defined in terms of absolute register values, resource usage and parameter values.”h]”hŒÂA feature is a named set of programming for a CoreSight device. The programming is device dependent, and can be defined in terms of absolute register values, resource usage and parameter values.”…””}”(hjÀhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K hj¯hžhubhð)”}”(hŒàThe feature is defined using a descriptor. This descriptor is used to load onto a matching device, either when the feature is loaded into the system, or when the CoreSight device is registered with the configuration manager.”h]”hŒàThe feature is defined using a descriptor. This descriptor is used to load onto a matching device, either when the feature is loaded into the system, or when the CoreSight device is registered with the configuration manager.”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K$hj¯hžhubhð)”}”(hX2The load process involves interpreting the descriptor into a set of register accesses in the driver - the resource usage and parameter descriptions translated into appropriate register accesses. This interpretation makes it easy and efficient for the feature to be programmed onto the device when required.”h]”hX2The load process involves interpreting the descriptor into a set of register accesses in the driver - the resource usage and parameter descriptions translated into appropriate register accesses. This interpretation makes it easy and efficient for the feature to be programmed onto the device when required.”…””}”(hjÜhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K(hj¯hžhubhð)”}”(hŒÊThe feature will not be active on the device until the feature is enabled, and the device itself is enabled. When the device is enabled then enabled features will be programmed into the device hardware.”h]”hŒÊThe feature will not be active on the device until the feature is enabled, and the device itself is enabled. When the device is enabled then enabled features will be programmed into the device hardware.”…””}”(hjêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K-hj¯hžhubhð)”}”(hŒLA feature is enabled as part of a configuration being enabled on the system.”h]”hŒLA feature is enabled as part of a configuration being enabled on the system.”…””}”(hjøhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K1hj¯hžhubhµ)”}”(hhh]”(hº)”}”(hŒParameter Value”h]”hŒParameter Value”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhžhhŸh³h K5ubhð)”}”(hŒ«A parameter value is a named value that may be set by the user prior to the feature being enabled that can adjust the behaviour of the operation programmed by the feature.”h]”hŒ«A parameter value is a named value that may be set by the user prior to the feature being enabled that can adjust the behaviour of the operation programmed by the feature.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K7hjhžhubhð)”}”(hŒÇFor example, this could be a count value in a programmed operation that repeats at a given rate. When the feature is enabled then the current value of the parameter is used in programming the device.”h]”hŒÇFor example, this could be a count value in a programmed operation that repeats at a given rate. When the feature is enabled then the current value of the parameter is used in programming the device.”…””}”(hj%hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K;hjhžhubhð)”}”(hŒvThe feature descriptor defines a default value for a parameter, which is used if the user does not supply a new value.”h]”hŒvThe feature descriptor defines a default value for a parameter, which is used if the user does not supply a new value.”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K?hjhžhubhð)”}”(hŒmUsers can update parameter values using the configfs API for the CoreSight system - which is described below.”h]”hŒmUsers can update parameter values using the configfs API for the CoreSight system - which is described below.”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KBhjhžhubhð)”}”(hŒhThe current value of the parameter is loaded into the device when the feature is enabled on that device.”h]”hŒhThe current value of the parameter is loaded into the device when the feature is enabled on that device.”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KEhjhžhubeh}”(h]”Œparameter-value”ah ]”h"]”Œparameter value”ah$]”h&]”uh1h´hj¯hžhhŸh³h K5ubeh}”(h]”Œfeatures”ah ]”h"]”Œfeatures”ah$]”h&]”uh1h´hjhžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒConfigurations”h]”hŒConfigurations”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjmhžhhŸh³h KJubhð)”}”(hŒ³A configuration defines a set of features that are to be used in a trace session where the configuration is selected. For any trace session only one configuration may be selected.”h]”hŒ³A configuration defines a set of features that are to be used in a trace session where the configuration is selected. For any trace session only one configuration may be selected.”…””}”(hj~hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KLhjmhžhubhð)”}”(hŒ÷The features defined may be on any type of device that is registered to support system configuration. A configuration may select features to be enabled on a class of devices - i.e. any ETMv4, or specific devices, e.g. a specific CTI on the system.”h]”hŒ÷The features defined may be on any type of device that is registered to support system configuration. A configuration may select features to be enabled on a class of devices - i.e. any ETMv4, or specific devices, e.g. a specific CTI on the system.”…””}”(hjŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KPhjmhžhubhð)”}”(hŒêAs with the feature, a descriptor is used to define the configuration. This will define the features that must be enabled as part of the configuration as well as any preset values that can be used to override default parameter values.”h]”hŒêAs with the feature, a descriptor is used to define the configuration. This will define the features that must be enabled as part of the configuration as well as any preset values that can be used to override default parameter values.”…””}”(hjšhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KUhjmhžhubhµ)”}”(hhh]”(hº)”}”(hŒ Preset Values”h]”hŒ Preset Values”…””}”(hj«hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj¨hžhhŸh³h K\ubhð)”}”(hŒåPreset values are easily selectable sets of parameter values for the features that the configuration uses. The number of values in a single preset set, equals the sum of parameter values in the features used by the configuration.”h]”hŒåPreset values are easily selectable sets of parameter values for the features that the configuration uses. The number of values in a single preset set, equals the sum of parameter values in the features used by the configuration.”…””}”(hj¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K^hj¨hžhubhð)”}”(hŒ¯e.g. a configuration consists of 3 features, one has 2 parameters, one has a single parameter, and another has no parameters. A single preset set will therefore have 3 values.”h]”hŒ¯e.g. a configuration consists of 3 features, one has 2 parameters, one has a single parameter, and another has no parameters. A single preset set will therefore have 3 values.”…””}”(hjÇhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kbhj¨hžhubhð)”}”(hŒ¬Presets are optionally defined by the configuration, up to 15 can be defined. If no preset is selected, then the parameter values defined in the feature are used as normal.”h]”hŒ¬Presets are optionally defined by the configuration, up to 15 can be defined. If no preset is selected, then the parameter values defined in the feature are used as normal.”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kfhj¨hžhubeh}”(h]”Œ preset-values”ah ]”h"]”Œ preset values”ah$]”h&]”uh1h´hjmhžhhŸh³h K\ubhµ)”}”(hhh]”(hº)”}”(hŒ Operation”h]”hŒ Operation”…””}”(hjîhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjëhžhhŸh³h Klubhð)”}”(hŒCThe following steps take place in the operation of a configuration.”h]”hŒCThe following steps take place in the operation of a configuration.”…””}”(hjühžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KnhjëhžhubhŒenumerated_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒƒIn this example, the configuration is 'autofdo', which has an associated feature 'strobing' that works on ETMv4 CoreSight Devices. ”h]”hð)”}”(hŒ‚In this example, the configuration is 'autofdo', which has an associated feature 'strobing' that works on ETMv4 CoreSight Devices.”h]”hŒŠIn this example, the configuration is ‘autofdo’, which has an associated feature ‘strobing’ that works on ETMv4 CoreSight Devices.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kphjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj hžhhŸh³h Nubj)”}”(hŒÃThe configuration is enabled. For example 'perf' may select the configuration as part of its command line:: perf record -e cs_etm/autofdo/ myapp which will enable the 'autofdo' configuration. ”h]”(hð)”}”(hŒkThe configuration is enabled. For example 'perf' may select the configuration as part of its command line::”h]”hŒnThe configuration is enabled. For example ‘perf’ may select the configuration as part of its command line:”…””}”(hj-hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kshj)ubhŒ literal_block”“”)”}”(hŒ$perf record -e cs_etm/autofdo/ myapp”h]”hŒ$perf record -e cs_etm/autofdo/ myapp”…””}”hj=sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h Kvhj)ubhð)”}”(hŒ.which will enable the 'autofdo' configuration.”h]”hŒ2which will enable the ‘autofdo’ configuration.”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kxhj)ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhj hžhhŸh³h Nubj)”}”(hX perf starts tracing on the system. As each ETMv4 that perf uses for trace is enabled, the configuration manager will check if the ETMv4 has a feature that relates to the currently active configuration. In this case 'strobing' is enabled & programmed into the ETMv4. ”h]”hð)”}”(hX perf starts tracing on the system. As each ETMv4 that perf uses for trace is enabled, the configuration manager will check if the ETMv4 has a feature that relates to the currently active configuration. In this case 'strobing' is enabled & programmed into the ETMv4.”h]”hXperf starts tracing on the system. As each ETMv4 that perf uses for trace is enabled, the configuration manager will check if the ETMv4 has a feature that relates to the currently active configuration. In this case ‘strobing’ is enabled & programmed into the ETMv4.”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kzhj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj hžhhŸh³h Nubj)”}”(hŒ[When the ETMv4 is disabled, any registers marked as needing to be saved will be read back. ”h]”hð)”}”(hŒZWhen the ETMv4 is disabled, any registers marked as needing to be saved will be read back.”h]”hŒZWhen the ETMv4 is disabled, any registers marked as needing to be saved will be read back.”…””}”(hj{hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Khjwubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj hžhhŸh³h Nubj)”}”(hŒEAt the end of the perf session, the configuration will be disabled. ”h]”hð)”}”(hŒCAt the end of the perf session, the configuration will be disabled.”h]”hŒCAt the end of the perf session, the configuration will be disabled.”…””}”(hj“hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K‚hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj hžhhŸh³h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1j hjëhžhhŸh³h Kpubeh}”(h]”Œ operation”ah ]”h"]”Œ operation”ah$]”h&]”uh1h´hjmhžhhŸh³h Klubeh}”(h]”Œconfigurations”ah ]”h"]”Œconfigurations”ah$]”h&]”uh1h´hjhžhhŸh³h KJubeh}”(h]”Œbasic-concepts”ah ]”h"]”Œbasic concepts”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kubhµ)”}”(hhh]”(hº)”}”(hŒ#Viewing Configurations and Features”h]”hŒ#Viewing Configurations and Features”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÊhžhhŸh³h K†ubhð)”}”(hŒvThe set of configurations and features that are currently loaded into the system can be viewed using the configfs API.”h]”hŒvThe set of configurations and features that are currently loaded into the system can be viewed using the configfs API.”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KˆhjÊhžhubhð)”}”(hŒDMount configfs as normal and the 'cs-syscfg' subsystem will appear::”h]”hŒGMount configfs as normal and the ‘cs-syscfg’ subsystem will appear:”…””}”(hjéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K‹hjÊhžhubj<)”}”(hŒ"$ ls /config cs-syscfg stp-policy”h]”hŒ"$ ls /config cs-syscfg stp-policy”…””}”hj÷sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h KhjÊhžhubhð)”}”(hŒThis has two sub-directories::”h]”hŒThis has two sub-directories:”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KhjÊhžhubj<)”}”(hŒ-$ cd cs-syscfg/ $ ls configurations features”h]”hŒ-$ cd cs-syscfg/ $ ls configurations features”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h K’hjÊhžhubhð)”}”(hŒTThe system has the configuration 'autofdo' built in. It may be examined as follows::”h]”hŒWThe system has the configuration ‘autofdo’ built in. It may be examined as follows:”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K–hjÊhžhubj<)”}”(hX $ cd configurations/ $ ls autofdo $ cd autofdo/ $ ls description feature_refs preset1 preset3 preset5 preset7 preset9 enable preset preset2 preset4 preset6 preset8 $ cat description Setup ETMs with strobing for autofdo $ cat feature_refs strobing”h]”hX $ cd configurations/ $ ls autofdo $ cd autofdo/ $ ls description feature_refs preset1 preset3 preset5 preset7 preset9 enable preset preset2 preset4 preset6 preset8 $ cat description Setup ETMs with strobing for autofdo $ cat feature_refs strobing”…””}”hj/sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h K™hjÊhžhubhð)”}”(hŒiEach preset declared has a 'preset' subdirectory declared. The values for the preset can be examined::”h]”hŒlEach preset declared has a ‘preset’ subdirectory declared. The values for the preset can be examined:”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K¥hjÊhžhubj<)”}”(hŒ‡$ cat preset1/values strobing.window = 0x1388 strobing.period = 0x2 $ cat preset2/values strobing.window = 0x1388 strobing.period = 0x4”h]”hŒ‡$ cat preset1/values strobing.window = 0x1388 strobing.period = 0x2 $ cat preset2/values strobing.window = 0x1388 strobing.period = 0x4”…””}”hjKsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h K¨hjÊhžhubhð)”}”(hŒeThe 'enable' and 'preset' files allow the control of a configuration when using CoreSight with sysfs.”h]”hŒmThe ‘enable’ and ‘preset’ files allow the control of a configuration when using CoreSight with sysfs.”…””}”(hjYhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K­hjÊhžhubhð)”}”(hŒXThe features referenced by the configuration can be examined in the features directory::”h]”hŒWThe features referenced by the configuration can be examined in the features directory:”…””}”(hjghžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K°hjÊhžhubj<)”}”(hX%$ cd ../../features/strobing/ $ ls description matches nr_params params $ cat description Generate periodic trace capture windows. parameter 'window': a number of CPU cycles (W) parameter 'period': trace enabled for W cycles every period x W cycles $ cat matches SRC_ETMV4 $ cat nr_params 2”h]”hX%$ cd ../../features/strobing/ $ ls description matches nr_params params $ cat description Generate periodic trace capture windows. parameter 'window': a number of CPU cycles (W) parameter 'period': trace enabled for W cycles every period x W cycles $ cat matches SRC_ETMV4 $ cat nr_params 2”…””}”hjusbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h K³hjÊhžhubhð)”}”(hŒ?Move to the params directory to examine and adjust parameters::”h]”hŒ>Move to the params directory to examine and adjust parameters:”…””}”(hjƒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h K¿hjÊhžhubj<)”}”(hŒocd params $ ls period window $ cd period $ ls value $ cat value 0x2710 # echo 15000 > value # cat value 0x3a98”h]”hŒocd params $ ls period window $ cd period $ ls value $ cat value 0x2710 # echo 15000 > value # cat value 0x3a98”…””}”hj‘sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h KÁhjÊhžhubhð)”}”(hŒcParameters adjusted in this way are reflected in all device instances that have loaded the feature.”h]”hŒcParameters adjusted in this way are reflected in all device instances that have loaded the feature.”…””}”(hjŸhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KÍhjÊhžhubeh}”(h]”Œ#viewing-configurations-and-features”ah ]”h"]”Œ#viewing configurations and features”ah$]”h&]”uh1h´hh¶hžhhŸh³h K†ubhµ)”}”(hhh]”(hº)”}”(hŒUsing Configurations in perf”h]”hŒUsing Configurations in perf”…””}”(hj¸hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjµhžhhŸh³h KÒubhð)”}”(hŒ¾The configurations loaded into the CoreSight configuration management are also declared in the perf 'cs_etm' event infrastructure so that they can be selected when running trace under perf::”h]”hŒÁThe configurations loaded into the CoreSight configuration management are also declared in the perf ‘cs_etm’ event infrastructure so that they can be selected when running trace under perf:”…””}”(hjÆhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KÔhjµhžhubj<)”}”(hŒ$ ls /sys/devices/cs_etm cpu0 cpu2 events nr_addr_filters power subsystem uevent cpu1 cpu3 format perf_event_mux_interval_ms sinks type”h]”hŒ$ ls /sys/devices/cs_etm cpu0 cpu2 events nr_addr_filters power subsystem uevent cpu1 cpu3 format perf_event_mux_interval_ms sinks type”…””}”hjÔsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h KØhjµhžhubhð)”}”(hŒ¹The key directory here is 'events' - a generic perf directory which allows selection on the perf command line. As with the sinks entries, this provides a hash of the configuration name.”h]”hŒ½The key directory here is ‘events’ - a generic perf directory which allows selection on the perf command line. As with the sinks entries, this provides a hash of the configuration name.”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KÜhjµhžhubhð)”}”(hŒŒThe entry in the 'events' directory uses perfs built in syntax generator to substitute the syntax for the name when evaluating the command::”h]”hŒThe entry in the ‘events’ directory uses perfs built in syntax generator to substitute the syntax for the name when evaluating the command:”…””}”(hjðhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kàhjµhžhubj<)”}”(hŒ=$ ls events/ autofdo $ cat events/autofdo configid=0xa7c3dddd”h]”hŒ=$ ls events/ autofdo $ cat events/autofdo configid=0xa7c3dddd”…””}”hjþsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h Kãhjµhžhubhð)”}”(hŒFThe 'autofdo' configuration may be selected on the perf command line::”h]”hŒIThe ‘autofdo’ configuration may be selected on the perf command line:”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kèhjµhžhubj<)”}”(hŒ<$ perf record -e cs_etm/autofdo/u --per-thread ”h]”hŒ<$ perf record -e cs_etm/autofdo/u --per-thread ”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h Kêhjµhžhubhð)”}”(hŒHA preset to override the current parameter values can also be selected::”h]”hŒGA preset to override the current parameter values can also be selected:”…””}”(hj(hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kìhjµhžhubj<)”}”(hŒE$ perf record -e cs_etm/autofdo,preset=1/u --per-thread ”h]”hŒE$ perf record -e cs_etm/autofdo,preset=1/u --per-thread ”…””}”hj6sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h Kîhjµhžhubhð)”}”(hŒaWhen configurations are selected in this way, then the trace sink used is automatically selected.”h]”hŒaWhen configurations are selected in this way, then the trace sink used is automatically selected.”…””}”(hjDhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Kðhjµhžhubeh}”(h]”Œusing-configurations-in-perf”ah ]”h"]”Œusing configurations in perf”ah$]”h&]”uh1h´hh¶hžhhŸh³h KÒubhµ)”}”(hhh]”(hº)”}”(hŒUsing Configurations in sysfs”h]”hŒUsing Configurations in sysfs”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjZhžhhŸh³h Kôubhð)”}”(hŒ˜Coresight can be controlled using sysfs. When this is in use then a configuration can be made active for the devices that are used in the sysfs session.”h]”hŒ˜Coresight can be controlled using sysfs. When this is in use then a configuration can be made active for the devices that are used in the sysfs session.”…””}”(hjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KöhjZhžhubhð)”}”(hŒ9In a configuration there are 'enable' and 'preset' files.”h]”hŒAIn a configuration there are ‘enable’ and ‘preset’ files.”…””}”(hjyhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KùhjZhžhubhð)”}”(hŒ.To enable a configuration for use with sysfs::”h]”hŒ-To enable a configuration for use with sysfs:”…””}”(hj‡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h KûhjZhžhubj<)”}”(hŒ-$ cd configurations/autofdo $ echo 1 > enable”h]”hŒ-$ cd configurations/autofdo $ echo 1 > enable”…””}”hj•sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h KýhjZhžhubhð)”}”(hŒkThis will then use any default parameter values in the features - which can be adjusted as described above.”h]”hŒkThis will then use any default parameter values in the features - which can be adjusted as described above.”…””}”(hj£hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h MhjZhžhubhð)”}”(hŒ,To use a preset set of parameter values::”h]”hŒ+To use a preset set of parameter values:”…””}”(hj±hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h MhjZhžhubj<)”}”(hŒ$ echo 3 > preset”h]”hŒ$ echo 3 > preset”…””}”hj¿sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1j;hŸh³h MhjZhžhubhð)”}”(hŒ©This will select preset3 for the configuration. The valid values for preset are 0 - to deselect presets, and any value of where a preset sub-directory is present.”h]”hŒ©This will select preset3 for the configuration. The valid values for preset are 0 - to deselect presets, and any value of where a preset sub-directory is present.”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h MhjZhžhubhð)”}”(hX4Note that the active sysfs configuration is a global parameter, therefore only a single configuration can be active for sysfs at any one time. Attempting to enable a second configuration will result in an error. Additionally, attempting to disable the configuration while in use will also result in an error.”h]”hX4Note that the active sysfs configuration is a global parameter, therefore only a single configuration can be active for sysfs at any one time. Attempting to enable a second configuration will result in an error. Additionally, attempting to disable the configuration while in use will also result in an error.”…””}”(hjÛhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h M hjZhžhubhð)”}”(hŒ^The use of the active configuration by sysfs is independent of the configuration used in perf.”h]”hŒ^The use of the active configuration by sysfs is independent of the configuration used in perf.”…””}”(hjéhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h MhjZhžhubeh}”(h]”Œusing-configurations-in-sysfs”ah ]”h"]”Œusing configurations in sysfs”ah$]”h&]”uh1h´hh¶hžhhŸh³h Kôubhµ)”}”(hhh]”(hº)”}”(hŒ*Creating and Loading Custom Configurations”h]”hŒ*Creating and Loading Custom Configurations”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjÿhžhhŸh³h Mubhð)”}”(hŒmCustom configurations and / or features can be dynamically loaded into the system by using a loadable module.”h]”hŒmCustom configurations and / or features can be dynamically loaded into the system by using a loadable module.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Mhjÿhžhubhð)”}”(hŒEAn example of a custom configuration is found in ./samples/coresight.”h]”hŒEAn example of a custom configuration is found in ./samples/coresight.”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Mhjÿhžhubhð)”}”(hŒ{This creates a new configuration that uses the existing built in strobing feature, but provides a different set of presets.”h]”hŒ{This creates a new configuration that uses the existing built in strobing feature, but provides a different set of presets.”…””}”(hj,hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h Mhjÿhžhubhð)”}”(hŒ¦When the module is loaded, then the configuration appears in the configfs file system and is selectable in the same way as the built in configuration described above.”h]”hŒ¦When the module is loaded, then the configuration appears in the configfs file system and is selectable in the same way as the built in configuration described above.”…””}”(hj:hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h M hjÿhžhubhð)”}”(hŒÖConfigurations can use previously loaded features. The system will ensure that it is not possible to unload a feature that is currently in use, by enforcing the unload order as the strict reverse of the load order.”h]”hŒÖConfigurations can use previously loaded features. The system will ensure that it is not possible to unload a feature that is currently in use, by enforcing the unload order as the strict reverse of the load order.”…””}”(hjHhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hïhŸh³h M$hjÿhžhubeh}”(h]”Œ*creating-and-loading-custom-configurations”ah ]”h"]”Œ*creating and loading custom configurations”ah$]”h&]”uh1h´hh¶hžhhŸh³h Mubeh}”(h]”Œ&coresight-system-configuration-manager”ah ]”h"]”Œ&coresight system configuration manager”ah$]”h&]”uh1h´hhhžhhŸh³h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¹NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j‰Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jcj`jjŠjÇjÄjjjgjbj_j¿j¼jèjåj·j´j²j¯jWjTjüjùj[jXuŒ nametypes”}”(jc‰j‰jljjj‰jb‰j¿‰jè‰j·‰j²‰jW‰jü‰j[‰uh}”(j`h¶jŠj[jÄjjgj¯j_jj¼jmjåj¨j´jëj¯jÊjTjµjùjZjXjÿuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.