|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: m
Length: 5092 (0x13e4)
Names: »monitor.3«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/man/cat3/monitor.3«
0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f ┆ _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆ 0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74 ┆ u_ a_ l Library Funct┆ 0x0040…0060 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6d 6f 6e 69 74 6f 72 28 33 29 0a 0a 0a 0a ┆ions monitor(3) ┆ 0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20 ┆N N N NA A A AM M M ME E E E ┆ 0x0080…00a0 20 20 6d 6f 6e 69 74 6f 72 2c 20 6d 6f 6e 73 74 61 72 74 75 70 2c 20 6d 6f 6e 63 6f 6e 74 72 6f ┆ monitor, monstartup, moncontro┆ 0x00a0…00c0 6c 20 2d 20 70 72 65 70 61 72 65 20 65 78 65 63 75 74 69 6f 6e 20 70 72 6f 66 69 6c 65 0a 0a 53 ┆l - prepare execution profile S┆ 0x00c0…00e0 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08 4e 08 4e 08 4e 54 08 54 08 54 08 54 41 08 41 08 41 ┆ S S SY Y Y YN N N NT T T TA A A┆ 0x00e0…0100 08 41 58 08 58 08 58 08 58 0a 20 20 20 20 20 6d 08 6d 08 6d 08 6d 6f 08 6f 08 6f 08 6f 6e 08 6e ┆ AX X X X m m m mo o o on n┆ 0x0100…0120 08 6e 08 6e 69 08 69 08 69 08 69 74 08 74 08 74 08 74 6f 08 6f 08 6f 08 6f 72 08 72 08 72 08 72 ┆ n ni i i it t t to o o or r r r┆ 0x0120…0140 28 08 28 08 28 08 28 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 77 08 77 08 77 08 77 70 08 70 08 ┆( ( ( (l l l lo o o ow w w wp p ┆ 0x0140…0160 70 08 70 63 08 63 08 63 08 63 2c 08 2c 08 2c 08 2c 20 68 08 68 08 68 08 68 69 08 69 08 69 08 69 ┆p pc c c c, , , , h h h hi i i i┆ 0x0160…0180 67 08 67 08 67 08 67 68 08 68 08 68 08 68 70 08 70 08 70 08 70 63 08 63 08 63 08 63 2c 08 2c 08 ┆g g g gh h h hp p p pc c c c, , ┆ 0x0180…01a0 2c 08 2c 20 62 08 62 08 62 08 62 75 08 75 08 75 08 75 66 08 66 08 66 08 66 66 08 66 08 66 08 66 ┆, , b b b bu u u uf f f ff f f f┆ 0x01a0…01c0 65 08 65 08 65 08 65 72 08 72 08 72 08 72 2c 08 2c 08 2c 08 2c 20 62 08 62 08 62 08 62 75 08 75 ┆e e e er r r r, , , , b b b bu u┆ 0x01c0…01e0 08 75 08 75 66 08 66 08 66 08 66 73 08 73 08 73 08 73 69 08 69 08 69 08 69 7a 08 7a 08 7a 08 7a ┆ u uf f f fs s s si i i iz z z z┆ 0x01e0…0200 65 08 65 08 65 08 65 2c 08 2c 08 2c 08 2c 20 6e 08 6e 08 6e 08 6e 66 08 66 08 66 08 66 75 08 75 ┆e e e e, , , , n n n nf f f fu u┆ 0x0200…0220 08 75 08 75 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 29 08 29 08 29 08 29 0a 20 20 20 20 20 69 ┆ u un n n nc c c c) ) ) ) i┆ 0x0220…0240 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 28 08 28 08 28 08 28 2a 08 2a 08 ┆ i i in n n nt t t t ( ( ( (* * ┆ 0x0240…0260 2a 08 2a 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 77 08 77 08 77 08 77 70 08 70 08 70 08 70 63 ┆* *l l l lo o o ow w w wp p p pc┆ 0x0260…0280 08 63 08 63 08 63 29 08 29 08 29 08 29 28 08 28 08 28 08 28 29 08 29 08 29 08 29 2c 08 2c 08 2c ┆ c c c) ) ) )( ( ( () ) ) ), , ,┆ 0x0280…02a0 08 2c 20 28 08 28 08 28 08 28 2a 08 2a 08 2a 08 2a 68 08 68 08 68 08 68 69 08 69 08 69 08 69 67 ┆ , ( ( ( (* * * *h h h hi i i ig┆ 0x02a0…02c0 08 67 08 67 08 67 68 08 68 08 68 08 68 70 08 70 08 70 08 70 63 08 63 08 63 08 63 29 08 29 08 29 ┆ g g gh h h hp p p pc c c c) ) )┆ 0x02c0…02e0 08 29 28 08 28 08 28 08 28 29 08 29 08 29 08 29 3b 08 3b 08 3b 08 3b 0a 20 20 20 20 20 73 08 73 ┆ )( ( ( () ) ) ); ; ; ; s s┆ 0x02e0…0300 08 73 08 73 68 08 68 08 68 08 68 6f 08 6f 08 6f 08 6f 72 08 72 08 72 08 72 74 08 74 08 74 08 74 ┆ s sh h h ho o o or r r rt t t t┆ 0x0300…0320 20 62 08 62 08 62 08 62 75 08 75 08 75 08 75 66 08 66 08 66 08 66 66 08 66 08 66 08 66 65 08 65 ┆ b b b bu u u uf f f ff f f fe e┆ 0x0320…0340 08 65 08 65 72 08 72 08 72 08 72 5b 08 5b 08 5b 08 5b 5d 08 5d 08 5d 08 5d 3b 08 3b 08 3b 08 3b ┆ e er r r r[ [ [ [] ] ] ]; ; ; ;┆ 0x0340…0360 0a 0a 20 20 20 20 20 6d 08 6d 08 6d 08 6d 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 73 08 73 08 ┆ m m m mo o o on n n ns s ┆ 0x0360…0380 73 08 73 74 08 74 08 74 08 74 61 08 61 08 61 08 61 72 08 72 08 72 08 72 74 08 74 08 74 08 74 75 ┆s st t t ta a a ar r r rt t t tu┆ 0x0380…03a0 08 75 08 75 08 75 70 08 70 08 70 08 70 28 08 28 08 28 08 28 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f ┆ u u up p p p( ( ( (l l l lo o o┆ 0x03a0…03c0 08 6f 77 08 77 08 77 08 77 70 08 70 08 70 08 70 63 08 63 08 63 08 63 2c 08 2c 08 2c 08 2c 20 68 ┆ ow w w wp p p pc c c c, , , , h┆ 0x03c0…03e0 08 68 08 68 08 68 69 08 69 08 69 08 69 67 08 67 08 67 08 67 68 08 68 08 68 08 68 70 08 70 08 70 ┆ h h hi i i ig g g gh h h hp p p┆ 0x03e0…0400 08 70 63 08 63 08 63 08 63 29 08 29 08 29 08 29 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e ┆ pc c c c) ) ) ) i i i in n┆ 0x0400…0420 08 6e 08 6e 74 08 74 08 74 08 74 20 28 08 28 08 28 08 28 2a 08 2a 08 2a 08 2a 6c 08 6c 08 6c 08 ┆ n nt t t t ( ( ( (* * * *l l l ┆ 0x0420…0440 6c 6f 08 6f 08 6f 08 6f 77 08 77 08 77 08 77 70 08 70 08 70 08 70 63 08 63 08 63 08 63 29 08 29 ┆lo o o ow w w wp p p pc c c c) )┆ 0x0440…0460 08 29 08 29 28 08 28 08 28 08 28 29 08 29 08 29 08 29 2c 08 2c 08 2c 08 2c 20 28 08 28 08 28 08 ┆ ) )( ( ( () ) ) ), , , , ( ( ( ┆ 0x0460…0480 28 2a 08 2a 08 2a 08 2a 68 08 68 08 68 08 68 69 08 69 08 69 08 69 67 08 67 08 67 08 67 68 08 68 ┆(* * * *h h h hi i i ig g g gh h┆ 0x0480…04a0 08 68 08 68 70 08 70 08 70 08 70 63 08 63 08 63 08 63 29 08 29 08 29 08 29 28 08 28 08 28 08 28 ┆ h hp p p pc c c c) ) ) )( ( ( (┆ 0x04a0…04c0 29 08 29 08 29 08 29 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 6d 08 6d 08 6d 08 6d 6f 08 6f 08 ┆) ) ) ); ; ; ; m m m mo o ┆ 0x04c0…04e0 6f 08 6f 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 74 ┆o on n n nc c c co o o on n n nt┆ 0x04e0…0500 08 74 08 74 08 74 72 08 72 08 72 08 72 6f 08 6f 08 6f 08 6f 6c 08 6c 08 6c 08 6c 28 08 28 08 28 ┆ t t tr r r ro o o ol l l l( ( (┆ 0x0500…0520 08 28 6d 08 6d 08 6d 08 6d 6f 08 6f 08 6f 08 6f 64 08 64 08 64 08 64 65 08 65 08 65 08 65 29 08 ┆ (m m m mo o o od d d de e e e) ┆ 0x0520…0540 29 08 29 08 29 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 ┆) ) ) D D D DE E E ES S S SC C ┆ 0x0540…0560 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 ┆C CR R R RI I I IP P P PT T T TI┆ 0x0560…0580 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 4d 6f 6e 69 74 6f ┆ I I IO O O ON N N N Monito┆ 0x0580…05a0 72 69 6e 67 20 69 73 20 70 72 6f 76 69 64 65 64 20 62 79 20 74 68 65 20 5f 08 67 5f 08 70 5f 08 ┆ring is provided by the _ g_ p_ ┆ 0x05a0…05c0 72 5f 08 6f 5f 08 66 20 75 73 65 72 20 63 6f 6d 6d 61 6e 64 2e 0a 0a 20 20 20 20 20 54 6f 20 63 ┆r_ o_ f user command. To c┆ 0x05c0…05e0 72 65 61 74 65 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 20 70 72 6f 67 72 61 6d 20 74 68 61 74 ┆reate an executable program that┆ 0x05e0…0600 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6e 63 6c 75 64 65 73 0a 20 20 20 20 20 63 61 6c ┆ automatically includes cal┆ 0x0600…0620 6c 73 20 66 6f 72 20 74 68 65 20 5f 08 67 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 20 6d 6f 6e 69 74 ┆ls for the _ g_ p_ r_ o_ f monit┆ 0x0620…0640 6f 72 20 61 6e 64 20 69 6e 63 6c 75 64 65 73 20 61 6e 20 69 6e 69 74 69 61 6c 20 63 61 6c 6c 20 ┆or and includes an initial call ┆ 0x0640…0660 74 6f 0a 20 20 20 20 20 69 74 73 20 73 74 61 72 74 2d 75 70 20 72 6f 75 74 69 6e 65 20 5f 08 6d ┆to its start-up routine _ m┆ 0x0660…0680 5f 08 6f 5f 08 6e 5f 08 73 5f 08 74 5f 08 61 5f 08 72 5f 08 74 5f 08 75 5f 08 70 20 77 69 74 68 ┆_ o_ n_ s_ t_ a_ r_ t_ u_ p with┆ 0x0680…06a0 20 64 65 66 61 75 6c 74 20 70 61 72 61 6d 65 74 65 72 73 2c 20 75 73 65 0a 20 20 20 20 20 74 68 ┆ default parameters, use th┆ 0x06a0…06c0 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61 6e 64 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 ┆e following command: ┆ 0x06c0…06e0 63 63 20 2d 70 20 2e 20 2e 20 2e 0a 0a 20 20 20 20 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 69 5f 08 ┆cc -p . . . _ m_ o_ n_ i_ ┆ 0x06e0…0700 74 5f 08 6f 5f 08 72 20 6e 65 65 64 20 6e 6f 74 20 62 65 20 63 61 6c 6c 65 64 20 65 78 70 6c 69 ┆t_ o_ r need not be called expli┆ 0x0700…0720 63 69 74 6c 79 2c 20 65 78 63 65 70 74 20 74 6f 20 67 61 69 6e 20 66 69 6e 65 0a 20 20 20 20 20 ┆citly, except to gain fine ┆ 0x0720…0740 63 6f 6e 74 72 6f 6c 20 6f 76 65 72 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 5f 08 69 5f 08 6c 20 ┆control over _ p_ r_ o_ f_ i_ l ┆ 0x0740…0760 62 75 66 66 65 72 20 61 6c 6c 6f 63 61 74 69 6f 6e 2e 0a 0a 20 20 20 20 20 54 6f 20 63 72 65 61 ┆buffer allocation. To crea┆ 0x0760…0780 74 65 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 20 70 72 6f 67 72 61 6d 20 74 68 61 74 20 61 75 ┆te an executable program that au┆ 0x0780…07a0 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6e 63 6c 75 64 65 73 0a 20 20 20 20 20 63 61 6c 6c 73 20 ┆tomatically includes calls ┆ 0x07a0…07c0 66 6f 72 20 74 68 65 20 5f 08 67 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 20 6d 6f 6e 69 74 6f 72 2c ┆for the _ g_ p_ r_ o_ f monitor,┆ 0x07c0…07e0 20 75 73 65 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 63 63 ┆ use this command: cc┆ 0x07e0…0800 20 2d 70 67 20 2e 20 2e 20 2e 0a 0a 20 20 20 20 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 73 5f 08 74 ┆ -pg . . . _ m_ o_ n_ s_ t┆ 0x0800…0820 5f 08 61 5f 08 72 5f 08 74 5f 08 75 5f 08 70 20 69 73 20 61 20 68 69 67 68 2d 6c 65 76 65 6c 20 ┆_ a_ r_ t_ u_ p is a high-level ┆ 0x0820…0840 69 6e 74 65 72 66 61 63 65 20 74 6f 20 74 68 65 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 5f 08 69 ┆interface to the _ p_ r_ o_ f_ i┆ 0x0840…0860 5f 08 6c 20 73 79 73 74 65 6d 0a 20 20 20 20 20 63 61 6c 6c 2e 20 20 5f 08 6c 5f 08 6f 5f 08 77 ┆_ l system call. _ l_ o_ w┆ 0x0860…0880 5f 08 70 5f 08 63 20 61 6e 64 20 5f 08 68 5f 08 69 5f 08 67 5f 08 68 5f 08 70 5f 08 63 20 73 70 ┆_ p_ c and _ h_ i_ g_ h_ p_ c sp┆ 0x0880…08a0 65 63 69 66 79 20 74 68 65 20 61 64 64 72 65 73 73 20 72 61 6e 67 65 20 74 68 61 74 20 69 73 20 ┆ecify the address range that is ┆ 0x08a0…08c0 74 6f 0a 20 20 20 20 20 62 65 20 73 61 6d 70 6c 65 64 3b 20 74 68 65 20 6c 6f 77 65 73 74 20 61 ┆to be sampled; the lowest a┆ 0x08c0…08e0 64 64 72 65 73 73 20 73 61 6d 70 6c 65 64 20 69 73 20 74 68 61 74 20 6f 66 20 5f 08 6c 5f 08 6f ┆ddress sampled is that of _ l_ o┆ 0x08e0…0900 5f 08 77 5f 08 70 5f 08 63 20 61 6e 64 0a 20 20 20 20 20 74 68 65 20 68 69 67 68 65 73 74 20 69 ┆_ w_ p_ c and the highest i┆ 0x0900…0920 73 20 6a 75 73 74 20 62 65 6c 6f 77 20 5f 08 68 5f 08 69 5f 08 67 5f 08 68 5f 08 70 5f 08 63 2e ┆s just below _ h_ i_ g_ h_ p_ c.┆ 0x0920…0940 20 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 73 5f 08 74 5f 08 61 5f 08 72 5f 08 74 5f 08 75 5f 08 70 ┆ _ m_ o_ n_ s_ t_ a_ r_ t_ u_ p┆ 0x0940…0960 20 61 6c 6c 6f 63 61 74 65 73 0a 20 20 20 20 20 73 70 61 63 65 20 75 73 69 6e 67 20 74 68 65 20 ┆ allocates space using the ┆ 0x0960…0980 5f 08 73 5f 08 62 5f 08 72 5f 08 6b 20 73 79 73 74 65 6d 20 63 61 6c 6c 20 61 6e 64 20 70 61 73 ┆_ s_ b_ r_ k system call and pas┆ 0x0980…09a0 73 65 73 20 69 74 20 74 6f 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 69 5f 08 74 5f 08 6f 5f 08 72 0a ┆ses it to _ m_ o_ n_ i_ t_ o_ r ┆ 0x09a0…09c0 20 20 20 20 20 28 73 65 65 20 62 65 6c 6f 77 29 20 74 6f 20 72 65 63 6f 72 64 20 61 20 68 69 73 ┆ (see below) to record a his┆ 0x09c0…09e0 74 6f 67 72 61 6d 20 6f 66 20 70 65 72 69 6f 64 69 63 61 6c 6c 79 20 73 61 6d 70 6c 65 64 0a 20 ┆togram of periodically sampled ┆ 0x09e0…0a00 20 20 20 20 76 61 6c 75 65 73 20 6f 66 20 74 68 65 20 70 72 6f 67 72 61 6d 20 63 6f 75 6e 74 65 ┆ values of the program counte┆ 0x0a00…0a20 72 2c 20 61 6e 64 20 6f 66 20 63 6f 75 6e 74 73 20 6f 66 20 63 61 6c 6c 73 20 6f 66 0a 20 20 20 ┆r, and of counts of calls of ┆ 0x0a20…0a40 20 20 63 65 72 74 61 69 6e 20 66 75 6e 63 74 69 6f 6e 73 2c 20 69 6e 20 74 68 65 20 62 75 66 66 ┆ certain functions, in the buff┆ 0x0a40…0a60 65 72 2e 20 20 4f 6e 6c 79 20 63 61 6c 6c 73 20 6f 66 20 66 75 6e 63 74 69 6f 6e 73 0a 20 20 20 ┆er. Only calls of functions ┆ 0x0a60…0a80 20 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 65 20 70 72 6f 66 69 6c 69 6e 67 20 6f 70 ┆ compiled with the profiling op┆ 0x0a80…0aa0 74 69 6f 6e 20 2d 08 2d 08 2d 08 2d 70 08 70 08 70 08 70 20 6f 66 20 5f 08 63 5f 08 63 28 31 29 ┆tion - - - -p p p p of _ c_ c(1)┆ 0x0aa0…0ac0 20 61 72 65 20 72 65 63 6f 72 64 65 64 2e 0a 0a 20 20 20 20 20 54 6f 20 70 72 6f 66 69 6c 65 20 ┆ are recorded. To profile ┆ 0x0ac0…0ae0 74 68 65 20 65 6e 74 69 72 65 20 70 72 6f 67 72 61 6d 2c 20 69 74 20 69 73 20 73 75 66 66 69 63 ┆the entire program, it is suffic┆ 0x0ae0…0b00 69 65 6e 74 20 74 6f 20 75 73 65 20 74 68 65 0a 20 20 20 20 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a ┆ient to use the following: ┆ 0x0b00…0b20 0a 20 20 20 20 20 20 20 20 20 20 65 78 74 65 72 6e 20 65 74 65 78 74 28 29 3b 0a 20 20 20 20 20 ┆ extern etext(); ┆ 0x0b20…0b40 20 20 20 20 20 2e 20 2e 20 2e 0a 20 20 20 20 20 20 20 20 20 20 6d 6f 6e 73 74 61 72 74 75 70 28 ┆ . . . monstartup(┆ 0x0b40…0b60 28 69 6e 74 29 20 32 2c 20 65 74 65 78 74 29 3b 0a 0a 20 20 20 20 20 5f 08 65 5f 08 74 5f 08 65 ┆(int) 2, etext); _ e_ t_ e┆ 0x0b60…0b80 5f 08 78 5f 08 74 20 6c 69 65 73 20 6a 75 73 74 20 61 62 6f 76 65 20 61 6c 6c 20 74 68 65 20 70 ┆_ x_ t lies just above all the p┆ 0x0b80…0ba0 72 6f 67 72 61 6d 20 74 65 78 74 3b 20 73 65 65 20 74 68 65 20 5f 08 65 5f 08 6e 5f 08 64 0a 20 ┆rogram text; see the _ e_ n_ d ┆ 0x0ba0…0bc0 20 20 20 20 6c 69 62 72 61 72 79 20 66 75 6e 63 74 69 6f 6e 2e 0a 0a 20 20 20 20 20 54 6f 20 73 ┆ library function. To s┆ 0x0bc0…0be0 74 6f 70 20 65 78 65 63 75 74 69 6f 6e 20 6d 6f 6e 69 74 6f 72 69 6e 67 20 61 6e 64 20 77 72 69 ┆top execution monitoring and wri┆ 0x0be0…0c00 74 65 20 74 68 65 20 72 65 73 75 6c 74 73 20 6f 6e 20 74 68 65 0a 20 20 20 20 20 66 69 6c 65 20 ┆te the results on the file ┆ 0x0c00…0c20 67 6d 6f 6e 2e 6f 75 74 2c 20 75 73 65 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 6d 6f 6e 69 74 6f ┆gmon.out, use: monito┆ 0x0c20…0c40 72 28 30 29 3b 0a 0a 20 20 20 20 20 54 68 65 6e 2c 20 74 68 65 20 5f 08 67 5f 08 70 5f 08 72 5f ┆r(0); Then, the _ g_ p_ r_┆ 0x0c40…0c60 08 6f 5f 08 66 20 75 73 65 72 20 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 ┆ o_ f user command can be used t┆ 0x0c60…0c80 6f 20 65 78 61 6d 69 6e 65 20 74 68 65 0a 20 20 20 20 20 72 65 73 75 6c 74 73 2e 0a 0a 0a 0a 0a ┆o examine the results. ┆ 0x0c80…0ca0 0a 0a 0a 20 20 20 20 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 63 5f 08 6f 5f 08 6e 5f 08 74 5f 08 72 ┆ _ m_ o_ n_ c_ o_ n_ t_ r┆ 0x0ca0…0cc0 5f 08 6f 5f 08 6c 20 69 73 20 75 73 65 64 20 74 6f 20 73 65 6c 65 63 74 69 76 65 6c 79 20 63 6f ┆_ o_ l is used to selectively co┆ 0x0cc0…0ce0 6e 74 72 6f 6c 20 70 72 6f 66 69 6c 69 6e 67 20 77 69 74 68 69 6e 20 61 0a 20 20 20 20 20 70 72 ┆ntrol profiling within a pr┆ 0x0ce0…0d00 6f 67 72 61 6d 2e 20 20 57 69 74 68 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 63 5f 08 6f 5f 08 6e 5f ┆ogram. With _ m_ o_ n_ c_ o_ n_┆ 0x0d00…0d20 08 74 5f 08 72 5f 08 6f 5f 08 6c 2c 20 5f 08 67 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 20 75 73 65 ┆ t_ r_ o_ l, _ g_ p_ r_ o_ f use┆ 0x0d20…0d40 72 20 63 6f 6d 6d 61 6e 64 20 63 61 6e 20 62 65 20 75 73 65 64 0a 20 20 20 20 20 66 6f 72 20 70 ┆r command can be used for p┆ 0x0d40…0d60 72 6f 66 69 6c 69 6e 67 2e 20 20 57 68 65 6e 20 74 68 65 20 70 72 6f 67 72 61 6d 20 73 74 61 72 ┆rofiling. When the program star┆ 0x0d60…0d80 74 73 2c 20 70 72 6f 66 69 6c 69 6e 67 20 62 65 67 69 6e 73 2e 0a 20 20 20 20 20 54 6f 20 73 74 ┆ts, profiling begins. To st┆ 0x0d80…0da0 6f 70 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 68 69 73 74 6f 67 72 61 6d 20 74 ┆op the collection of histogram t┆ 0x0da0…0dc0 69 63 6b 73 20 61 6e 64 20 63 61 6c 6c 20 63 6f 75 6e 74 73 2c 0a 20 20 20 20 20 75 73 65 20 5f ┆icks and call counts, use _┆ 0x0dc0…0de0 08 6d 5f 08 6f 5f 08 6e 5f 08 63 5f 08 6f 5f 08 6e 5f 08 74 5f 08 72 5f 08 6f 5f 08 6c 28 30 29 ┆ m_ o_ n_ c_ o_ n_ t_ r_ o_ l(0)┆ 0x0de0…0e00 2e 20 20 54 6f 20 72 65 73 75 6d 65 20 74 68 65 20 63 6f 6c 6c 65 63 74 69 6f 6e 20 6f 66 20 68 ┆. To resume the collection of h┆ 0x0e00…0e20 69 73 74 6f 67 72 61 6d 0a 20 20 20 20 20 74 69 63 6b 73 20 61 6e 64 20 63 61 6c 6c 20 63 6f 75 ┆istogram ticks and call cou┆ 0x0e20…0e40 6e 74 73 2c 20 75 73 65 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 63 5f 08 6f 5f 08 6e 5f 08 74 5f 08 ┆nts, use _ m_ o_ n_ c_ o_ n_ t_ ┆ 0x0e40…0e60 72 5f 08 6f 5f 08 6c 28 31 29 2e 20 20 54 68 69 73 20 61 6c 6c 6f 77 73 20 74 68 65 0a 20 20 20 ┆r_ o_ l(1). This allows the ┆ 0x0e60…0e80 20 20 63 6f 73 74 20 6f 66 20 70 61 72 74 69 63 75 6c 61 72 20 6f 70 65 72 61 74 69 6f 6e 73 20 ┆ cost of particular operations ┆ 0x0e80…0ea0 74 6f 20 62 65 20 6d 65 61 73 75 72 65 64 2e 20 20 4e 6f 74 65 20 74 68 61 74 20 61 6e 0a 20 20 ┆to be measured. Note that an ┆ 0x0ea0…0ec0 20 20 20 6f 75 74 70 75 74 20 66 69 6c 65 20 77 69 6c 6c 20 62 65 20 70 72 6f 64 75 63 65 64 20 ┆ output file will be produced ┆ 0x0ec0…0ee0 75 70 6f 6e 20 70 72 6f 67 72 61 6d 20 65 78 69 74 20 72 65 67 61 72 64 6c 65 73 73 20 6f 66 0a ┆upon program exit regardless of ┆ 0x0ee0…0f00 20 20 20 20 20 74 68 65 20 73 74 61 74 65 20 6f 66 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 63 5f 08 ┆ the state of _ m_ o_ n_ c_ ┆ 0x0f00…0f20 6f 5f 08 6e 5f 08 74 5f 08 72 5f 08 6f 5f 08 6c 2e 0a 0a 20 20 20 20 20 5f 08 6d 5f 08 6f 5f 08 ┆o_ n_ t_ r_ o_ l. _ m_ o_ ┆ 0x0f20…0f40 6e 5f 08 69 5f 08 74 5f 08 6f 5f 08 72 20 69 73 20 61 20 6c 6f 77 2d 6c 65 76 65 6c 20 69 6e 74 ┆n_ i_ t_ o_ r is a low-level int┆ 0x0f40…0f60 65 72 66 61 63 65 20 74 6f 20 5f 08 70 5f 08 72 5f 08 6f 5f 08 66 5f 08 69 5f 08 6c 28 32 29 2e ┆erface to _ p_ r_ o_ f_ i_ l(2).┆ 0x0f60…0f80 20 20 5f 08 6c 5f 08 6f 5f 08 77 5f 08 70 5f 08 63 20 61 6e 64 0a 20 20 20 20 20 5f 08 68 5f 08 ┆ _ l_ o_ w_ p_ c and _ h_ ┆ 0x0f80…0fa0 69 5f 08 67 5f 08 68 5f 08 70 5f 08 63 20 61 72 65 20 74 68 65 20 61 64 64 72 65 73 73 65 73 20 ┆i_ g_ h_ p_ c are the addresses ┆ 0x0fa0…0fc0 6f 66 20 32 20 66 75 6e 63 74 69 6f 6e 73 3b 20 5f 08 62 5f 08 75 5f 08 66 5f 08 66 5f 08 65 5f ┆of 2 functions; _ b_ u_ f_ f_ e_┆ 0x0fc0…0fe0 08 72 20 69 73 20 74 68 65 0a 20 20 20 20 20 61 64 64 72 65 73 73 20 6f 66 20 61 20 28 75 73 65 ┆ r is the address of a (use┆ 0x0fe0…1000 72 2d 73 75 70 70 6c 69 65 64 29 20 61 72 72 61 79 20 6f 66 20 5f 08 62 5f 08 75 5f 08 66 5f 08 ┆r-supplied) array of _ b_ u_ f_ ┆ 0x1000…1020 73 5f 08 69 5f 08 7a 5f 08 65 20 73 68 6f 72 74 0a 20 20 20 20 20 69 6e 74 65 67 65 72 73 2e 20 ┆s_ i_ z_ e short integers. ┆ 0x1020…1040 20 41 74 20 6d 6f 73 74 20 5f 08 6e 5f 08 66 5f 08 75 5f 08 6e 5f 08 63 20 63 61 6c 6c 20 63 6f ┆ At most _ n_ f_ u_ n_ c call co┆ 0x1040…1060 75 6e 74 73 20 63 61 6e 20 62 65 20 6b 65 70 74 2e 20 20 46 6f 72 20 74 68 65 0a 20 20 20 20 20 ┆unts can be kept. For the ┆ 0x1060…1080 72 65 73 75 6c 74 73 20 74 6f 20 62 65 20 73 69 67 6e 69 66 69 63 61 6e 74 20 28 65 73 70 65 63 ┆results to be significant (espec┆ 0x1080…10a0 69 61 6c 6c 79 20 77 68 65 72 65 20 74 68 65 72 65 20 61 72 65 20 73 6d 61 6c 6c 2c 0a 20 20 20 ┆ially where there are small, ┆ 0x10a0…10c0 20 20 68 65 61 76 69 6c 79 20 75 73 65 64 20 72 6f 75 74 69 6e 65 73 29 2c 20 77 65 20 73 75 67 ┆ heavily used routines), we sug┆ 0x10c0…10e0 67 65 73 74 20 74 68 61 74 20 74 68 65 20 62 75 66 66 65 72 20 62 65 20 6e 6f 0a 20 20 20 20 20 ┆gest that the buffer be no ┆ 0x10e0…1100 6d 6f 72 65 20 74 68 61 6e 20 61 20 66 65 77 20 74 69 6d 65 73 20 73 6d 61 6c 6c 65 72 20 74 68 ┆more than a few times smaller th┆ 0x1100…1120 61 6e 20 74 68 65 20 72 61 6e 67 65 20 6f 66 20 6c 6f 63 61 74 69 6f 6e 73 0a 20 20 20 20 20 73 ┆an the range of locations s┆ 0x1120…1140 61 6d 70 6c 65 64 2e 20 20 5f 08 6d 5f 08 6f 5f 08 6e 5f 08 69 5f 08 74 5f 08 6f 5f 08 72 20 64 ┆ampled. _ m_ o_ n_ i_ t_ o_ r d┆ 0x1140…1160 69 76 69 64 65 73 20 74 68 65 20 62 75 66 66 65 72 20 69 6e 74 6f 20 73 70 61 63 65 20 74 6f 20 ┆ivides the buffer into space to ┆ 0x1160…1180 72 65 63 6f 72 64 0a 20 20 20 20 20 74 68 65 20 68 69 73 74 6f 67 72 61 6d 20 6f 66 20 70 72 6f ┆record the histogram of pro┆ 0x1180…11a0 67 72 61 6d 20 63 6f 75 6e 74 65 72 20 73 61 6d 70 6c 65 73 20 6f 76 65 72 20 74 68 65 20 72 61 ┆gram counter samples over the ra┆ 0x11a0…11c0 6e 67 65 0a 20 20 20 20 20 5f 08 6c 5f 08 6f 5f 08 77 5f 08 70 5f 08 63 20 74 6f 20 5f 08 68 5f ┆nge _ l_ o_ w_ p_ c to _ h_┆ 0x11c0…11e0 08 69 5f 08 67 5f 08 68 5f 08 70 5f 08 63 2c 20 61 6e 64 20 73 70 61 63 65 20 74 6f 20 72 65 63 ┆ i_ g_ h_ p_ c, and space to rec┆ 0x11e0…1200 6f 72 64 20 63 61 6c 6c 20 63 6f 75 6e 74 73 20 6f 66 20 66 75 6e 63 2d 0a 20 20 20 20 20 74 69 ┆ord call counts of func- ti┆ 0x1200…1220 6f 6e 73 20 63 6f 6d 70 69 6c 65 64 20 77 69 74 68 20 74 68 65 20 2d 08 2d 08 2d 08 2d 70 08 70 ┆ons compiled with the - - - -p p┆ 0x1220…1240 08 70 08 70 20 6f 70 74 69 6f 6e 20 74 6f 20 5f 08 63 5f 08 63 28 31 29 2e 0a 0a 20 20 20 20 20 ┆ p p option to _ c_ c(1). ┆ 0x1240…1260 54 6f 20 70 72 6f 66 69 6c 65 20 74 68 65 20 65 6e 74 69 72 65 20 70 72 6f 67 72 61 6d 2c 20 69 ┆To profile the entire program, i┆ 0x1260…1280 74 20 69 73 20 73 75 66 66 69 63 69 65 6e 74 20 74 6f 20 75 73 65 0a 0a 20 20 20 20 20 20 20 20 ┆t is sufficient to use ┆ 0x1280…12a0 20 20 65 78 74 65 72 6e 20 65 74 65 78 74 28 29 3b 0a 20 20 20 20 20 20 20 20 20 20 2e 20 2e 20 ┆ extern etext(); . . ┆ 0x12a0…12c0 2e 0a 20 20 20 20 20 20 20 20 20 20 6d 6f 6e 69 74 6f 72 28 28 69 6e 74 29 20 32 2c 20 65 74 65 ┆. monitor((int) 2, ete┆ 0x12c0…12e0 78 74 2c 20 62 75 66 2c 20 62 75 66 73 69 7a 65 2c 20 6e 66 75 6e 63 29 3b 0a 0a 46 08 46 08 46 ┆xt, buf, bufsize, nfunc); F F F┆ 0x12e0…1300 08 46 49 08 49 08 49 08 49 4c 08 4c 08 4c 08 4c 45 08 45 08 45 08 45 53 08 53 08 53 08 53 0a 20 ┆ FI I I IL L L LE E E ES S S S ┆ 0x1300…1320 20 20 20 20 67 6d 6f 6e 2e 6f 75 74 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 ┆ gmon.out S S S SE E E EE E ┆ 0x1320…1340 45 08 45 20 41 08 41 08 41 08 41 4c 08 4c 08 4c 08 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f ┆E E A A A AL L L LS S S SO O O O┆ 0x1340…1360 0a 20 20 20 20 20 55 73 65 72 20 43 6f 6d 6d 61 6e 64 73 20 28 31 29 3a 20 20 63 63 2c 20 67 70 ┆ User Commands (1): cc, gp┆ 0x1360…1380 72 6f 66 0a 20 20 20 20 20 53 79 73 74 65 6d 20 43 61 6c 6c 73 20 28 32 29 3a 20 20 70 72 6f 66 ┆rof System Calls (2): prof┆ 0x1380…13a0 69 6c 2c 20 73 62 72 6b 0a 0a 4d 61 72 63 68 20 31 39 38 39 20 20 20 20 20 20 20 20 20 20 20 20 ┆il, sbrk March 1989 ┆ 0x13a0…13c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 ┆ TX Programmer'┆ 0x13c0…13e0 73 20 52 65 66 65 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆s Reference ┆ 0x13e0…13e4 0a 0a 0a 0a ┆ ┆