docs: trace: Refactor index documentation
Subsystems (2)
PATCH v2 1/1 docs: trace: Refactor index documentation
Refactored Documentation/trace/index.rst to improve clarity, structure, and organization. Reformatted sections, added appropriate headings.
Background of Patch:
This patch is inspired by the maintainer's suggestion on the v1 patch to bring the documentation into real order, similar to commit '270beb5b2aae' from Linux 6.13, improving clarity, structure, and usability.
---
V1 - https://lore.kernel.org/all/[email protected]/
V2 - Refined formatting and improved section organization.
Documentation/trace/index.rst | 86 ++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 11 deletions(-)
Documentation/trace/index.rst +75 -11
@@ -1,39 +1,103 @@ -========================== -Linux Tracing Technologies -========================== +================================ +Linux Tracing Technologies Guide +================================ + +Tracing in the Linux kernel is a powerful mechanism that allows +developers and system administrators to analyze and debug system +behavior. This guide provides documentation on various tracing +frameworks and tools available in the Linux kernel. + +Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches. .. toctree:: - :maxdepth: 2 + :maxdepth: 1 - ftrace-design + debugging + tracepoints tracepoint-analysis + +Core Tracing Frameworks +----------------------- + +The following are the primary tracing frameworks integrated into +the Linux kernel. + +.. toctree:: + :maxdepth: 1 + ftrace + ftrace-design ftrace-uses - fprobe kprobes kprobetrace uprobetracer fprobetrace - tracepoints + fprobe + +Event Tracing and Analysis +-------------------------- + +A detailed explanation of event tracing mechanisms and their +applications. + +.. toctree:: + :maxdepth: 1 + events events-kmem events-power events-nmi events-msr - mmiotrace + boottime-trace histogram histogram-design - boottime-trace - debugging hwlat_detector osnoise-tracer timerlat-tracer + +Hardware and Performance Tracing +-------------------------------- + +This section covers tracing features that monitor hardware +interactions and system performance. + +.. toctree:: + :maxdepth: 1 + intel_th ring-buffer-design ring-buffer-map stm sys-t coresight/index - user_events rv/index hisi-ptt + +User-space Tracing +------------------ + +These tools allow tracing user-space applications and +interactions. + +.. toctree:: + :maxdepth: 1 + + user_events + mmiotrace + +Additional Resources +-------------------- + +For more details, refer to the respective documentation of each +tracing tool and framework. + +.. only:: subproject and html + + Indices + ======= + + * :ref:`genindex`
Signature · 1 line
2.34.1
Steven Rostedt
maintainerOn Thu, 6 Feb 2025 19:44:53 +0530
Purva Yeshi <[email protected]> wrote:
Note, subject should start with: "docs: tracing: ..." as "tracing" is the subsystem and not "trace". Even though the directory is "trace" the subsystem is "tracing".
Quoted 5 lines
Refactored
Documentation/trace/index.rstto improve clarity, structure, and organization. Reformatted sections, added appropriate headings.Background of Patch:
This patch is inspired by the maintainer's suggestion on the v1 patch to
Usually it's bad form to have a patch reference itself as "Patch". The above could be written as:
Background:
These changes were inspired by...
Quoted 27 lines
bring the documentation into real order, similar to commit '
270beb5b2aae' from Linux 6.13, improving clarity, structure, and usability.Signed-off-by Purva Yeshi <[email protected]>---
V1 - https://lore.kernel.org/all/[email protected]/
V2 - Refined formatting and improved section organization.Documentation/trace/index.rst | 86 ++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 11 deletions(-)Documentation/trace/index.rst +8
-3@@ -1,39 +1,103 @@ -========================== -Linux Tracing Technologies -========================== +================================ +Linux Tracing Technologies Guide +================================ + +Tracing in the Linux kernel is a powerful mechanism that allows +developers and system administrators to analyze and debug system +behavior. This guide provides documentation on various tracing +frameworks and tools available in the Linux kernel.
Documentation/trace/index.rst line 17
Quoted 10 lines
Documentation/trace/index.rst +7
-1+ +Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches. .. toctree:: - :maxdepth: 2 + :maxdepth: 1
I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
Quoted 41 lines
Documentation/trace/index.rst +24
-4- ftrace-design + debugging + tracepoints tracepoint-analysis + +Core Tracing Frameworks +----------------------- + +The following are the primary tracing frameworks integrated into +the Linux kernel. + +.. toctree:: + :maxdepth: 1 + ftrace + ftrace-design ftrace-uses - fprobe kprobes kprobetrace uprobetracer fprobetrace - tracepoints + fprobe + +Event Tracing and Analysis +-------------------------- + +A detailed explanation of event tracing mechanisms and their +applications. + +.. toctree:: + :maxdepth: 1 + events events-kmem events-power events-nmi events-msr - mmiotrace
Documentation/trace/index.rst line 60
Quoted 10 lines
Documentation/trace/index.rst +1
-2+ boottime-trace histogram histogram-design - boottime-trace - debugging hwlat_detector osnoise-tracer timerlat-tracer
The above 3 probably should be in the hardware interactions section below.
Documentation/trace/index.rst line 72
Quoted 13 lines
Documentation/trace/index.rst +10
-0+ +Hardware and Performance Tracing +-------------------------------- + +This section covers tracing features that monitor hardware +interactions and system performance. + +.. toctree:: + :maxdepth: 1 + intel_th ring-buffer-design
The ring-buffer-design should be in "Core Tracing Frameworks".
Documentation/trace/index.rst line 73
Quoted 1 line
Documentation/trace/index.rst +0
-0ring-buffer-map
This describes how to map the ring buffer in user space. Maybe it should go at the "Introduction" section?
Quoted 9 lines
Documentation/trace/index.rst +3
-1stm sys-t coresight/index - user_events rv/index hisi-ptt + +User-space Tracing +------------------
Documentation/trace/index.rst line 90
Quoted 10 lines
Documentation/trace/index.rst +9
-0+ +These tools allow tracing user-space applications and +interactions. + +.. toctree:: + :maxdepth: 1 + + user_events + mmiotrace
mmiotrace traces events between hardware and the drivers. Perhaps this should go up into the Hardware and Performance tracing.
Quoted 4 lines
Documentation/trace/index.rst +4
-0+ +Additional Resources +-------------------- +
Documentation/trace/index.rst line 103
Quoted 10 lines
Documentation/trace/index.rst +9
-0+For more details, refer to the respective documentation of each +tracing tool and framework. + +.. only:: subproject and html + + Indices + ======= + + * :ref:`genindex`
Thanks,
-- Steve
Quoted 9 lines · Steven Rostedt
Quoted 6 lines · On Thu, 6 Feb 2025 19:44:53 +0530 Purva Yeshi <[email protected]> wrote:
Documentation/trace/index.rst +5
-0+Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches.
Quoted 6 lines
Review
Quoted 3 lines
.. toctree::
(quoted diff) +1
-1- :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
:maxdepth: specifies heading levels depth of the toctree. In this case, the author wants only doc titles (hence 1), whereas 2 also includes second-level (section) headings.
Thanks.
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Steven Rostedt
maintainerQuoted 13 lines · On Wed, 12 Feb 2025 18:10:44 +0700 Bagas Sanjaya <[email protected]> wrote:
Quoted 6 lines
Quoted 6 lines
Documentation/trace/index.rst +5
-0+Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches.Quoted 6 lines
Review
Quoted 3 lines
.. toctree::
(quoted diff) +1
-1- :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
Quoted 3 lines
:maxdepth: specifies heading levels depth of the toctree. In this case, the author wants only doc titles (hence 1), whereas 2 also includes second-level (section) headings.
As I'm the original author, I would like to know why there was a change.
-- Steve
Quoted 16 lines · Steven Rostedt
Quoted 13 lines · On Wed, 12 Feb 2025 18:10:44 +0700 Bagas Sanjaya <[email protected]> wrote:
Quoted 12 lines
Documentation/trace/index.rst line 17
Quoted 9 lines
Documentation/trace/index.rst +6
-1+Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches. .. toctree:: - :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
Quoted 6 lines
Quoted 3 lines
:maxdepth: specifies heading levels depth of the toctree. In this case, the author wants only doc titles (hence 1), whereas 2 also includes second-level (section) headings.
As I'm the original author, I would like to know why there was a change.
Oops, I mean I'm referring to the patch author (Purva Yeshi).
Signature · 1 line
An old man doll... just what I always wanted! - Clara
Quoted 7 lines · Steven Rostedt
On Thu, 6 Feb 2025 19:44:53 +0530
Purva Yeshi <[email protected]> wrote:Note, subject should start with: "docs: tracing: ..." as "tracing" is the subsystem and not "trace". Even though the directory is "trace" the subsystem is "tracing".
Thanks for the clarification. I'll update the subject line in the next version of the patch.
Quoted 12 lines
Quoted 5 lines
Refactored
Documentation/trace/index.rstto improve clarity, structure, and organization. Reformatted sections, added appropriate headings.Background of Patch:
This patch is inspired by the maintainer's suggestion on the v1 patch toUsually it's bad form to have a patch reference itself as "Patch". The above could be written as:
Background:
These changes were inspired by...
I'll reword the commit message as suggested and resend the updated version shortly. I'll make sure to be more careful next time to avoid such mistakes.
Quoted 34 lines
Quoted 34 lines
bring the documentation into real order, similar to commit '
270beb5b2aae' from Linux 6.13, improving clarity, structure, and usability.Signed-off-by Purva Yeshi <[email protected]>---
V1 - https://lore.kernel.org/all/[email protected]/
V2 - Refined formatting and improved section organization.Documentation/trace/index.rst | 86 ++++++++++++++++++++++++++++++----- 1 file changed, 75 insertions(+), 11 deletions(-)Documentation/trace/index.rst +14
-3@@ -1,39 +1,103 @@ -========================== -Linux Tracing Technologies -========================== +================================ +Linux Tracing Technologies Guide +================================ + +Tracing in the Linux kernel is a powerful mechanism that allows +developers and system administrators to analyze and debug system +behavior. This guide provides documentation on various tracing +frameworks and tools available in the Linux kernel. + +Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches.
Quoted 7 lines
Documentation/trace/index.rst line 17
Quoted 3 lines
Documentation/trace/index.rst +1
-1.. toctree:: - :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
I changed :maxdepth: from 2 to 1 to simplify the table of contents, keeping only document titles instead of also including second-level section headings. The intent was to improve readability and navigation.
Additionally, I referred to commit '270beb5b2aae', as suggested by Jonathan Corbet in the v1 patch, to align the documentation structure accordingly.
I'll update the commit message in the next revision to explicitly mention this change.
Quoted 48 lines
Quoted 46 lines
Documentation/trace/index.rst +25
-6- ftrace-design + debugging + tracepoints tracepoint-analysis + +Core Tracing Frameworks +----------------------- + +The following are the primary tracing frameworks integrated into +the Linux kernel. + +.. toctree:: + :maxdepth: 1 + ftrace + ftrace-design ftrace-uses - fprobe kprobes kprobetrace uprobetracer fprobetrace - tracepoints + fprobe + +Event Tracing and Analysis +-------------------------- + +A detailed explanation of event tracing mechanisms and their +applications. + +.. toctree:: + :maxdepth: 1 + events events-kmem events-power events-nmi events-msr - mmiotrace + boottime-trace histogram histogram-design - boottime-trace - debugging
Quoted 6 lines
Documentation/trace/index.rst line 60
Quoted 3 lines
Documentation/trace/index.rst +0
-0hwlat_detector osnoise-tracer timerlat-tracerThe above 3 probably should be in the hardware interactions section below.
Okay, I'll move hwlat_detector, osnoise-tracer, and timerlat-tracer to the Hardware Tracing section in the next version of the patch.
Quoted 12 lines
Quoted 11 lines
Documentation/trace/index.rst +10
-0+ +Hardware and Performance Tracing +-------------------------------- + +This section covers tracing features that monitor hardware +interactions and system performance. + +.. toctree:: + :maxdepth: 1 + intel_th
Quoted 4 lines
Documentation/trace/index.rst line 72
Quoted 1 line
Documentation/trace/index.rst +0
-0ring-buffer-designThe ring-buffer-design should be in "Core Tracing Frameworks".
I'll move 'ring-buffer-design' to the Core Tracing Frameworks section.
Quoted 6 lines
Documentation/trace/index.rst line 73
Quoted 1 line
Documentation/trace/index.rst +0
-0ring-buffer-mapThis describes how to map the ring buffer in user space. Maybe it should go at the "Introduction" section?
For ring-buffer-map, placing it in the Introduction section could provide early context, but since it is more implementation-specific, it might fit better under Core Tracing Frameworks alongside ring-buffer-design. Would that placement works?
Quoted 18 lines
Quoted 17 lines
Documentation/trace/index.rst +11
-1stm sys-t coresight/index - user_events rv/index hisi-ptt + +User-space Tracing +------------------ + +These tools allow tracing user-space applications and +interactions. + +.. toctree:: + :maxdepth: 1 + + user_events
Quoted 5 lines
Documentation/trace/index.rst line 90
Quoted 1 line
Documentation/trace/index.rst +1
-0+ mmiotracemmiotrace traces events between hardware and the drivers. Perhaps this should go up into the Hardware and Performance tracing.
Okay, since 'mmiotrace' primarily traces MMIO interactions between hardware and drivers, it makes more sense under Hardware and Performance Tracing. I'll move it there in the next revision.
Quoted 18 lines
Quoted 4 lines
Documentation/trace/index.rst +4
-0+ +Additional Resources +-------------------- +Documentation/trace/index.rst line 103
Quoted 10 lines
Documentation/trace/index.rst +9
-0+For more details, refer to the respective documentation of each +tracing tool and framework. + +.. only:: subproject and html + + Indices + ======= + + * :ref:`genindex`Thanks,
Quoted 1 line
-- Steve
Thanks for the suggestions. I'll incorporate these changes in the next revision.
Best regards,
Purva Yeshi
Steven Rostedt
maintainerQuoted 23 lines · On Thu, 13 Feb 2025 17:26:21 +0530 Purva Yeshi <[email protected]> wrote:
Quoted 11 lines
Quoted 11 lines
Documentation/trace/index.rst +10
-0+Tracing in the Linux kernel is a powerful mechanism that allows +developers and system administrators to analyze and debug system +behavior. This guide provides documentation on various tracing +frameworks and tools available in the Linux kernel. + +Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches.Quoted 7 lines
Review
Quoted 3 lines
.. toctree::
(quoted diff) +1
-1- :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
I changed :maxdepth: from 2 to 1 to simplify the table of contents, keeping only document titles instead of also including second-level section headings. The intent was to improve readability and navigation.
Quoted 7 lines
Additionally, I referred to commit '
270beb5b2aae', as suggested by Jonathan Corbet in the v1 patch, to align the documentation structure accordingly.I'll update the commit message in the next revision to explicitly mention this change.
Can you make that a separate patch. A commit should do only one thing and that change isn't necessary to be part of the rest of the changes.
Quoted 33 lines
Quoted 19 lines
Quoted 18 lines
Documentation/trace/index.rst +13
-1- ftrace-design + debugging + tracepoints tracepoint-analysis + + +Hardware and Performance Tracing +-------------------------------- + +This section covers tracing features that monitor hardware +interactions and system performance. + +.. toctree:: + :maxdepth: 1 + intel_thQuoted 4 lines
Quoted 1 line
ring-buffer-design
The ring-buffer-design should be in "Core Tracing Frameworks".
I'll move 'ring-buffer-design' to the Core Tracing Frameworks section.
Quoted 6 lines
Quoted 1 line
ring-buffer-map
This describes how to map the ring buffer in user space. Maybe it should go at the "Introduction" section?
Quoted 4 lines
For ring-buffer-map, placing it in the Introduction section could provide early context, but since it is more implementation-specific, it might fit better under Core Tracing Frameworks alongside ring-buffer-design. Would that placement works?
But it's not kernel implementation. It describes how to use it in user space. That is, it's not part of the tracing framework.
-- Steve
Quoted 30 lines · Steven Rostedt
Quoted 27 lines · On Thu, 13 Feb 2025 17:26:21 +0530 Purva Yeshi <[email protected]> wrote:
Quoted 11 lines
Quoted 11 lines
Documentation/trace/index.rst +10
-0+Tracing in the Linux kernel is a powerful mechanism that allows +developers and system administrators to analyze and debug system +behavior. This guide provides documentation on various tracing +frameworks and tools available in the Linux kernel. + +Introduction to Tracing +----------------------- + +This section provides an overview of Linux tracing mechanisms +and debugging approaches.Quoted 7 lines
Review
Quoted 3 lines
.. toctree::(quoted diff) +1
-1- :maxdepth: 2 + :maxdepth: 1I don't really know what the maxdepth gives here, but there was no mention in the change log why it had to be converted from 2 to 1.
I changed :maxdepth: from 2 to 1 to simplify the table of contents, keeping only document titles instead of also including second-level section headings. The intent was to improve readability and navigation.
Additionally, I referred to commit '
270beb5b2aae', as suggested by Jonathan Corbet in the v1 patch, to align the documentation structure accordingly.
Quoted 6 lines
Quoted 3 lines
I'll update the commit message in the next revision to explicitly mention this change.
Can you make that a separate patch. A commit should do only one thing and that change isn't necessary to be part of the rest of the changes.
Okay, I’ll separate this change into a new patch.
Quoted 40 lines
Quoted 34 lines
Quoted 20 lines
Quoted 19 lines
Documentation/trace/index.rst +13
-1- ftrace-design + debugging + tracepoints tracepoint-analysis + + +Hardware and Performance Tracing +-------------------------------- + +This section covers tracing features that monitor hardware +interactions and system performance. + +.. toctree:: + :maxdepth: 1 + intel_thQuoted 4 lines
Quoted 1 line
ring-buffer-design
The ring-buffer-design should be in "Core Tracing Frameworks".
I'll move 'ring-buffer-design' to the Core Tracing Frameworks section.
Quoted 6 lines
Quoted 1 line
ring-buffer-map
This describes how to map the ring buffer in user space. Maybe it should go at the "Introduction" section?
Quoted 4 lines
For ring-buffer-map, placing it in the Introduction section could provide early context, but since it is more implementation-specific, it might fit better under Core Tracing Frameworks alongside ring-buffer-design. Would that placement works?
Quoted 4 lines
But it's not kernel implementation. It describes how to use it in user space. That is, it's not part of the tracing framework.
-- Steve
Thanks for the clarification. I’ll move it to the Introduction section in the next revision.