1The following is a demonstration of the dappprof command,
2
3This is the usage for version 0.60,
4
5   # dappprof -h
6   USAGE: dappprof [-cehoTU] [-u lib] { -p PID | command }
7   
8             -p PID          # examine this PID
9             -a              # print all details
10             -c              # print syscall counts
11             -e              # print elapsed times (us)
12             -o              # print on cpu times
13             -T              # print totals
14             -u lib          # trace this library instead
15             -U              # trace all libraries + user funcs
16             -b bufsize      # dynamic variable buf size
17      eg,
18          dappprof df -h       # run and examine "df -h"
19          dappprof -p 1871     # examine PID 1871
20          dappprof -ap 1871    # print all data
21
22
23
24The following shows running dappprof with the "banner hello" command.
25Elapsed and on-cpu times are printed (-eo), as well as counts (-c) and 
26totals (-T),
27
28   # dappprof -eocT banner hello
29   
30    #    #  ######  #       #        ####
31    #    #  #       #       #       #    #
32    ######  #####   #       #       #    #
33    #    #  #       #       #       #    #
34    #    #  #       #       #       #    #
35    #    #  ######  ######  ######   ####
36   
37   
38   CALL                                                         COUNT
39   __fsr                                                            1
40   main                                                             1
41   banprt                                                           1
42   banner                                                           1
43   banset                                                           1
44   convert                                                          5
45   banfil                                                           5
46   TOTAL:                                                          15
47   
48   CALL                                                       ELAPSED
49   banset                                                       37363
50   banfil                                                      147407
51   convert                                                     149606
52   banprt                                                      423507
53   banner                                                      891088
54   __fsr                                                      1694349
55   TOTAL:                                                     3343320
56   
57   CALL                                                           CPU
58   banset                                                        7532
59   convert                                                       8805
60   banfil                                                       11092
61   __fsr                                                        15708
62   banner                                                       48696
63   banprt                                                      388853
64   TOTAL:                                                      480686
65
66The above output has analysed user functions (the default). It makes it
67easy to identify which function is being called the most (COUNT), which
68is taking the most time (ELAPSED), and which is consuming the most CPU (CPU).
69These times are totals for all the functions called.
70
71
72