Skip to content

Documentation: document gprof command.#18979

Merged
cederom merged 1 commit into
apache:masterfrom
Zepp-Hanzj:docs/gprof
May 28, 2026
Merged

Documentation: document gprof command.#18979
cederom merged 1 commit into
apache:masterfrom
Zepp-Hanzj:docs/gprof

Conversation

@Zepp-Hanzj
Copy link
Copy Markdown
Contributor

@Zepp-Hanzj Zepp-Hanzj commented May 27, 2026

Summary

Add documentation for the gprof command, which controls NuttX function-call profiling. Covers the start, stop, dump, and help subcommands, configuration dependencies on CONFIG_PROFILE and CONFIG_SYSTEM_GPROF, and a worked example showing how to collect and analyse a gmon.out file.

Refs #11081

Source verification

Evidence drawn from:

  • apps/system/gprof/gprof.c (85 lines; 3 subcommands dispatched via strcmp)
  • apps/system/gprof/Kconfig (tristate; depends on !PROFILE_NONE || SIM_GPROF)
  • include/sys/gmon.h (monstartup(), moncontrol(), _mcleanup() prototypes and semantics)

Docs build

   cd Documentation
   python3 -c "...docutils parse..."   # RST parse OK
   PYTHONPATH=_extensions python3 -m sphinx -b dummy . /tmp/nuttx-docs-build-gprof
   # build succeeded, no gprof warnings

Signed-off-by: hanzj hanzhijian@zepp.com

Add documentation for the gprof command, which controls NuttX
function-call profiling.  Covers the start, stop, dump, and help
subcommands, configuration dependencies on CONFIG_PROFILE and
CONFIG_SYSTEM_GPROF, and a worked example showing how to collect
and analyse a gmon.out file.

Refs apache#11081

Signed-off-by: hanzj <hanzhijian@zepp.com>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium labels May 27, 2026
Copy link
Copy Markdown
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Zepp-Hanzj :-)

@cederom cederom merged commit 2354c72 into apache:master May 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants