home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 454.lha / StackWatch / SWreadme.pp / SWreadme
Text File  |  1990-12-09  |  25KB  |  682 lines

  1. C
  2.  
  3.  
  4.  
  5.  
  6.  
  7. This is StackWatch.  I wrote it because no one else did.
  8.  
  9. Legal Stuff
  10.  
  11. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  12. redistribute this program  so  long  as  you  don't  modify it, you don't
  13. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  14. include all the documentation.   No  shareware  fee  is  requested, but I
  15. never turn down a contribution.
  16.  
  17. FIRST A WORD FROM OUR SPONSOR
  18.  
  19. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  20. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  21. controller, or from any other  external  device that can provide a switch
  22. closure.  Automatically synchronize your  animations with another source.
  23. Reduce your workload.  Let the Amiga do the work for you.
  24.  
  25. Contact:
  26.  
  27.  Jim Locker
  28.  Integral Systems Co.
  29.  P.O. Box 31626
  30.  Dayton, Oh 45424
  31.  (513) 237 8290
  32.  
  33.  for information about VidControl and MasterControl.
  34.  
  35. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  36. enables keyboard input to any application  using only a joystick or other
  37. custom input device connected to  the  second gameport.  The entire Amiga
  38. keyboard is supported, and  operation  is transparent to the application.
  39. Contact Integral Systems Co. for information.
  40.  
  41. AND NOW ON WITH THE SHOW
  42.  
  43. What StackWatch does is quite simple.   It monitors the stack of the task
  44. or process that you  select.   It C
  45.  
  46.  
  47.  
  48.  
  49.  
  50. This is StackWatch.  I wrote it because no one else did.
  51.  
  52. Legal Stuff
  53.  
  54. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  55. redistribute this program  so  long  as  you  don't  modify it, you don't
  56. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  57. include all the documentation.   No  shareware  fee  is  requested, but I
  58. never turn down a contribution.
  59.  
  60. FIRST A WORD FROM OUR SPONSOR
  61.  
  62. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  63. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  64. controller, or from any other  external  device that can provide a switch
  65. closure.  Automatically synchronize your  animations with another source.
  66. Reduce your workload.  Let the Amiga do the work for you.
  67.  
  68. Contact:
  69.  
  70.  Jim Locker
  71.  Integral Systems Co.
  72.  P.O. Box 31626
  73.  Dayton, Oh 45424
  74.  (513) 237 8290
  75.  
  76.  for information about VidControl and MasterControl.
  77.  
  78. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  79. enables keyboard input to any application  using only a joystick or other
  80. custom input device connected to  the  second gameport.  The entire Amiga
  81. keyboard is supported, and  operation  is transparent to the application.
  82. Contact Integral Systems Co. for information.
  83.  
  84. AND NOW ON WITH THE SHOW
  85.  
  86. What StackWatch does is quite simple.   It monitors the stack of the task
  87. or process that you  select.   It  will  try  to  run  about 30 times per
  88. second, so it will look at your  stack  frequently.   This enables you to
  89. keep a pretty good ongoing record  of  how you are doing, stack-wise.  It
  90. is much faster about updating then, for instance, Xoper.  This is because
  91. its purpose is different than Xoper's  and it is dedicated to one job and
  92. only one job.  It seems to do that one thing fairly well.
  93.  
  94. The Amiga is a  very  stack  intensive  machine.   If  you do not provide
  95. enough stack for your routine, you  will  encounter  intermittent crashes
  96. and peculiar behavior.  Unfortunately,  the operating system doesn't tell
  97. you when you run out of stack, and  most  applications  don't check their
  98. own stack (although some  do...StackWatch,  for  instance, does not watch
  99. its own stack.)
  100.  
  101. If you set your stack up to a huge number, you will probably be safe, but
  102. you are also  wasting  memory.   What  is  needed  is a good way to tell,
  103. dynamically, how any program is  doing.   You  may then tailor your stack
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. allocations to be more efficient.
  117.  
  118. StackWatch helps you with this.
  119.  
  120. Using StackWatch
  121.  
  122. StackWatch starts from CLI only.  It requires  one command line argument,
  123. which is the name of the task or process to be monitored.  This name must
  124. be entered EXACTLY  as  it  is  maintained  in  the  system  task  lists.
  125. StackWatch is case sensitive, so if  you  use  an upper case letter while
  126. the system knows the task by a lower case letter, it won't work.
  127.  
  128. The syntax is as follows:
  129.  
  130. StackWatch MyTaskName  <RETURN>
  131.  
  132. For instance, 
  133.  
  134. StackWatch Scribble!
  135.  
  136.  will monitor Scribble!.
  137.  
  138. StackWatch will find  Workbench  or  CLI  applications.   An  application
  139. started from Workbench will have  the  exact  name shown on the icon.  An
  140. application started from CLI may be known by a number of different names,
  141. depending upon how it hooks itself into the system.  For instance, if you
  142. start the Calculator utility that is found in the Utilities drawer of the
  143. Workbench  disk  by  clicking   on  its  icon,  it  will  have  the  name
  144. "Calculator" and typing:
  145.  
  146. StackWatch Calculator
  147.  
  148. will get you there.  However, if you start Calculator from the CLI, while
  149. your current directory is the utilities  drawer, then the routine will be
  150. known to the system according to the exact name (including case) that you
  151. invoked it by.   If  you  invoked  it  by  its  full  path name - such asC
  152.  
  153.  
  154.  
  155.  
  156.  
  157. This is StackWatch.  I wrote it because no one else did.
  158.  
  159. Legal Stuff
  160.  
  161. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  162. redistribute this program  so  long  as  you  don't  modify it, you don't
  163. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  164. include all the documentation.   No  shareware  fee  is  requested, but I
  165. never turn down a contribution.
  166.  
  167. FIRST A WORD FROM OUR SPONSOR
  168.  
  169. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  170. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  171. controller, or from any other  external  device that can provide a switch
  172. closure.  Automatically synchronize your  animations with another source.
  173. Reduce your workload.  Let the Amiga do the work for you.
  174.  
  175. Contact:
  176.  
  177.  Jim Locker
  178.  Integral Systems Co.
  179.  P.O. Box 31626
  180.  Dayton, Oh 45424
  181.  (513) 237 8290
  182.  
  183.  for information about VidControl and MasterControl.
  184.  
  185. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  186. enables keyboard input to any application  using only a joystick or other
  187. custom input device connected to  the  second gameport.  The entire Amiga
  188. keyboard is supported, and  operation  is transparent to the application.
  189. Contact Integral Systems Co. for information.
  190.  
  191. AND NOW ON WITH THE SHOW
  192.  
  193. What StackWatch does is quite simple.   It monitors the stack of the task
  194. or process that you  select.   It  will  try  to  run  about 30 times per
  195. second, so it will look at your  stack  frequently.   This enables you to
  196. keep a pretty good ongoing record  of  how you are doing, stack-wise.  It
  197. is much faster about updating then, for instance, Xoper.  This is because
  198. its purpose is different than Xoper's  and it is dedicated to one job and
  199. only one job.  It seems to do that one thing fairly well.
  200.  
  201. The Amiga is a  very  stack  intensive  machine.   If  you do not provide
  202. enough stacC
  203.  
  204.  
  205.  
  206.  
  207.  
  208. This is StackWatch.  I wrote it because no one else did.
  209.  
  210. Legal Stuff
  211.  
  212. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  213. redistribute this program  so  long  as  you  don't  modify it, you don't
  214. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  215. include all the documentation.   No  shareware  fee  is  requested, but I
  216. never turn down a contribution.
  217.  
  218. FIRST A WORD FROM OUR SPONSOR
  219.  
  220. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  221. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  222. controller, or from any other  external  device that can provide a switch
  223. closure.  Automatically synchronize your  animations with another source.
  224. Reduce your workload.  Let the Amiga do the work for you.
  225.  
  226. Contact:
  227.  
  228.  Jim Locker
  229.  Integral Systems Co.
  230.  P.O. Box 31626
  231.  Dayton, Oh 45424
  232.  (513) 237 8290
  233.  
  234.  for information about VidControl and MasterControl.
  235.  
  236. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  237. enables keyboard input to any application  using only a joystick or other
  238. custom input device connected to  the  second gameport.  The entire Amiga
  239. keyboard is supported, and  operation  is transparent to the application.
  240. Contact Integral Systems Co. for information.
  241.  
  242. AND NOW ON WITH THE SHOW
  243.  
  244. What StackWatch does is quite simple.   It monitors the stack of the task
  245. or process that you  select.   It  will  try  to  run  about 30 times per
  246. second, so it will look at your  stack  frequently.   This enables you to
  247. keep a pretty good ongoing record  of  how you are doing, stack-wise.  It
  248. is much faster about updating then, for instance, Xoper.  This is because
  249. its purpose is different than Xoper's  and it is dedicated to one job and
  250. only one job.  It seems to do that one thing fairly well.
  251.  
  252. The Amiga is a  very  stack  intensive  machine.   If  you do not provide
  253. enough stack for your routine, you  will  encounter  intermittent crashes
  254. and peculiar behavior.  Unfortunately,  the operating system doesn't tell
  255. you when you run out of stack, and  most  applications  don't check their
  256. own stack (although some  do...StackWatch,  for  instance, does not watch
  257. its own stack.)
  258.  
  259. If you set your stack up to a huge number, you will probably be safe, but
  260. you are also  wasting  memory.   What  is  needed  is a good way to tell,
  261. dynamically, how any program is  doing.   You  may then tailor your stack
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274. allocations to be more efficient.
  275.  
  276. StackWatch helps you with this.
  277.  
  278. Using StackWatch
  279.  
  280. StackWatch starts from CLI only.  It requires  one command line argument,
  281. which is the name of the task or process to be monitored.  This name must
  282. be entered EXACTLY  as  it  is  maintained  in  the  system  task  lists.
  283. StackWatch is case sensitive, so if  you  use  an upper case letter while
  284. the system knows the task by a lower case letter, it won't work.
  285.  
  286. The syntax is as follows:
  287.  
  288. StackWatch MyTaskName  <RETURN>
  289.  
  290. For instance, 
  291.  
  292. StackWatch Scribble!
  293.  
  294.  will monitor Scribble!.
  295.  
  296. StackWatch will find  Workbench  or  CLI  applications.   An  application
  297. started from Workbench will have  the  exact  name shown on the icon.  An
  298. application started from CLI may be known by a number of different names,
  299. depending upon how it hooks itself into the system.  For instance, if you
  300. start the Calculator utility that is found in the Utilities drawer of the
  301. Workbench  disk  by  clicking   on  its  icon,  it  will  have  the  name
  302. "Calculator" and typing:
  303.  
  304. StackWatch Calculator
  305.  
  306. will get you there.  However, if you start Calculator from the CLI, while
  307. your current directory is the utilities  drawer, then the routine will be
  308. known to the system according to the exact name (including case) that you
  309. invoked it by.   If  you  invoked  it  by  its  full  path name - such as
  310. "sys:utilities/calculator", then  you  must  locate it with StackWatch by
  311. typing:
  312.  
  313. StackWatch sys:utilities/calculator
  314.  
  315. Some utilities - such as PopCLI and  StackWatch  - detach themselves from
  316. the CLI that started them.  These  utilities  tell  the system what their
  317. name is.  StackWatch is known as -  you  guessed it - StackWatch.  PopCLI
  318. has a name that depends on the  revision  number.   If you were to rename
  319. StackWatch - maybe to SW - in order  to  save typing, it woulC
  320.  
  321.  
  322.  
  323.  
  324.  
  325. This is StackWatch.  I wrote it because no one else did.
  326.  
  327. Legal Stuff
  328.  
  329. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  330. redistribute this program  so  long  as  you  don't  modify it, you don't
  331. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  332. include all the documentation.   No  shareware  fee  is  requested, but I
  333. never turn down a contribution.
  334.  
  335. FIRST A WORD FROM OUR SPONSOR
  336.  
  337. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  338. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  339. controller, or from any other  external  device that can provide a switch
  340. closure.  Automatically synchronize your  animations with another source.
  341. Reduce your workload.  Let the Amiga do the work for you.
  342.  
  343. Contact:
  344.  
  345.  Jim Locker
  346.  Integral Systems Co.
  347.  P.O. Box 31626
  348.  Dayton, Oh 45424
  349.  (513) 237 8290
  350.  
  351.  for information about VidControl and MasterControl.
  352.  
  353. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  354. enables keyboard input to any application  using only a joystick or other
  355. custom input device connected to  the  second gameport.  The entire Amiga
  356. keyboard is supported, and  operation  is transparent to the application.
  357. Contact Integral Systems Co. for information.
  358.  
  359. AND NOW ON WITH THE SHOW
  360.  
  361. What StackWatch does is quite simple.   It monitors the stack of the task
  362. or process that you  select.   It  will  try  to  run  about 30 times per
  363. second, so it will look at your  stack  frequently.   This enables you to
  364. keep a pretty good ongoing record  of  how you are doing, stack-wise.  It
  365. is much faster about updating then, for instance, Xoper.  This is because
  366. its purpose is different than Xoper's  and it is dedicated to one job and
  367. only one job.  It seems to do that one thing fairly well.
  368.  
  369. The Amiga is a  very  stack  intensive  machine.   If  you do not provide
  370. enough stack for your routine, you  will  encounter  intermittent crashes
  371. and peculiar behavior.  Unfortunately,  the operating system doesn't tell
  372. you when you run out of stack, and  most  applications  don't check their
  373. own stack (although some  do...StackWatch,  for  instance, does not watch
  374. its own stack.)
  375.  
  376. If you set your stack up to a huge number, you will probably be safe, but
  377. you are also  wasting  memory.   What  is  needed  is a good way to tell,
  378. dynamically, how any program is  doing.   You  may then tailor your stack
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391. allocations to be more efficient.
  392.  
  393. StackWatch helps you with this.
  394.  
  395. Using StackWatch
  396.  
  397. StackWatch starts from CLI only.  It requires  one command line argument,
  398. which is the name of the task or process to be monitored.  This name must
  399. be entered EXACTLY  as  it  is  maintained  in  the  system  task  lists.
  400. StackWatch is case sensitive, so if  you  use  an upper case letter while
  401. the system knows the task by a lower case letter, it won't work.
  402.  
  403. The syntax is as follows:
  404.  
  405. StackWatch MyTaskName  <RETURN>
  406.  
  407. For instance, 
  408.  
  409. StackWatch Scribble!
  410.  
  411.  will monitor Scribble!.
  412.  
  413. StackWatch will find  Workbench  or  CLI  applications.   An  application
  414. started from Workbench will have  the  exact  name shown on the icon.  An
  415. application started from CLI may be known by a number of different names,
  416. depending upon how it hooks itself into the system.  For instance, if you
  417. start the Calculator utility that is found in the Utilities drawer of the
  418. Workbench  disk  by  clicking   on  its  icon,  it  will  have  the  name
  419. "Calculator" and typing:
  420.  
  421. StackWatch Calculator
  422.  
  423. will get you there.  However, if you start Calculator from the CLI, while
  424. your current directory is the utilities  drawer, then the routine will be
  425. known to the system according to the exact name (including case) that you
  426. invoked it by.   If  you  invoked  it  by  its  full  path name - such as
  427. "sys:utilities/calculator", then  you  must  locate it with StackWatch by
  428. typing:
  429.  
  430. StackWatch sys:utilities/calculator
  431.  
  432. Some utilities - such as PopCLI and  StackWatch  - detach themselves from
  433. the CLI that started them.  These  utilities  tell  the system what their
  434. name is.  StackWatch is known as -  you  guessed it - StackWatch.  PopCLI
  435. has a name that depends on the  revision  number.   If you were to rename
  436. StackWatch - maybe to SW - in order  to  save typing, it would still tell
  437. the system that its name is  StackWatch,  and  you would have to track it
  438. down by that name.
  439.  
  440. The point is that you might have to figure out what name the system knows
  441. your intended target by.  This effort is facilitated by using the utility
  442. Who - which I have provided in this archive.   I did not write it, but it
  443. is useful and it will help you with StackWatch.
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457. The StackWatch Window
  458.  
  459. Has four lines and a "gas gauge".  The  first line tells you what process
  460. (or task)  StackWatch is  monitoring.   This is useful if you are running
  461. multiple copies of StackWatch.  The second  line tells you what the stack
  462. allocation for that  process  is.   The  third  line  tells  you what the
  463. largest amount of  stack  used  was  at  any  time  since  StackWatch was
  464. invoked.  The fourth line tells you what the stack usage is right now.
  465.  
  466. Below the text is a graphic display.  This "Gas Gauge" tells you - with a
  467. picture - how much of your stack allocation  you are currently using.  It
  468. also has a peak indicator that  tells  you what your peak stack usage has
  469. been .  The peak indicator may move toward  the right of the display, but
  470. it never comes back to the left.   It  is a "high water mark".   The "Gas
  471. Gauge" will indicate stack overflows -  if the color bar slops out of the
  472. box on the right, you  have  overflowed  your  stack.  You may or may not
  473. crash, but it might be a good time to save any critical work in progress.
  474.  
  475. StackWatch limitations
  476.  
  477. Stackwatch  takes  "snapshots"  of  your  process  -  it  is  not looking
  478. continuously.  Therefore, it won't necessarily spot a quick peak in stack
  479. usage.  Caveat Emptor.
  480.  
  481. StackWatch hooks itself into the system  at priority 10, and wants to run
  482. at frequent intervals.  One of the  first  things it does when running is
  483. disable multitasking so it  can  safely  wander  through  the system Task
  484. lists.  As a consequence,  under  certC
  485.  
  486.  
  487.  
  488.  
  489.  
  490. This is StackWatch.  I wrote it because no one else did.
  491.  
  492. Legal Stuff
  493.  
  494. StackWatch © 1990 by James R. Locker.  All rights reserved.  Feel free to
  495. redistribute this program  so  long  as  you  don't  modify it, you don't
  496. profit by it (except  a  reasonable  disk  copying  charge),  and  you do
  497. include all the documentation.   No  shareware  fee  is  requested, but I
  498. never turn down a contribution.
  499.  
  500. FIRST A WORD FROM OUR SPONSOR
  501.  
  502. VIDEO PROFESSIONALS...Control any Amiga application (such as an animation 
  503. or titling program)  through  the  Amiga's  second  gameport,  from a GPI
  504. controller, or from any other  external  device that can provide a switch
  505. closure.  Automatically synchronize your  animations with another source.
  506. Reduce your workload.  Let the Amiga do the work for you.
  507.  
  508. Contact:
  509.  
  510.  Jim Locker
  511.  Integral Systems Co.
  512.  P.O. Box 31626
  513.  Dayton, Oh 45424
  514.  (513) 237 8290
  515.  
  516.  for information about VidControl and MasterControl.
  517.  
  518. HANDICAPPED USERS...operate the  Amiga  WITHOUT A KEYBOARD.  KeyWhiz (tm)
  519. enables keyboard input to any application  using only a joystick or other
  520. custom input device connected to  the  second gameport.  The entire Amiga
  521. keyboard is supported, and  operation  is transparent to the application.
  522. Contact Integral Systems Co. for information.
  523.  
  524. AND NOW ON WITH THE SHOW
  525.  
  526. What StackWatch does is quite simple.   It monitors the stack of the task
  527. or process that you  select.   It  will  try  to  run  about 30 times per
  528. second, so it will look at your  stack  frequently.   This enables you to
  529. keep a pretty good ongoing record  of  how you are doing, stack-wise.  It
  530. is much faster about updating then, for instance, Xoper.  This is because
  531. its purpose is different than Xoper's  and it is dedicated to one job and
  532. only one job.  It seems to do that one thing fairly well.
  533.  
  534. The Amiga is a  very  stack  intensive  machine.   If  you do not provide
  535. enough stack for your routine, you  will  encounter  intermittent crashes
  536. and peculiar behavior.  Unfortunately,  the operating system doesn't tell
  537. you when you run out of stack, and  most  applications  don't check their
  538. own stack (although some  do...StackWatch,  for  instance, does not watch
  539. its own stack.)
  540.  
  541. If you set your stack up to a huge number, you will probably be safe, but
  542. you are also  wasting  memory.   What  is  needed  is a good way to tell,
  543. dynamically, how any program is  doing.   You  may then tailor your stack
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556. allocations to be more efficient.
  557.  
  558. StackWatch helps you with this.
  559.  
  560. Using StackWatch
  561.  
  562. StackWatch starts from CLI only.  It requires  one command line argument,
  563. which is the name of the task or process to be monitored.  This name must
  564. be entered EXACTLY  as  it  is  maintained  in  the  system  task  lists.
  565. StackWatch is case sensitive, so if  you  use  an upper case letter while
  566. the system knows the task by a lower case letter, it won't work.
  567.  
  568. The syntax is as follows:
  569.  
  570. StackWatch MyTaskName  <RETURN>
  571.  
  572. For instance, 
  573.  
  574. StackWatch Scribble!
  575.  
  576.  will monitor Scribble!.
  577.  
  578. StackWatch will find  Workbench  or  CLI  applications.   An  application
  579. started from Workbench will have  the  exact  name shown on the icon.  An
  580. application started from CLI may be known by a number of different names,
  581. depending upon how it hooks itself into the system.  For instance, if you
  582. start the Calculator utility that is found in the Utilities drawer of the
  583. Workbench  disk  by  clicking   on  its  icon,  it  will  have  the  name
  584. "Calculator" and typing:
  585.  
  586. StackWatch Calculator
  587.  
  588. will get you there.  However, if you start Calculator from the CLI, while
  589. your current directory is the utilities  drawer, then the routine will be
  590. known to the system according to the exact name (including case) that you
  591. invoked it by.   If  you  invoked  it  by  its  full  path name - such as
  592. "sys:utilities/calculator", then  you  must  locate it with StackWatch by
  593. typing:
  594.  
  595. StackWatch sys:utilities/calculator
  596.  
  597. Some utilities - such as PopCLI and  StackWatch  - detach themselves from
  598. the CLI that started them.  These  utilities  tell  the system what their
  599. name is.  StackWatch is known as -  you  guessed it - StackWatch.  PopCLI
  600. has a name that depends on the  revision  number.   If you were to rename
  601. StackWatch - maybe to SW - in order  to  save typing, it would still tell
  602. the system that its name is  StackWatch,  and  you would have to track it
  603. down by that name.
  604.  
  605. The point is that you might have to figure out what name the system knows
  606. your intended target by.  This effort is facilitated by using the utility
  607. Who - which I have provided in this archive.   I did not write it, but it
  608. is useful and it will help you with StackWatch.
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622. The StackWatch Window
  623.  
  624. Has four lines and a "gas gauge".  The  first line tells you what process
  625. (or task)  StackWatch is  monitoring.   This is useful if you are running
  626. multiple copies of StackWatch.  The second  line tells you what the stack
  627. allocation for that  process  is.   The  third  line  tells  you what the
  628. largest amount of  stack  used  was  at  any  time  since  StackWatch was
  629. invoked.  The fourth line tells you what the stack usage is right now.
  630.  
  631. Below the text is a graphic display.  This "Gas Gauge" tells you - with a
  632. picture - how much of your stack allocation  you are currently using.  It
  633. also has a peak indicator that  tells  you what your peak stack usage has
  634. been .  The peak indicator may move toward  the right of the display, but
  635. it never comes back to the left.   It  is a "high water mark".   The "Gas
  636. Gauge" will indicate stack overflows -  if the color bar slops out of the
  637. box on the right, you  have  overflowed  your  stack.  You may or may not
  638. crash, but it might be a good time to save any critical work in progress.
  639.  
  640. StackWatch limitations
  641.  
  642. Stackwatch  takes  "snapshots"  of  your  process  -  it  is  not looking
  643. continuously.  Therefore, it won't necessarily spot a quick peak in stack
  644. usage.  Caveat Emptor.
  645.  
  646. StackWatch hooks itself into the system  at priority 10, and wants to run
  647. at frequent intervals.  One of the  first  things it does when running is
  648. disable multitasking so it  can  safely  wander  through  the system Task
  649. lists.  As a consequence,  under  certain  circumstances,  or if multiple
  650. copies of StackWatch are running, it can noticeably slow system response.
  651. I thought about providing  a  command  line  option to change the default
  652. priority, but decided not to.  Maybe in the next release.
  653.  
  654. Future upgrades
  655.  
  656. May or may not occur.   If  they  do,  we  might  go shareware...how many
  657. people are interested?
  658.  
  659. I would add Workbench  startup,  with  an  Intuition Requester that would
  660. display all the current tasks in the system and allow you to pick the one
  661. you wanted - this in lieu of a  command  line argument.  Might also add a
  662. pull-down menu to let you change  tasks  on the fly.  Currently, you must
  663. close StackWatch  and  restart  it  to  change  tasks.   Of  course,  the
  664. capability to change priorities would be nice.
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.