€•Á^Œ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”Œ"/translations/zh_CN/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/zh_TW/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/it_IT/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ja_JP/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ko_KR/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/pt_BR/trace/intel_th”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/sp_SP/trace/intel_th”Œ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³Œ /sys/bus/intel_th/devices/0-gth/masters/33”h]”hŒ5$ echo 0 > /sys/bus/intel_th/devices/0-gth/masters/33”…””}”hjŒsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´KOhjOh²hubhï)”}”(hŒ`# allocate a 2-windowed multiblock buffer on the first memory # controller, each with 64 pages::”h]”hŒ_# allocate a 2-windowed multiblock buffer on the first memory # controller, each with 64 pages:”…””}”(hjšh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KQhjOh²hubjo)”}”(hŒm$ echo multi > /sys/bus/intel_th/devices/0-msc0/mode $ echo 64,64 > /sys/bus/intel_th/devices/0-msc0/nr_pages”h]”hŒm$ echo multi > /sys/bus/intel_th/devices/0-msc0/mode $ echo 64,64 > /sys/bus/intel_th/devices/0-msc0/nr_pages”…””}”hj¨sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´KThjOh²hubhï)”}”(hŒ,# enable wrapping for this controller, too::”h]”hŒ+# enable wrapping for this controller, too:”…””}”(hj¶h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KWhjOh²hubjo)”}”(hŒ0$ echo 1 > /sys/bus/intel_th/devices/0-msc0/wrap”h]”hŒ0$ echo 1 > /sys/bus/intel_th/devices/0-msc0/wrap”…””}”hjÄsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´KYhjOh²hubhï)”}”(hŒ%# and enable tracing into this port::”h]”hŒ$# and enable tracing into this port:”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K[hjOh²hubjo)”}”(hŒ2$ echo 1 > /sys/bus/intel_th/devices/0-msc0/active”h]”hŒ2$ echo 1 > /sys/bus/intel_th/devices/0-msc0/active”…””}”hjàsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´K]hjOh²hubhï)”}”(hŒy# .. send data to master 33, see stm.txt for more details .. # .. wait for traces to pile up .. # .. and stop the trace::”h]”hŒx# .. send data to master 33, see stm.txt for more details .. # .. wait for traces to pile up .. # .. and stop the trace:”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K_hjOh²hubjo)”}”(hŒ2$ echo 0 > /sys/bus/intel_th/devices/0-msc0/active”h]”hŒ2$ echo 0 > /sys/bus/intel_th/devices/0-msc0/active”…””}”hjüsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´KchjOh²hubhï)”}”(hŒ:# and now you can collect the trace from the device node::”h]”hŒ9# and now you can collect the trace from the device node:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KehjOh²hubjo)”}”(hŒ($ cat /dev/intel_th0/msc0 > my_stp_trace”h]”hŒ($ cat /dev/intel_th0/msc0 > my_stp_trace”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jnh³hÇh´KghjOh²hubeh}”(h]”Œ quick-example”ah ]”h"]”Œ quick example”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KFubhÉ)”}”(hhh]”(hÎ)”}”(hŒHost Debugger Mode”h]”hŒHost Debugger Mode”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj.h²hh³hÇh´Kjubhï)”}”(hXIt is possible to configure the Trace Hub and control its trace capture from a remote debug host, which should be connected via one of the hardware debugging interfaces, which will then be used to both control Intel Trace Hub and transfer its trace data to the debug host.”h]”hXIt is possible to configure the Trace Hub and control its trace capture from a remote debug host, which should be connected via one of the hardware debugging interfaces, which will then be used to both control Intel Trace Hub and transfer its trace data to the debug host.”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Klhj.h²hubhï)”}”(hXÒThe driver needs to be told that such an arrangement is taking place so that it does not touch any capture/port configuration and avoids conflicting with the debug host's configuration accesses. The only activity that the driver will perform in this mode is collecting software traces to the Software Trace Hub (an stm class device). The user is still responsible for setting up adequate master/channel mappings that the decoder on the receiving end would recognize.”h]”hXÔThe driver needs to be told that such an arrangement is taking place so that it does not touch any capture/port configuration and avoids conflicting with the debug host’s configuration accesses. The only activity that the driver will perform in this mode is collecting software traces to the Software Trace Hub (an stm class device). The user is still responsible for setting up adequate master/channel mappings that the decoder on the receiving end would recognize.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kqhj.h²hubhï)”}”(hX@In order to enable the host mode, set the 'host_mode' parameter of the 'intel_th' kernel module to 'y'. None of the virtual output devices will show up on the intel_th bus. Also, trace configuration and capture controlling attribute groups of the 'gth' device will not be exposed. The 'sth' device will operate as usual.”h]”hXTIn order to enable the host mode, set the ‘host_mode’ parameter of the ‘intel_th’ kernel module to ‘y’. None of the virtual output devices will show up on the intel_th bus. Also, trace configuration and capture controlling attribute groups of the ‘gth’ device will not be exposed. The ‘sth’ device will operate as usual.”…””}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kyhj.h²hubeh}”(h]”Œhost-debugger-mode”ah ]”h"]”Œhost debugger mode”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KjubhÉ)”}”(hhh]”(hÎ)”}”(hŒSoftware Sinks”h]”hŒSoftware Sinks”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjqh²hh³hÇh´K€ubhï)”}”(hŒôThe Memory Storage Unit (MSU) driver provides an in-kernel API for drivers to register themselves as software sinks for the trace data. Such drivers can further export the data via other devices, such as USB device controllers or network cards.”h]”hŒôThe Memory Storage Unit (MSU) driver provides an in-kernel API for drivers to register themselves as software sinks for the trace data. Such drivers can further export the data via other devices, such as USB device controllers or network cards.”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‚hjqh²hubj )”}”(hhh]”j)”}”(hXThe API has two main parts:: - notifying the software sink that a particular window is full, and "locking" that window, that is, making it unavailable for the trace collection; when this happens, the MSU driver will automatically switch to the next window in the buffer if it is unlocked, or stop the trace capture if it's not; - tracking the "locked" state of windows and providing a way for the software sink driver to notify the MSU driver when a window is unlocked and can be used again to collect trace data. ”h]”(j)”}”(hŒThe API has two main parts::”h]”hŒThe API has two main parts::”…””}”(hj—h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khj“ubj()”}”(hhh]”j-)”}”(hhh]”(j2)”}”(hX(notifying the software sink that a particular window is full, and "locking" that window, that is, making it unavailable for the trace collection; when this happens, the MSU driver will automatically switch to the next window in the buffer if it is unlocked, or stop the trace capture if it's not;”h]”hï)”}”(hX(notifying the software sink that a particular window is full, and "locking" that window, that is, making it unavailable for the trace collection; when this happens, the MSU driver will automatically switch to the next window in the buffer if it is unlocked, or stop the trace capture if it's not;”h]”hX.notifying the software sink that a particular window is full, and “locking†that window, that is, making it unavailable for the trace collection; when this happens, the MSU driver will automatically switch to the next window in the buffer if it is unlocked, or stop the trace capture if it’s not;”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kˆhj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj¨ubj2)”}”(hŒ¸tracking the "locked" state of windows and providing a way for the software sink driver to notify the MSU driver when a window is unlocked and can be used again to collect trace data. ”h]”hï)”}”(hŒ·tracking the "locked" state of windows and providing a way for the software sink driver to notify the MSU driver when a window is unlocked and can be used again to collect trace data.”h]”hŒ»tracking the “locked†state of windows and providing a way for the software sink driver to notify the MSU driver when a window is unlocked and can be used again to collect trace data.”…””}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1j1hj¨ubeh}”(h]”h ]”h"]”h$]”h&]”j™jšuh1j,h³hÇh´Kˆhj¥ubah}”(h]”h ]”h"]”h$]”h&]”uh1j'hj“ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjqh²hh³Nh´Nubhï)”}”(hX‹An example sink driver, msu-sink illustrates the implementation of a software sink. Functionally, it simply unlocks windows as soon as they are full, keeping the MSU running in a circular buffer mode. Unlike the "multi" mode, it will fill out all the windows in the buffer as opposed to just the first one. It can be enabled by writing "sink" to the "mode" file (assuming msu-sink.ko is loaded).”h]”hX—An example sink driver, msu-sink illustrates the implementation of a software sink. Functionally, it simply unlocks windows as soon as they are full, keeping the MSU running in a circular buffer mode. Unlike the “multi†mode, it will fill out all the windows in the buffer as opposed to just the first one. It can be enabled by writing “sink†to the “mode†file (assuming msu-sink.ko is loaded).”…””}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K‘hjqh²hubeh}”(h]”Œsoftware-sinks”ah ]”h"]”Œsoftware sinks”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K€ubeh}”(h]”Œintel-r-trace-hub-th”ah ]”h"]”Œintel(r) trace hub (th)”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”j4Œ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”}”(jj jjjLjIj+j(jnjkjjuŒ nametypes”}”(j‰j‰jL‰j+‰jn‰j‰uh}”(j hÊjhÝjIjj(jOjkj.jjquŒ 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”]”hŒsystem_message”“”)”}”(hhh]”hï)”}”(hŒ`Blank line missing before literal block (after the "::")? Interpreted as a definition list item.”h]”hŒdBlank line missing before literal block (after the “::â€)? Interpreted as a definition list item.”…””}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîhj˜ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œline”KŒsource”hÇuh1j–hj¥ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.