€•Ø]Œ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Œ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ŸŒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj;hžhhŸh³h KFubhÛ)”}”(hŒ<# figure out which GTH port is the first memory controller::”h]”hŒ;# figure out which GTH port is the first memory controller:”…””}”(hjLhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KHhj;hžhubhŒ literal_block”“”)”}”(hŒ-$ cat /sys/bus/intel_th/devices/0-msc0/port 0”h]”hŒ-$ cat /sys/bus/intel_th/devices/0-msc0/port 0”…””}”hj\sbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jZhŸh³h KJhj;hžhubhÛ)”}”(hŒF# looks like it's port 0, configure master 33 to send data to port 0::”h]”hŒG# looks like it’s port 0, configure master 33 to send data to port 0:”…””}”(hjjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h KMhj;hžhubj[)”}”(hŒ5$ echo 0 > /sys/bus/intel_th/devices/0-gth/masters/33”h]”hŒ5$ echo 0 > /sys/bus/intel_th/devices/0-gth/masters/33”…””}”hjxsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jZhŸh³h KOhj;hž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 KQhj;hžhubj[)”}”(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²uh1jZhŸh³h KThj;hž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 KWhj;hžhubj[)”}”(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²uh1jZhŸh³h KYhj;hž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[hj;hžhubj[)”}”(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²uh1jZhŸh³h K]hj;hž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_hj;hžhubj[)”}”(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²uh1jZhŸh³h Kchj;hž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 Kehj;hžhubj[)”}”(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²uh1jZhŸh³h Kghj;hž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”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hjhž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 Klhjhž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.”…””}”(hj9hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h Kqhjhž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.”…””}”(hjGhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h Kyhjhž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”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¹hj]hž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.”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÚhŸh³h K‚hj]hžhubhù)”}”(hhh]”hþ)”}”(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 Khjubj)”}”(hhh]”j)”}”(hhh]”(j)”}”(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&]”uh1jhj”ubj)”}”(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&]”uh1jhj”ubeh}”(h]”h ]”h"]”h$]”h&]”j…j†uh1jhŸh³h Kˆhj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hýhŸh³h Khj|ubah}”(h]”h ]”h"]”h$]”h&]”uh1høhj]hž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‘hj]hž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”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”}”(júj÷jjj8j5jjjZjWjòjïuŒ nametypes”}”(jú‰j‰j8‰j‰jZ‰jò‰uh}”(j÷h¶jhÉj5jjj;jWjjïj]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”]”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.