Changeset 2bd71d95 in rtems


Ignore:
Timestamp:
Mar 6, 2015, 1:41:24 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
33b72fd
Parents:
bf9d387
git-author:
Sebastian Huber <sebastian.huber@…> (03/06/15 13:41:24)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/06/15 15:20:00)
Message:

shell: Add PROFREPORT command

Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/Makefile.am

    rbf9d387 r2bd71d95  
    114114libshell_a_SOURCES += shell/main_cmdchown.c
    115115libshell_a_SOURCES += shell/main_cmdchmod.c
     116libshell_a_SOURCES += shell/main_profreport.c
    116117
    117118if LIBNETWORKING
  • cpukit/libmisc/shell/shellconfig.h

    rbf9d387 r2bd71d95  
    8585extern rtems_shell_cmd_t rtems_shell_STACKUSE_Command;
    8686extern rtems_shell_cmd_t rtems_shell_PERIODUSE_Command;
     87extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command;
    8788extern rtems_shell_cmd_t rtems_shell_WKSPACE_INFO_Command;
    8889extern rtems_shell_cmd_t rtems_shell_MALLOC_INFO_Command;
     
    444445    #endif
    445446    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
     447         !defined(CONFIGURE_SHELL_NO_COMMAND_PROFREPORT)) || \
     448        defined(CONFIGURE_SHELL_COMMAND_PROFREPORT)
     449      &rtems_shell_PROFREPORT_Command,
     450    #endif
     451    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) && \
    446452         !defined(CONFIGURE_SHELL_NO_COMMAND_WKSPACE_INFO)) || \
    447453        defined(CONFIGURE_SHELL_COMMAND_WKSPACE_INFO)
  • doc/shell/rtems.t

    rbf9d387 r2bd71d95  
    1616@item @code{stackuse} - print per thread stack usage
    1717@item @code{perioduse} - print or reset per period usage
     18@item @code{profreport} - print a profiling report
    1819@item @code{wkspace} - Display information on Executive Workspace
    1920@item @code{config} - Show the system configuration.
     
    384385@c
    385386@page
     387@subsection profreport - print a profiling report
     388
     389@pgindex profreport
     390
     391@subheading SYNOPSYS:
     392
     393@example
     394profreport
     395@end example
     396
     397@subheading DESCRIPTION:
     398
     399This command may be used to print a profiling report.
     400
     401@subheading EXIT STATUS:
     402
     403This command returns 0.
     404
     405@subheading NOTES:
     406
     407Profiling must be enabled at build configuration time to get profiling
     408information.
     409
     410@subheading EXAMPLES:
     411
     412The following is an example of how to use @code{profreport}:
     413
     414@smallexample
     415SHLL [/] $ profreport
     416<ProfilingReport name="Shell">
     417  <PerCPUProfilingReport processorIndex="0">
     418    <MaxThreadDispatchDisabledTime unit="ns">10447</MaxThreadDispatchDisabledTime>
     419    <MeanThreadDispatchDisabledTime unit="ns">2</MeanThreadDispatchDisabledTime>
     420    <TotalThreadDispatchDisabledTime unit="ns">195926627</TotalThreadDispatchDisabledTime>
     421    <ThreadDispatchDisabledCount>77908688</ThreadDispatchDisabledCount>
     422    <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
     423    <MaxInterruptTime unit="ns">688</MaxInterruptTime>
     424    <MeanInterruptTime unit="ns">127</MeanInterruptTime>
     425    <TotalInterruptTime unit="ns">282651157</TotalInterruptTime>
     426    <InterruptCount>2215855</InterruptCount>
     427  </PerCPUProfilingReport>
     428  <PerCPUProfilingReport processorIndex="1">
     429    <MaxThreadDispatchDisabledTime unit="ns">9053</MaxThreadDispatchDisabledTime>
     430    <MeanThreadDispatchDisabledTime unit="ns">41</MeanThreadDispatchDisabledTime>
     431    <TotalThreadDispatchDisabledTime unit="ns">3053830335</TotalThreadDispatchDisabledTime>
     432    <ThreadDispatchDisabledCount>73334202</ThreadDispatchDisabledCount>
     433    <MaxInterruptDelay unit="ns">0</MaxInterruptDelay>
     434    <MaxInterruptTime unit="ns">57</MaxInterruptTime>
     435    <MeanInterruptTime unit="ns">35</MeanInterruptTime>
     436    <TotalInterruptTime unit="ns">76980203</TotalInterruptTime>
     437    <InterruptCount>2141179</InterruptCount>
     438  </PerCPUProfilingReport>
     439  <SMPLockProfilingReport name="SMP lock stats">
     440    <MaxAcquireTime unit="ns">608</MaxAcquireTime>
     441    <MaxSectionTime unit="ns">1387</MaxSectionTime>
     442    <MeanAcquireTime unit="ns">112</MeanAcquireTime>
     443    <MeanSectionTime unit="ns">338</MeanSectionTime>
     444    <TotalAcquireTime unit="ns">119031</TotalAcquireTime>
     445    <TotalSectionTime unit="ns">357222</TotalSectionTime>
     446    <UsageCount>1055</UsageCount>
     447    <ContentionCount initialQueueLength="0">1055</ContentionCount>
     448    <ContentionCount initialQueueLength="1">0</ContentionCount>
     449    <ContentionCount initialQueueLength="2">0</ContentionCount>
     450    <ContentionCount initialQueueLength="3">0</ContentionCount>
     451  </SMPLockProfilingReport>
     452  <SMPLockProfilingReport name="Giant">
     453    <MaxAcquireTime unit="ns">4186</MaxAcquireTime>
     454    <MaxSectionTime unit="ns">7575</MaxSectionTime>
     455    <MeanAcquireTime unit="ns">160</MeanAcquireTime>
     456    <MeanSectionTime unit="ns">183</MeanSectionTime>
     457    <TotalAcquireTime unit="ns">1772793111</TotalAcquireTime>
     458    <TotalSectionTime unit="ns">2029733879</TotalSectionTime>
     459    <UsageCount>11039140</UsageCount>
     460    <ContentionCount initialQueueLength="0">11037655</ContentionCount>
     461    <ContentionCount initialQueueLength="1">1485</ContentionCount>
     462    <ContentionCount initialQueueLength="2">0</ContentionCount>
     463    <ContentionCount initialQueueLength="3">0</ContentionCount>
     464  </SMPLockProfilingReport>
     465</ProfilingReport>
     466@end smallexample
     467
     468@subheading CONFIGURATION:
     469
     470@findex CONFIGURE_SHELL_NO_COMMAND_PROFREPORT
     471@findex CONFIGURE_SHELL_COMMAND_PROFREPORT
     472
     473When building a custom command set, define
     474@code{CONFIGURE_SHELL_COMMAND_PROFREPORT} to have this
     475command included.
     476
     477This command can be excluded from the shell command set by
     478defining @code{CONFIGURE_SHELL_NO_COMMAND_PROFREPORT} when all
     479shell commands have been configured.
     480
     481@subheading PROGRAMMING INFORMATION:
     482
     483The configuration structure for the @code{profreport} has the
     484following prototype:
     485
     486@example
     487extern rtems_shell_cmd_t rtems_shell_PROFREPORT_Command;
     488@end example
     489
     490@c
     491@c
     492@c
     493@page
    386494@subsection wkspace - display information on executive workspace
    387495
Note: See TracChangeset for help on using the changeset viewer.