€•'‡Œ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/pt_BR/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”“”)”}”(hjh]”(hŒ Mike Leach <”…””}”(hjh²hh³Nh´NubhŒ reference”“”)”}”(hŒmike.leach@linaro.org”h]”hŒmike.leach@linaro.org”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:mike.leach@linaro.org”uh1j hjubhŒ>”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³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”…””}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1híhj4h³hÇh´Kubhþ)”}”(hŒ October 2020 ”h]”j)”}”(hŒ October 2020”h]”hŒ October 2020”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KhjEubah}”(h]”h ]”h"]”h$]”h&]”uh1hýhj4ubeh}”(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”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjoh²hh³hÇh´K ubj)”}”(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.”…””}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K hjoh²hubj)”}”(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.”…””}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjoh²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Íhj¤h²hh³hÇh´Kubj)”}”(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&]”uh1jh³hÇh´Khj¤h²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒFeatures”h]”hŒFeatures”…””}”(hjÆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÃh²hh³hÇh´Kubj)”}”(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&]”uh1jh³hÇh´K hjÃh²hubj)”}”(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&]”uh1jh³hÇh´K$hjÃh²hubj)”}”(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&]”uh1jh³hÇh´K(hjÃh²hubj)”}”(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&]”uh1jh³hÇh´K-hjÃh²hubj)”}”(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&]”uh1jh³hÇh´K1hjÃh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒParameter Value”h]”hŒParameter Value”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K5ubj)”}”(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.”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K7hjh²hubj)”}”(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.”…””}”(hj9h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K;hjh²hubj)”}”(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.”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K?hjh²hubj)”}”(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.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KBhjh²hubj)”}”(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.”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³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Èhj¤h²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒConfigurations”h]”hŒConfigurations”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´KJubj)”}”(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&]”uh1jh³hÇh´KLhjh²hubj)”}”(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&]”uh1jh³hÇh´KPhjh²hubj)”}”(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&]”uh1jh³hÇh´KUhjh²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\ubj)”}”(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&]”uh1jh³hÇh´K^hj¼h²hubj)”}”(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&]”uh1jh³hÇh´Kbhj¼h²hubj)”}”(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&]”uh1jh³hÇh´Kfhj¼h²hubeh}”(h]”Œ preset-values”ah ]”h"]”Œ preset values”ah$]”h&]”uh1hÈhjh²hh³hÇh´K\ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Operation”h]”hŒ Operation”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÿh²hh³hÇh´Klubj)”}”(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.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³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]”j)”}”(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.”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kphj%ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj 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]”(j)”}”(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:”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kshj=ubhŒ literal_block”“”)”}”(hŒ$perf record -e cs_etm/autofdo/ myapp”h]”hŒ$perf record -e cs_etm/autofdo/ myapp”…””}”hjQsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´Kvhj=ubj)”}”(hŒ.which will enable the 'autofdo' configuration.”h]”hŒ2which will enable the ‘autofdo’ configuration.”…””}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kxhj=ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j#hj 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]”j)”}”(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.”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kzhjsubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj h²hh³hÇh´Nubj$)”}”(hŒ[When the ETMv4 is disabled, any registers marked as needing to be saved will be read back. ”h]”j)”}”(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.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj h²hh³hÇh´Nubj$)”}”(hŒEAt the end of the perf session, the configuration will be disabled. ”h]”j)”}”(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&]”uh1jh³hÇh´K‚hj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1j#hj h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ)”uh1jhjÿh²hh³hÇh´Kpubeh}”(h]”Œ operation”ah ]”h"]”Œ operation”ah$]”h&]”uh1hÈhjh²hh³hÇh´Klubeh}”(h]”Œconfigurations”ah ]”h"]”Œconfigurations”ah$]”h&]”uh1hÈhj¤h²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†ubj)”}”(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&]”uh1jh³hÇh´KˆhjÞh²hubj)”}”(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&]”uh1jh³hÇh´K‹hjÞh²hubjP)”}”(hŒ"$ ls /config cs-syscfg stp-policy”h]”hŒ"$ ls /config cs-syscfg stp-policy”…””}”hj sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´KhjÞh²hubj)”}”(hŒThis has two sub-directories::”h]”hŒThis has two sub-directories:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KhjÞh²hubjP)”}”(hŒ-$ cd cs-syscfg/ $ ls configurations features”h]”hŒ-$ cd cs-syscfg/ $ ls configurations features”…””}”hj'sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´K’hjÞh²hubj)”}”(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:”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K–hjÞh²hubjP)”}”(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”…””}”hjCsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´K™hjÞh²hubj)”}”(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:”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K¥hjÞh²hubjP)”}”(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”…””}”hj_sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´K¨hjÞh²hubj)”}”(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.”…””}”(hjmh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K­hjÞh²hubj)”}”(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:”…””}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´K°hjÞh²hubjP)”}”(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”…””}”hj‰sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´K³hjÞh²hubj)”}”(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&]”uh1jh³hÇh´K¿hjÞh²hubjP)”}”(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Æuh1jOh³hÇh´KÁhjÞh²hubj)”}”(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&]”uh1jh³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Òubj)”}”(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&]”uh1jh³hÇh´KÔhjÉh²hubjP)”}”(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Æuh1jOh³hÇh´KØhjÉh²hubj)”}”(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&]”uh1jh³hÇh´KÜhjÉh²hubj)”}”(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:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´KàhjÉh²hubjP)”}”(hŒ=$ ls events/ autofdo $ cat events/autofdo configid=0xa7c3dddd”h]”hŒ=$ ls events/ autofdo $ cat events/autofdo configid=0xa7c3dddd”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´KãhjÉh²hubj)”}”(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&]”uh1jh³hÇh´KèhjÉh²hubjP)”}”(hŒ<$ perf record -e cs_etm/autofdo/u --per-thread ”h]”hŒ<$ perf record -e cs_etm/autofdo/u --per-thread ”…””}”hj.sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´KêhjÉh²hubj)”}”(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&]”uh1jh³hÇh´KìhjÉh²hubjP)”}”(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 ”…””}”hjJsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´KîhjÉh²hubj)”}”(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.”…””}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³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”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjnh²hh³hÇh´Kôubj)”}”(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.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Köhjnh²hubj)”}”(hŒ9In a configuration there are 'enable' and 'preset' files.”h]”hŒAIn a configuration there are ‘enable’ and ‘preset’ files.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Kùhjnh²hubj)”}”(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&]”uh1jh³hÇh´Kûhjnh²hubjP)”}”(hŒ-$ cd configurations/autofdo $ echo 1 > enable”h]”hŒ-$ cd configurations/autofdo $ echo 1 > enable”…””}”hj©sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´Kýhjnh²hubj)”}”(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&]”uh1jh³hÇh´Mhjnh²hubj)”}”(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&]”uh1jh³hÇh´Mhjnh²hubjP)”}”(hŒ$ echo 3 > preset”h]”hŒ$ echo 3 > preset”…””}”hjÓsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jOh³hÇh´Mhjnh²hubj)”}”(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&]”uh1jh³hÇh´Mhjnh²hubj)”}”(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&]”uh1jh³hÇh´M hjnh²hubj)”}”(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&]”uh1jh³hÇh´Mhjnh²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Íhjh²hh³hÇh´Mubj)”}”(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.”…””}”(hj$h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhjh²hubj)”}”(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.”…””}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Mhjh²hubj)”}”(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&]”uh1jh³hÇh´Mhjh²hubj)”}”(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.”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M hjh²hubj)”}”(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.”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´M$hjh²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”}”(jwjtj¡jžjÛjØj~j{jvjsjÓjÐjüjùjËjÈjÆjÃjkjhjj jojluŒ nametypes”}”(jw‰j¡‰jÛ‰j~‰jv‰jÓ‰jü‰jˉjƉjk‰j‰jo‰uh}”(jthÊjžjojØj¤j{jÃjsjjÐjjùj¼jÈjÿjÃjÞjhjÉj jnjljuŒ 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.